Package com.sun.identity.delegation
Class DelegationPermission
- java.lang.Object
-
- com.sun.identity.delegation.DelegationPermission
-
public class DelegationPermission extends Object
TheDelegationPermissionclass represents an access control permission on a resource in a realm. It consists of a realm name, a service name, a version number, a config type, a subconfig name, and a set of actions that a user with the permission can perform. Additionally it also contains aMapthat can be used for future extensions.
-
-
Constructor Summary
Constructors Constructor Description DelegationPermission()Default constructor forDelegationPermission.DelegationPermission(String orgName, String serviceName, String version, String configType, String subConfigName, Set actions, Map extensions)Constructor forDelegationPermission.DelegationPermission(String orgName, String serviceName, String version, String configType, String subConfigName, Set actions, Map extensions, org.forgerock.util.Function<String,String,org.forgerock.util.promise.NeverThrowsException> orgNameToDNFunc)Constructor forDelegationPermission.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)SetgetActions()Returns the action names in the permissionStringgetConfigType()Returns the config type in the permissionMapgetExtensions()Returns the extensions in the permissionStringgetOrganizationName()Returns the realm name in the permissionStringgetServiceName()Returns the service name in the permissionStringgetSubConfigName()Returns the subconfig name in the permissionStringgetVersion()Returns the service version in the permissioninthashCode()voidsetActions(Set actions)Sets the action names in the permissionvoidsetConfigType(String configType)Sets the config type in the permissionvoidsetExtensions(Map extensions)Sets the extensions in the permissionvoidsetOrganizationName(String name)Sets the realm name in the permissionvoidsetServiceName(String name)Sets the service name in the permissionvoidsetSubConfigName(String name)Sets the subconfig name in the permissionvoidsetVersion(String version)Sets the service version in the permissionStringtoString()Returns theStringrepresentation of this object.
-
-
-
Constructor Detail
-
DelegationPermission
public DelegationPermission()
Default constructor forDelegationPermission.
-
DelegationPermission
public DelegationPermission(String orgName, String serviceName, String version, String configType, String subConfigName, Set actions, Map extensions) throws DelegationException
Constructor forDelegationPermission. Constructs a delegation permission object with a realm name, a service name, a service version number, a config type, a subconfig name, a set of actions, and aMapfor extensions.- Parameters:
orgName- The realm name in the delegation permissionserviceName- The service name in the delegation permissionversion- The service version in the delegation permissionconfigType- The config type in the delegation permissionsubConfigName- The subconfig name in the delegation permissionactions- The action names in the delegation permissionextensions- a placeholder for future extensions- Throws:
DelegationException- if unable to create theDelegationPermissionobject.
-
DelegationPermission
public DelegationPermission(String orgName, String serviceName, String version, String configType, String subConfigName, Set actions, Map extensions, org.forgerock.util.Function<String,String,org.forgerock.util.promise.NeverThrowsException> orgNameToDNFunc) throws DelegationException
Constructor forDelegationPermission. Constructs a delegation permission object with a realm name, a service name, a service version number, a config type, a subconfig name, a set of actions, and aMapfor extensions.- Parameters:
orgName- The realm name in the delegation permissionserviceName- The service name in the delegation permissionversion- The service version in the delegation permissionconfigType- The config type in the delegation permissionsubConfigName- The subconfig name in the delegation permissionactions- The action names in the delegation permissionextensions- a placeholder for future extensions- Throws:
DelegationException- if unable to create theDelegationPermissionobject.
-
-
Method Detail
-
getOrganizationName
public String getOrganizationName()
Returns the realm name in the permission- Returns:
Stringrepresenting the realm name in the permission
-
setOrganizationName
public void setOrganizationName(String name) throws DelegationException
Sets the realm name in the permission- Parameters:
name-Stringrepresenting the realm name in theDelegationPermission.- Throws:
DelegationException- if name is invalid
-
getServiceName
public String getServiceName()
Returns the service name in the permission- Returns:
Stringrepresenting the service name in theDelegationPermission
-
setServiceName
public void setServiceName(String name) throws DelegationException
Sets the service name in the permission- Parameters:
name- The service name in the delegation permission- Throws:
DelegationException- if name is invalid
-
getVersion
public String getVersion()
Returns the service version in the permission- Returns:
- the service version in the permission
-
setVersion
public void setVersion(String version) throws DelegationException
Sets the service version in the permission- Parameters:
version- The service version in the delegation permission- Throws:
DelegationException- if version is invalid
-
getConfigType
public String getConfigType()
Returns the config type in the permission- Returns:
- the config type in the permission
-
setConfigType
public void setConfigType(String configType) throws DelegationException
Sets the config type in the permission- Parameters:
configType- The config type in the delegation permission- Throws:
DelegationException- if config type is invalid
-
getSubConfigName
public String getSubConfigName()
Returns the subconfig name in the permission- Returns:
- the subconfig name in the permission
-
setSubConfigName
public void setSubConfigName(String name) throws DelegationException
Sets the subconfig name in the permission- Parameters:
name- The subconfig name in the delegation permission- Throws:
DelegationException- if subconfig name is invalid
-
getActions
public Set getActions()
Returns the action names in the permission- Returns:
- the action names in the permission
-
setActions
public void setActions(Set actions) throws DelegationException
Sets the action names in the permission- Parameters:
actions- The action names in the delegation permission- Throws:
DelegationException- if an action name is invalid
-
getExtensions
public Map getExtensions()
Returns the extensions in the permission- Returns:
- the extensions in the permission
-
setExtensions
public void setExtensions(Map extensions) throws DelegationException
Sets the extensions in the permission- Parameters:
extensions- The extensions in the delegation permission- Throws:
DelegationException- if some info in extensions is invalid
-
-