diff --git a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/ConnectionDirectory.java b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/ConnectionDirectory.java index 735b8198f..b36006ff0 100644 --- a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/ConnectionDirectory.java +++ b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/ConnectionDirectory.java @@ -71,10 +71,10 @@ public class ConnectionDirectory implements Directory{ private int user_id; @Inject - private PermissionCheckService permissionCheckUtility; + private PermissionCheckService permissionCheckService; @Inject - private ProviderService providerUtility; + private ProviderService providerService; @Inject private ConnectionMapper connectionDAO; @@ -97,15 +97,15 @@ public class ConnectionDirectory implements Directory{ @Transactional @Override public Connection get(String identifier) throws GuacamoleException { - permissionCheckUtility.verifyConnectionReadAccess(this.user_id, identifier); - return providerUtility.getExistingMySQLConnection(identifier); + permissionCheckService.verifyConnectionReadAccess(this.user_id, identifier); + return providerService.getExistingMySQLConnection(identifier); } @Transactional @Override public Set getIdentifiers() throws GuacamoleException { Set connectionNameSet = new HashSet(); - Set connections = permissionCheckUtility.getReadableConnections(this.user_id); + Set connections = permissionCheckService.getReadableConnections(this.user_id); for(MySQLConnection mySQLConnection : connections) { connectionNameSet.add(mySQLConnection.getIdentifier()); } @@ -115,9 +115,9 @@ public class ConnectionDirectory implements Directory{ @Transactional @Override public void add(Connection object) throws GuacamoleException { - permissionCheckUtility.verifyCreateConnectionPermission(this.user_id); + permissionCheckService.verifyCreateConnectionPermission(this.user_id); - MySQLConnection mySQLConnection = providerUtility.getNewMySQLConnection(object); + MySQLConnection mySQLConnection = providerService.getNewMySQLConnection(object); connectionDAO.insert(mySQLConnection.getConnection()); updateConfigurationValues(mySQLConnection); @@ -206,9 +206,9 @@ public class ConnectionDirectory implements Directory{ @Transactional @Override public void update(Connection object) throws GuacamoleException { - permissionCheckUtility.verifyConnectionUpdateAccess(this.user_id, object.getIdentifier()); + permissionCheckService.verifyConnectionUpdateAccess(this.user_id, object.getIdentifier()); - MySQLConnection mySQLConnection = providerUtility.getExistingMySQLConnection(object); + MySQLConnection mySQLConnection = providerService.getExistingMySQLConnection(object); connectionDAO.updateByPrimaryKey(mySQLConnection.getConnection()); updateConfigurationValues(mySQLConnection); @@ -217,9 +217,9 @@ public class ConnectionDirectory implements Directory{ @Transactional @Override public void remove(String identifier) throws GuacamoleException { - permissionCheckUtility.verifyConnectionDeleteAccess(this.user_id, identifier); + permissionCheckService.verifyConnectionDeleteAccess(this.user_id, identifier); - MySQLConnection mySQLConnection = providerUtility.getExistingMySQLConnection(identifier); + MySQLConnection mySQLConnection = providerService.getExistingMySQLConnection(identifier); // delete all configuration values ConnectionParameterExample connectionParameterExample = new ConnectionParameterExample(); diff --git a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnection.java b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnection.java index 2a594f08d..6368abe72 100644 --- a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnection.java +++ b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnection.java @@ -68,13 +68,13 @@ public class MySQLConnection implements Connection { private ConnectionParameterMapper connectionParameterDAO; @Inject - private ProviderService providerUtility; + private ProviderService providerService; @Inject private ActiveConnectionSet activeConnectionSet; @Inject - private ConfigurationTranslationService configurationTranslationUtility; + private ConfigurationTranslationService configurationTranslationService; private net.sourceforge.guacamole.net.auth.mysql.model.Connection connection; @@ -122,7 +122,7 @@ public class MySQLConnection implements Connection { List connectionParameters = connectionParameterDAO.selectByExample(connectionParameterExample); - configuration = configurationTranslationUtility.getConfiguration(connection.getProtocol(), connectionParameters); + configuration = configurationTranslationService.getConfiguration(connection.getProtocol(), connectionParameters); } /** @@ -187,7 +187,7 @@ public class MySQLConnection implements Connection { InetGuacamoleSocket inetSocket = new InetGuacamoleSocket(host, port); ConfiguredGuacamoleSocket configuredSocket = new ConfiguredGuacamoleSocket(inetSocket, configuration); - MySQLGuacamoleSocket mySQLSocket = providerUtility.getMySQLGuacamoleSocket(configuredSocket, getConnectionID()); + MySQLGuacamoleSocket mySQLSocket = providerService.getMySQLGuacamoleSocket(configuredSocket, getConnectionID()); // mark this connection as active activeConnectionSet.add(getConnectionID()); @@ -216,6 +216,6 @@ public class MySQLConnection implements Connection { @Override public List getHistory() throws GuacamoleException { - return providerUtility.getExistingMySQLConnectionRecords(connection.getConnection_id()); + return providerService.getExistingMySQLConnectionRecords(connection.getConnection_id()); } } diff --git a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnectionRecord.java b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnectionRecord.java index 55919393c..552698cb3 100644 --- a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnectionRecord.java +++ b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLConnectionRecord.java @@ -75,7 +75,7 @@ public class MySQLConnectionRecord implements ConnectionRecord { * Service for creating and retrieving objects. */ @Inject - private ProviderService providerUtility; + private ProviderService providerService; /** * Initialize this MySQLConnectionRecord with the database record it @@ -100,12 +100,12 @@ public class MySQLConnectionRecord implements ConnectionRecord { @Override public User getUser() { - return providerUtility.getExistingMySQLUser(connectionHistory.getUser_id()); + return providerService.getExistingMySQLUser(connectionHistory.getUser_id()); } @Override public Connection getConnection() { - return providerUtility.getExistingMySQLConnection(connectionHistory.getConnection_id()); + return providerService.getExistingMySQLConnection(connectionHistory.getConnection_id()); } @Override diff --git a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLUser.java b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLUser.java index ef1de4cfb..6b62c4814 100644 --- a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLUser.java +++ b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/MySQLUser.java @@ -63,19 +63,19 @@ public class MySQLUser extends AbstractUser { * Service for encrypting passwords. */ @Inject - private PasswordEncryptionService passwordUtility; + private PasswordEncryptionService passwordService; /** * Service for generating random salts. */ @Inject - private SaltService saltUtility; + private SaltService saltService; /** * Service for checking permissions. */ @Inject - private PermissionCheckService permissionCheckUtility; + private PermissionCheckService permissionCheckService; /** * The set of current permissions a user has. @@ -132,7 +132,7 @@ public class MySQLUser extends AbstractUser { setUsername(user.getUsername()); permissions.addAll( - permissionCheckUtility.getAllPermissions(user.getUser_id())); + permissionCheckService.getAllPermissions(user.getUser_id())); } /** @@ -229,10 +229,10 @@ public class MySQLUser extends AbstractUser { // Set password if specified if (getPassword() != null) { - byte[] salt = saltUtility.generateSalt(); + byte[] salt = saltService.generateSalt(); user.setPassword_salt(salt); user.setPassword_hash( - passwordUtility.createPasswordHash(getPassword(), salt)); + passwordService.createPasswordHash(getPassword(), salt)); } return user; diff --git a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/UserDirectory.java b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/UserDirectory.java index 8c52f56a6..be9438099 100644 --- a/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/UserDirectory.java +++ b/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/UserDirectory.java @@ -120,29 +120,29 @@ public class UserDirectory implements Directory getIdentifiers() throws GuacamoleException { // Get set of all readable users - Set users = permissionCheckUtility.getReadableUsers(this.user_id); + Set users = permissionCheckService.getReadableUsers(this.user_id); // Build set of usernames of readable users Set userNameSet = new HashSet(); @@ -183,7 +183,7 @@ public class UserDirectory implements Directory administerableUsers = - permissionCheckUtility.getAdministerableUserIDs(this.user_id); + permissionCheckService.getAdministerableUserIDs(this.user_id); // Get list of usernames for all given user permissions. List usernames = new ArrayList(); @@ -377,7 +377,7 @@ public class UserDirectory implements Directory administerableUsers = - permissionCheckUtility.getAdministerableUserIDs(this.user_id); + permissionCheckService.getAdministerableUserIDs(this.user_id); // Get list of usernames for all given user permissions. List usernames = new ArrayList(); @@ -443,7 +443,7 @@ public class UserDirectory implements Directory administerableConnections = - permissionCheckUtility.getAdministerableConnectionIDs(this.user_id); + permissionCheckService.getAdministerableConnectionIDs(this.user_id); // Build list of affected connection names from the permissions given List connectionNames = new ArrayList(); @@ -507,7 +507,7 @@ public class UserDirectory implements Directory administerableConnections = - permissionCheckUtility.getAdministerableConnectionIDs(this.user_id); + permissionCheckService.getAdministerableConnectionIDs(this.user_id); // Get list of identifiers for all given user permissions. List identifiers = new ArrayList(); @@ -691,7 +691,7 @@ public class UserDirectory implements Directory