mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-96: Add protected convenience method for retrieving delegate object.
This commit is contained in:
		| @@ -50,6 +50,16 @@ public class DelegatingConnection implements 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 | ||||
|     public String getIdentifier() { | ||||
|         return connection.getIdentifier(); | ||||
|   | ||||
| @@ -47,6 +47,17 @@ public class DelegatingConnectionGroup implements 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 | ||||
|     public String getIdentifier() { | ||||
|         return connectionGroup.getIdentifier(); | ||||
|   | ||||
| @@ -49,6 +49,16 @@ public class DelegatingDirectory<ObjectType extends Identifiable> | ||||
|         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 | ||||
|     public ObjectType get(String identifier) throws GuacamoleException { | ||||
|         return directory.get(identifier); | ||||
|   | ||||
| @@ -43,6 +43,17 @@ public class DelegatingSharingProfile implements 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 | ||||
|     public String getIdentifier() { | ||||
|         return sharingProfile.getIdentifier(); | ||||
|   | ||||
| @@ -48,6 +48,16 @@ public class DelegatingUser implements 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 | ||||
|     public String getIdentifier() { | ||||
|         return user.getIdentifier(); | ||||
|   | ||||
| @@ -45,6 +45,17 @@ public class DelegatingUserContext implements 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 | ||||
|     public User self() { | ||||
|         return userContext.self(); | ||||
|   | ||||
| @@ -46,6 +46,16 @@ public class DelegatingUserGroup implements 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 | ||||
|     public String getIdentifier() { | ||||
|         return userGroup.getIdentifier(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user