mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-96: Merge add protected convenience method for retrieving delegate object.
This commit is contained in:
@@ -41,11 +41,6 @@ public class TOTPUser extends DelegatingUser {
|
|||||||
*/
|
*/
|
||||||
public static final String TOTP_KEY_CONFIRMED_ATTRIBUTE_NAME = "guac-totp-key-confirmed";
|
public static final String TOTP_KEY_CONFIRMED_ATTRIBUTE_NAME = "guac-totp-key-confirmed";
|
||||||
|
|
||||||
/**
|
|
||||||
* The User object wrapped by this TOTPUser.
|
|
||||||
*/
|
|
||||||
private final User undecorated;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wraps the given User object, hiding and blocking access to the core
|
* Wraps the given User object, hiding and blocking access to the core
|
||||||
* attributes used by TOTP.
|
* attributes used by TOTP.
|
||||||
@@ -55,7 +50,6 @@ public class TOTPUser extends DelegatingUser {
|
|||||||
*/
|
*/
|
||||||
public TOTPUser(User user) {
|
public TOTPUser(User user) {
|
||||||
super(user);
|
super(user);
|
||||||
this.undecorated = user;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,7 +59,7 @@ public class TOTPUser extends DelegatingUser {
|
|||||||
* The wrapped User object.
|
* The wrapped User object.
|
||||||
*/
|
*/
|
||||||
public User getUndecorated() {
|
public User getUndecorated() {
|
||||||
return undecorated;
|
return getDelegateUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -50,6 +50,16 @@ public class DelegatingConnection implements Connection {
|
|||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying Connection wrapped by this DelegatingConnection.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The Connection wrapped by this DelegatingConnection.
|
||||||
|
*/
|
||||||
|
protected Connection getDelegateConnection() {
|
||||||
|
return connection;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return connection.getIdentifier();
|
return connection.getIdentifier();
|
||||||
|
@@ -47,6 +47,17 @@ public class DelegatingConnectionGroup implements ConnectionGroup {
|
|||||||
this.connectionGroup = connectionGroup;
|
this.connectionGroup = connectionGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying ConnectionGroup wrapped by this
|
||||||
|
* DelegatingConnectionGroup.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The ConnectionGroup wrapped by this DelegatingConnectionGroup.
|
||||||
|
*/
|
||||||
|
protected ConnectionGroup getDelegateConnectionGroup() {
|
||||||
|
return connectionGroup;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return connectionGroup.getIdentifier();
|
return connectionGroup.getIdentifier();
|
||||||
|
@@ -49,6 +49,16 @@ public class DelegatingDirectory<ObjectType extends Identifiable>
|
|||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying Directory wrapped by this DelegatingDirectory.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The Directory wrapped by this DelegatingDirectory.
|
||||||
|
*/
|
||||||
|
protected Directory<ObjectType> getDelegateDirectory() {
|
||||||
|
return directory;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ObjectType get(String identifier) throws GuacamoleException {
|
public ObjectType get(String identifier) throws GuacamoleException {
|
||||||
return directory.get(identifier);
|
return directory.get(identifier);
|
||||||
|
@@ -43,6 +43,17 @@ public class DelegatingSharingProfile implements SharingProfile {
|
|||||||
this.sharingProfile = sharingProfile;
|
this.sharingProfile = sharingProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying SharingProfile wrapped by this
|
||||||
|
* DelegatingSharingProfile.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The SharingProfile wrapped by this DelegatingSharingProfile.
|
||||||
|
*/
|
||||||
|
protected SharingProfile getDelegateSharingProfile() {
|
||||||
|
return sharingProfile;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return sharingProfile.getIdentifier();
|
return sharingProfile.getIdentifier();
|
||||||
|
@@ -48,6 +48,16 @@ public class DelegatingUser implements User {
|
|||||||
this.user = user;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying User wrapped by this DelegatingUser.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The User wrapped by this DelegatingUser.
|
||||||
|
*/
|
||||||
|
protected User getDelegateUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return user.getIdentifier();
|
return user.getIdentifier();
|
||||||
|
@@ -45,6 +45,17 @@ public class DelegatingUserContext implements UserContext {
|
|||||||
this.userContext = userContext;
|
this.userContext = userContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying UserContext wrapped by this
|
||||||
|
* DelegatingUserContext.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The UserContext wrapped by this DelegatingUserContext.
|
||||||
|
*/
|
||||||
|
protected UserContext getDelegateUserContext() {
|
||||||
|
return userContext;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public User self() {
|
public User self() {
|
||||||
return userContext.self();
|
return userContext.self();
|
||||||
|
@@ -46,6 +46,16 @@ public class DelegatingUserGroup implements UserGroup {
|
|||||||
this.userGroup = userGroup;
|
this.userGroup = userGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the underlying UserGroup wrapped by this DelegatingUserGroup.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The UserGroup wrapped by this DelegatingUserGroup.
|
||||||
|
*/
|
||||||
|
protected UserGroup getDelegateUserGroupGroup() {
|
||||||
|
return userGroup;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return userGroup.getIdentifier();
|
return userGroup.getIdentifier();
|
||||||
|
Reference in New Issue
Block a user