Ticket #263: Changes in response to code review.

This commit is contained in:
James Muehlner
2013-08-09 10:00:45 -07:00
parent c4e3ff1122
commit 8e35804c85
12 changed files with 43 additions and 50 deletions

View File

@@ -115,16 +115,15 @@ public interface Directory<IdentifierType, ObjectType> {
void remove(IdentifierType identifier) throws GuacamoleException;
/**
* Moves the object with the given identifier to the group with the given
* group identifier.
* Moves the object with the given identifier to the given directory.
*
* @param identifier The identifier of the object to remove.
* @param groupIdentifier The identifier of the group to move the object to.
* @param directory The directory to move the object to.
*
* @throws GuacamoleException If an error occurs while moving the object,
* or if moving object is not allowed.
*/
void move(IdentifierType identifier, IdentifierType groupIdentifier)
void move(IdentifierType identifier, Directory<IdentifierType, ObjectType> directory)
throws GuacamoleException;
}

View File

@@ -81,6 +81,6 @@ public interface UserContext {
* @throws GuacamoleException If an error occurs while creating the
* Directory.
*/
ConnectionGroup getConnectionGroup() throws GuacamoleException;
ConnectionGroup getRootConnectionGroup() throws GuacamoleException;
}

View File

@@ -110,7 +110,7 @@ public class SimpleConnectionDirectory
}
@Override
public void move(String identifier, String groupIdentifier)
public void move(String identifier, Directory<String, Connection> directory)
throws GuacamoleException {
throw new GuacamoleSecurityException("Permission denied.");
}

View File

@@ -87,7 +87,7 @@ public class SimpleConnectionGroupDirectory
}
@Override
public void move(String identifier, String groupIdentifier)
public void move(String identifier, Directory<String, ConnectionGroup> directory)
throws GuacamoleException {
throw new GuacamoleSecurityException("Permission denied.");
}

View File

@@ -124,7 +124,7 @@ public class SimpleUserContext implements UserContext {
}
@Override
public ConnectionGroup getConnectionGroup() throws GuacamoleException {
public ConnectionGroup getRootConnectionGroup() throws GuacamoleException {
return connectionGroup;
}

View File

@@ -101,7 +101,7 @@ public class SimpleUserDirectory implements Directory<String, User> {
}
@Override
public void move(String identifier, String groupIdentifier)
public void move(String identifier, Directory<String, User> directory)
throws GuacamoleException {
throw new GuacamoleSecurityException("Permission denied.");
}