Class UserPermissions
- java.lang.Object
-
- com.caplin.keymaster.permissioning.UserPermissions
-
- All Implemented Interfaces:
IUserPermissions
public class UserPermissions extends java.lang.Object implements IUserPermissions
Implementation of theIUserPermissions
interface. If you want to associate permissioning information with a KeyMaster token, you must create instances of this class.
-
-
Constructor Summary
Constructors Constructor Description UserPermissions()
Initializes a new instance of theUserPermissions
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMapping(ISubjectMapping mapping)
Adds a new subject mapping to the user's permissioning information.void
addPermission(IPermission permission)
Adds a new subject permission to the user's permissioning information.java.lang.String
toPermissionString()
Returns a string representation of the user's permissions.java.lang.String
toString()
Returns a String that represents this instance.
-
-
-
Method Detail
-
addPermission
public void addPermission(IPermission permission)
Description copied from interface:IUserPermissions
Adds a new subject permission to the user's permissioning information.Permissions are applied on a first match basis, and the matching process is in the order that the permissions were added to the
IUserPermissions
. As a result, you should add more specific permissions before more general ones. For example, you should add a permission for /FX/GBPEUR before adding a permission for ^/FX.- Specified by:
addPermission
in interfaceIUserPermissions
- Parameters:
permission
- The subject permission to add.
-
addMapping
public void addMapping(ISubjectMapping mapping)
Description copied from interface:IUserPermissions
Adds a new subject mapping to the user's permissioning information.Mappings are applied on a first match basis, and the matching process is in the order that the mappings were added to the
IUserPermissions
. As a result, you should add more specific mappings before more general ones.- Specified by:
addMapping
in interfaceIUserPermissions
- Parameters:
mapping
- The subject mapping to add.
-
toPermissionString
public java.lang.String toPermissionString()
Description copied from interface:IUserPermissions
Returns a string representation of the user's permissions.- Specified by:
toPermissionString
in interfaceIUserPermissions
- Returns:
- A string representation of the user's permissions.
-
toString
public java.lang.String toString()
Returns a String that represents this instance.- Overrides:
toString
in classjava.lang.Object
-
-