Interface Subject
- All Superinterfaces:
Cloneable
@SupportedAll
@Deprecated(since="8.0.0",
forRemoval=true)
public interface Subject
extends Cloneable
Deprecated, for removal: This API element is subject to removal in a future version.
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
PolicyEvaluator.
-
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated, for removal: This API element is subject to removal in a future version.Creates and returns a copy of this object.getDisplayNameForValue(String value, Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.Returns the display name for the value for the given locale.getValidValues(SSOToken token) Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of possible values for theSubject.getValidValues(SSOToken token, String pattern) Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of possible values for theSubjectthat satisfy the givenpattern.Deprecated, for removal: This API element is subject to removal in a future version.Returns the values that was set using the methodsetValues.getValueSyntax(SSOToken token) Deprecated, for removal: This API element is subject to removal in a future version.Returns the syntax of the values theSubjectimplementation can have.voidinitialize(Map configParams) Deprecated, for removal: This API element is subject to removal in a future version.Initialize (or configure) theSubjectobject.booleanDeprecated, for removal: This API element is subject to removal in a future version.Determines if the user belongs to this instance of theSubjectobject.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the names for the instance of theSubjectobject.
-
Method Details
-
getValueSyntax
Deprecated, for removal: This API element is subject to removal in a future version.Returns the syntax of the values theSubjectimplementation can have.- Parameters:
token- theSSOTokenthat will be used to determine the syntax- Returns:
Syntaxof the values for theSubject- Throws:
SSOException- ifSSOTokenis not validPolicyException- if unable to get the list of valid names.- See Also:
-
getValidValues
Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of possible values for theSubject. The implementation must use theSSOTokentoken provided to determine the possible values. For example, in a Role implementation this method will return all the roles defined in the organization.- Parameters:
token- theSSOTokenthat will be used to determine the possible values- Returns:
ValidValuesobject- Throws:
SSOException- ifSSOTokenis not validPolicyException- if unable to get the list of valid names.
-
getValidValues
Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of possible values for theSubjectthat satisfy the givenpattern. The implementation must use theSSOTokentoken provided to determine the possible values. For example, in a Role implementation with the search filter*adminthis method will return all the roles defined in the organization that end withadmin- 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- ifSSOTokenis not validPolicyException- if unable to get the list of valid names.
-
getDisplayNameForValue
Deprecated, for removal: This API element is subject to removal in a future version.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 web and command line interface 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 probablyen_US). This method returns only the display name and should not be used for the methodsetValues. Alternatively, if the plugin does not have to localize the value, it can just return thevalueas is.- 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
Set getValues()Deprecated, for removal: This API element is subject to removal in a future version.Returns the values that was set using the methodsetValues.- Returns:
Setof values that have been set for the user collection.
-
initialize
Deprecated, for removal: This API element is subject to removal in a future version.Initialize (or configure) theSubjectobject. Usually it will be initialized with the environment parameters set by the system administrator via admin console. For example in a Role implementation, the configuration parameters could specify the directory server name, port, etc.- Parameters:
configParams- configuration parameters as aMap. The values in the map isjava.util.Set, which contains one or more configuration parameters.- Throws:
PolicyException- if an error occurred during initialization ofSubjectinstance
-
setValues
Deprecated, for removal: This API element is subject to removal in a future version.Sets the names for the instance of theSubjectobject. The names are obtained from thePolicyobject, usually configured when a policy is created. For example in a Role implementation, this would be name of the role.- Parameters:
names- names selected for the instance of the user collection object.- Throws:
InvalidNameException- if the given names are not valid
-
isMember
Deprecated, for removal: This API element is subject to removal in a future version.Determines if the user belongs to this instance of theSubjectobject. For example, a Role implementation would returntrueif the user belongs the specified role;falseotherwise.- Parameters:
token- single-sign-on token of the user- Returns:
trueif the user is member of the given subject;falseotherwise.- Throws:
SSOException- if SSO token is not validPolicyException- if an error occurred while checking if the user is a member of this subject
-
clone
Object clone()Deprecated, for removal: This API element is subject to removal in a future version.Creates and returns a copy of this object.- Returns:
- a copy of this object
-