| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The class Subject defines a collection
 of users (or subject) to whom the specified policy is applied.
 A complete implementation of this interface can have complex
 boolean operations to determine if the given user identified
 by the SSOToken belongs to this collection.
 
 The interfaces are separated into administrative
 interfaces and evaluation interfaces. The administrative interfaces
 will be used by web interface/command line interface component to create a
 Subject object and the evaluation interfaces will be used by the
 policy evaluator.
| Method Summary | |
|  java.lang.Object | clone()Creates and returns a copy of this object. | 
|  boolean | equals(java.lang.Object o)Indicates whether some other object is "equal to" this one. | 
|  java.lang.String | getDisplayNameForValue(java.lang.String value,
                       java.util.Locale locale)Returns the display name for the value for the given locale. | 
|  ValidValues | getValidValues(SSOToken token)Returns a list of possible values for the Subject
 . | 
|  ValidValues | getValidValues(SSOToken token,
               java.lang.String pattern)Returns a list of possible values for the Subject
 that satisfy the givenpattern. | 
|  java.util.Set | getValues()Returns the values that was set using the method setValues. | 
|  Syntax | getValueSyntax(SSOToken token)Returns the syntax of the values the Subjectimplementation can have. | 
|  int | hashCode()Return a hash code for this Subject. | 
|  void | initialize(java.util.Map configParams)Initialize (or configure) the Subjectobject. | 
|  boolean | isMember(SSOToken token)Determines if the user belongs to this instance of the Subjectobject. | 
|  void | setValues(java.util.Set names)Sets the names for the instance of the Subjectobject. | 
| Method Detail | 
public Syntax getValueSyntax(SSOToken token)
                      throws SSOException,
                             PolicyException
Subject implementation can have.token - the SSOToken that will be used
 to determine the syntaxSSOException - if SSO token is not validPolicyException - if unable to get the list of valid
 names.Syntax
public ValidValues getValidValues(SSOToken token)
                           throws SSOException,
                                  PolicyException
Subject
 . The implementation must use the SSOToken
  token provided to determine the possible
 values. For example, in a Role implementation
 this method will return all the roles defined
 in the organization.token - the SSOToken that will be used
 to determine the possible valuesValidValues objectSSOException - if SSO token is not validPolicyException - if unable to get the list of valid
 names.
public ValidValues getValidValues(SSOToken token,
                                  java.lang.String pattern)
                           throws SSOException,
                                  PolicyException
Subject
  that satisfy the given pattern.
  The implementation must use the SSOToken
  token provided to determine the possible
 values. For example, in a Role implementation with the
 search filter *admin this method will return all
 the roles defined in the organization that end with admintoken - the SSOToken that will be used
 to determine the possible valuespattern - search pattern that will be used to narrow
 the list of valid names.ValidValues objectSSOException - if SSO token is not validPolicyException - if unable to get the list of valid
 names.
public java.lang.String getDisplayNameForValue(java.lang.String value,
                                               java.util.Locale locale)
                                        throws NameNotFoundException
getValidValues this method must be called
 by web and command line interface to get the corresponding display name.
 The locale variable could be used by the
 plugin to customize
 the display name for the given locale.
 The locale variable
 could be null, in which case the plugin must
 use the default locale (most probably en_US).
 This method returns only the display name and should not
 be used for the method setValues.
 Alternatively, if the plugin does not have to localize
 the value, it can just return the value as is.value - one of the valid value for the pluginlocale - locale for which the display name must be customizedNameNotFoundException - if the given value
 is not one of the valid values for the pluginpublic java.util.Set getValues()
setValues.
public void initialize(java.util.Map configParams)
                throws PolicyException
Subject
 object. Usually it will be initialized with the environment
 parameters set by the system administrator via SMS.
 For example in a Role implementation, the configuration
 parameters could specify the directory server name, port, etc.configParams - configuration parameters as a map.
 The values in the map is java.util.Set,
 which contains one or more configuration parameters.PolicyException - if an error occurred during
 initialization of Subject instance
public void setValues(java.util.Set names)
               throws InvalidNameException
Subject
 object. The names are obtained from the policy object,
 usually configured when a policy is created. For example
 in a Role implementation, this would be name of the role.names - names selected for the instance of
 the user collection object.InvalidNameException - if the given names are not valid
public boolean isMember(SSOToken token)
                 throws SSOException,
                        PolicyException
Subject object.
 For example, a Role implementation
 would return true if the user belongs
 the specified role; false otherwise.token - single-sign-on token of the usertrue if the user is member of the
 given subject; false otherwise.SSOException - if SSO token is not validPolicyException - if an error occurred while
 checking if the user is a member of this subjectpublic int hashCode()
Subject.hashCode in class java.lang.ObjectSubject.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - another object that will be compared with this onetrue if equal.public java.lang.Object clone()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||