Package com.sun.identity.delegation
Class DelegationPrivilege
- java.lang.Object
-
- com.sun.identity.delegation.DelegationPrivilege
-
public class DelegationPrivilege extends Object
TheDelegationPrivilegeclass represents an access control policy on a set of resources in a realm. It consists of a name, a set ofDelegationPermission, and a set of subjects. The name is the name of the privilege. TheDelegationPermissiondefines the resource to which the delegation privilege applies to. The subject set defines to whom the delegation privilege applies.
-
-
Constructor Summary
Constructors Constructor Description DelegationPrivilege(String name, Set subjects, String orgName)Constructor forDelegationPrivilege.DelegationPrivilege(String name, Set permissions, Set subjects)Constructor forDelegationPrivilege.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns the privilege name in the privilegeSetgetPermissions()Returns theDelegationPermissions in the privilegeSetgetSubjects()Returns the subjects in the privilegevoidsetName(String name)Sets the privilege name in the privilegevoidsetPermissions(Set permissions)Sets theDelegationPermissions in the privilegevoidsetSubjects(Set names)Sets the subject names in the privilegeStringtoString()Returns theStringrepresentation of this object.
-
-
-
Constructor Detail
-
DelegationPrivilege
public DelegationPrivilege(String name, Set permissions, Set subjects) throws DelegationException
Constructor forDelegationPrivilege. Constructs a delegation privilege object with a name, a set ofDelegationPermission, and a set of subjects.- Parameters:
name- The name of the privilegepermissions- The set ofDelegationPermissionthat the privilege contains.subjects- The set of subjects that the privilege applies to- Throws:
DelegationException- if any input value is incorrect.
-
DelegationPrivilege
public DelegationPrivilege(String name, Set subjects, String orgName) throws DelegationException
Constructor forDelegationPrivilege.- Parameters:
name- The name of the privilegesubjects- The set of subjects the privilege applies toorgName- The name of the realm where the privilege is defined- Throws:
DelegationException- if unable to createDelegationPrivilegeinstance.
-
-
Method Detail
-
getName
public String getName()
Returns the privilege name in the privilege- Returns:
- the privilege name in the privilege
-
setName
public void setName(String name) throws DelegationException
Sets the privilege name in the privilege- Parameters:
name- The privilege name in the delegation privilege- Throws:
DelegationException- if name already exists in the realm
-
getPermissions
public Set getPermissions()
Returns theDelegationPermissions in the privilege- Returns:
- the
DelegationPermissions in the privilege
-
setPermissions
public void setPermissions(Set permissions) throws DelegationException
Sets theDelegationPermissions in the privilege- Parameters:
permissions- TheDelegationPermissions in the delegation privilege- Throws:
DelegationException- if unable to setDelegationPermission
-
getSubjects
public Set getSubjects()
Returns the subjects in the privilege- Returns:
- the subjects in the privilege
-
setSubjects
public void setSubjects(Set names) throws DelegationException
Sets the subject names in the privilege- Parameters:
names- The subject names in the delegation privilege- Throws:
DelegationException- if unable to set subjects
-
-