summaryrefslogtreecommitdiffstats
path: root/src/main/java/de/bwlehrpool/bwlp_guac
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/bwlehrpool/bwlp_guac')
-rw-r--r--src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java6
-rw-r--r--src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java4
-rw-r--r--src/main/java/de/bwlehrpool/bwlp_guac/GroupField.java5
3 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java
index 088be7f..81434f4 100644
--- a/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java
+++ b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java
@@ -104,14 +104,14 @@ public class BwlpAuthenticationProvider implements AuthenticationProvider {
if (groupJson == null) {
throw new GuacamoleInsufficientCredentialsException(
- "Select Location", new CredentialsInfo(
+ "GROUP_SELECTION.TITLE", new CredentialsInfo(
Collections.<Field>singletonList(new GroupField())
));
}
ObjectMapper mapper = new ObjectMapper();
- String message = "Select a Location";
+ String message = "GROUP_SELECTION.TITLE";
boolean tryAgain = false;
String password = "";
@@ -132,7 +132,7 @@ public class BwlpAuthenticationProvider implements AuthenticationProvider {
if (response.groupid != 0 && correctPassword != null && !password.equals(correctPassword)) {
tryAgain = true;
- message = "Wrong password!";
+ message = "GROUP_SELECTION.PASSWORD_ERROR";
}
if (tryAgain) {
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java b/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java
index 62b54b6..c2d155a 100644
--- a/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java
+++ b/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java
@@ -93,7 +93,7 @@ public class ConnectionManager {
if (group == null) {
// Request the user to select a group
throw new GuacamoleInsufficientCredentialsException(
- "Select Location", new CredentialsInfo(
+ "GROUP_SELECTION.TITLE", new CredentialsInfo(
Collections.<Field>singletonList(new GroupField())
));
}
@@ -122,7 +122,7 @@ public class ConnectionManager {
if (freeClient == null) {
// Request the user to select another Group
throw new GuacamoleCredentialsException(
- "No free client. Select another Location.", new CredentialsInfo(
+ "GROUP_SELECTION.NO_FREE_ERROR", new CredentialsInfo(
Collections.<Field>singletonList(new GroupField())
));
}
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/GroupField.java b/src/main/java/de/bwlehrpool/bwlp_guac/GroupField.java
index c0f89d7..0e9c27b 100644
--- a/src/main/java/de/bwlehrpool/bwlp_guac/GroupField.java
+++ b/src/main/java/de/bwlehrpool/bwlp_guac/GroupField.java
@@ -3,11 +3,6 @@ package de.bwlehrpool.bwlp_guac;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.form.Field;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
import java.util.Collection;
/**