Package com.sun.identity.policy.plugins
Class LDAPRoles
- java.lang.Object
-
- com.sun.identity.policy.plugins.LDAPRoles
-
-
Field Summary
Fields Modifier and Type Field Description static MapuserLDAPRoleCache
-
Constructor Summary
Constructors Constructor Description LDAPRoles()Constructor with no parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Creates and returns a copy of this object.booleanequals(Object o)Indicates whether some other object is "equal to" this one.StringgetDisplayNameForValue(String value, Locale locale)Returns the display name for the value for the given locale.ValidValuesgetValidValues(SSOToken token)Returns a list of possible values for theLDAPRoles.ValidValuesgetValidValues(SSOToken token, String pattern)Returns a list of possible values for theLDAPRolesthat satisfy the givenpattern.SetgetValues()Returns the values that was set using the methodsetValues.SyntaxgetValueSyntax(SSOToken token)Returns the syntax of the values theLDAPRolesinthashCode()Return a hash code for thisLDAPRoles.voidinitialize(Map configParams)Initialize the LDAPGroup object by using the configuration information passed by the Policy Framework.booleanisMember(SSOToken token)Determines if the user identified by the token, belongs to this instance of theLDAPRolesobject.voidsetValues(Set names)Sets the names for the instance of theLDAPRolesobject.
-
-
-
Field Detail
-
userLDAPRoleCache
public static Map userLDAPRoleCache
-
-
Method Detail
-
initialize
public void initialize(Map configParams) throws PolicyException
Initialize the LDAPGroup object by using the configuration information passed by the Policy Framework.- Specified by:
initializein interfaceSubject- Parameters:
configParams- the configuration information- Throws:
PolicyException- if an error occured during initialization of the instance
-
getValueSyntax
public Syntax getValueSyntax(SSOToken token) throws SSOException
Returns the syntax of the values theLDAPRoles- Specified by:
getValueSyntaxin interfaceSubject- Parameters:
token- theSSOTokenthat will be used to determine the syntax- Returns:
- set of of valid names for the user collection.
- Throws:
SSOException- ifSSOToken>is not valid- See Also:
Syntax
-
getValidValues
public ValidValues getValidValues(SSOToken token) throws SSOException, PolicyException
Returns a list of possible values for theLDAPRoles.- Specified by:
getValidValuesin interfaceSubject- Parameters:
token- theSSOTokenthat will be used to determine the possible values- Returns:
ValidValuesobject- Throws:
SSOException- ifSSOToken>is not validPolicyException- if unable to get the list of valid names.
-
getValidValues
public ValidValues getValidValues(SSOToken token, String pattern) throws SSOException, PolicyException
Returns a list of possible values for theLDAPRolesthat satisfy the givenpattern.- Specified by:
getValidValuesin interfaceSubject- Parameters:
token- theSSOTokenthat will be used to determine the possible valuespattern- search pattern that will be used to narrow the list of valid names.- Returns:
ValidValuesobject- Throws:
SSOException- ifSSOToken>is not validPolicyException- if unable to get the list of valid names.
-
getDisplayNameForValue
public String getDisplayNameForValue(String value, Locale locale) throws NameNotFoundException
Returns the display name for the value for the given locale. For all the valid values obtained through the methodsgetValidValuesthis method must be called by GUI and CLI to get the corresponding display name. Thelocalevariable could be used by the plugin to customize the display name for the given locale. Thelocalevariable could benull, in which case the plugin must use the default locale (most probabily en_US). Alternatively, if the plugin does not have to localize the value, it can just return thevalueas is.- Specified by:
getDisplayNameForValuein interfaceSubject- Parameters:
value- one of the valid value for the pluginlocale- locale for which the display name must be customized- Returns:
- the display name for the value for the given locale.
- Throws:
NameNotFoundException- if the givenvalueis not one of the valid values for the plugin
-
getValues
public Set getValues()
Returns the values that was set using the methodsetValues.
-
setValues
public void setValues(Set names) throws InvalidNameException
Sets the names for the instance of theLDAPRolesobject. The names are obtained from the policy object, usually configured when a policy is created.- Specified by:
setValuesin interfaceSubject- Parameters:
names- names selected for the instance of the user collection object.- Throws:
InvalidNameException- if the given names are not valid
-
isMember
public boolean isMember(SSOToken token) throws SSOException, PolicyException
Determines if the user identified by the token, belongs to this instance of theLDAPRolesobject.- Specified by:
isMemberin interfaceSubject- Parameters:
token- single-sign-on token of the user- Returns:
trueif the user is member of the given subject;falseotherwise.- Throws:
SSOException- ifSSOTokenis not validPolicyException- if an error occured while checking if the user is a member of this subject
-
hashCode
public int hashCode()
Return a hash code for thisLDAPRoles.
-
equals
public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.
-
-