GUACAMOLE-1006: Implement Collection support within GuacamoleProperty classes.

This commit is contained in:
Virtually Nick
2020-04-02 13:46:14 -04:00
parent 6493a2313b
commit 9da1289677
18 changed files with 490 additions and 57 deletions

View File

@@ -25,7 +25,7 @@ import java.util.Collections;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.environment.Environment;
import org.apache.guacamole.properties.ByteArrayProperty;
import org.apache.guacamole.properties.StringListProperty;
import org.apache.guacamole.properties.StringGuacamoleProperty;
/**
* Service for retrieving configuration information regarding the JSON
@@ -56,7 +56,7 @@ public class ConfigurationService {
* be allowed to perform authentication. If not specified, ALL address will
* be allowed.
*/
private static final StringListProperty JSON_TRUSTED_NETWORKS = new StringListProperty() {
private static final StringGuacamoleProperty JSON_TRUSTED_NETWORKS = new StringGuacamoleProperty() {
@Override
public String getName() {
@@ -95,7 +95,7 @@ public class ConfigurationService {
* If guacamole.properties cannot be parsed.
*/
public Collection<String> getTrustedNetworks() throws GuacamoleException {
return environment.getProperty(JSON_TRUSTED_NETWORKS, Collections.<String>emptyList());
return environment.getPropertyCollection(JSON_TRUSTED_NETWORKS, Collections.<String>emptyList());
}
}