|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.identity.policy.SubjectTypeManager
The class SubjectTypeManager
provides
methods to get a list of configured Subject
objects, and to obtain a factory object for it.
Method Summary | |
void |
addSubject(java.lang.String subjectName,
Subject subject)
Adds a policy subject at realm. |
java.lang.String |
getDisplayName(java.lang.String subjectType)
Gets the display name for the subject type |
java.lang.String |
getI18NKey(java.lang.String subjectType)
Returns the I18N key to be used to localize the display name for the subject type name. |
java.util.Set |
getSelectedSubjectTypeNames()
Returns a set of valid subject type names configured for the organization. |
Subject |
getSubject(java.lang.String subjectType)
Returns an instance of the Subject given the subject type
name. |
Subject |
getSubjectByName(java.lang.String subjectName)
Gets the Subject object identified by subjectName defined at the realm |
java.util.Set |
getSubjectNames()
Get the set of names of Subject(s) defined at the realm |
java.lang.String |
getSubjectTypeName(Subject subject)
Returns the type of the Subject implementation. |
java.util.Set |
getSubjectTypeNames()
Returns a set of all valid subject type names defined by the policy service. |
java.lang.String |
getViewBeanURL(Subject subject)
Gets the view bean URL given the Subject |
Subject |
removeSubject(java.lang.String subjectName)
Removes the subject with the given name from the realm. |
Subject |
removeSubject(java.lang.String subjectName,
boolean forcedRemove)
Removes the subject with the given name from the realm. |
void |
replaceSubject(java.lang.String subjectName,
Subject subject)
Replaces an existing subject with the same name by the current one at the realm. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.util.Set getSubjectTypeNames() throws SSOException, PolicyException
LDAPRole
, LDAPGroup
, etc.SSOException
- if the SSOToken
used to create
the PolicyManager
has become invalidPolicyException
- for any other abnormal conditionpublic java.util.Set getSelectedSubjectTypeNames() throws SSOException, PolicyException
LDAPRole
, LDAPGroup
, etc.SSOException
- if the SSOToken
used to create
the PolicyManager
has become invalidPolicyException
- for any other abnormal conditionpublic java.lang.String getSubjectTypeName(Subject subject)
Subject
implementation.
For example Role, Group, Organization, etc.subject
- subject object for which this method will
return its associated typeLDAPRole
,
LDAPGroup
, etc. Returns null
if
not present.public java.lang.String getI18NKey(java.lang.String subjectType)
subjectType
- subject type namepublic java.lang.String getDisplayName(java.lang.String subjectType)
subjectType
- subject typepublic Subject getSubject(java.lang.String subjectType) throws NameNotFoundException, PolicyException
Subject
given the subject type
name.subjectType
- subject type.Subject
given the subject type
name.NameNotFoundException
- if the Subject
for the
subjectType
name is not foundPolicyException
- for any other abnormal conditionpublic void addSubject(java.lang.String subjectName, Subject subject) throws NameAlreadyExistsException, InvalidNameException, PolicyException, SSOException
subjectName
- name of the Subject instancesubject
- Subject object to be addedNameAlreadyExistsException
- if a Subject with the given name
already exists at the realmInvalidNameException
- if the subject name is invalidPolicyException
- if can not add the Subjectpublic Subject removeSubject(java.lang.String subjectName) throws ObjectInUseException, PolicyException, SSOException
subjectName
- name of the Subjectnull
if Subject with
the given subjectName is not presentPolicyException
- if can not remove the Subjectpublic Subject removeSubject(java.lang.String subjectName, boolean forcedRemove) throws ObjectInUseException, PolicyException, SSOException
forcedRemove
argument is set to true
.
If the forcedRemove
argument is set to
true
policies that are using the subject would
be modified to remove the references to the subjectsubjectName
- name of the SubjectforcedRemove
- if set to true
, policies that
use the subject would be modifed to remove the references
to the subject. Otherwise, ObjectInUseException
would be thrown if there is any policy using the subjectnull
if Subject with
the given subjectName is not presentPolicyException
- if can not remove the Subjectpublic void replaceSubject(java.lang.String subjectName, Subject subject) throws NameNotFoundException, PolicyException, SSOException
subjectName
- name of the Subject instancesubject
- Subject that will replace an existing Subject
with the same nameNameNotFoundException
- if a Subject instance
with the given name is not presentPolicyException
- if can not replace the Subjectpublic java.util.Set getSubjectNames() throws PolicyException, SSOException
public Subject getSubjectByName(java.lang.String subjectName) throws NameNotFoundException, PolicyException
subjectName
- name of subject.NameNotFoundException
- if a Subject with the given name
does not existPolicyException
- if can not get the Subjectpublic java.lang.String getViewBeanURL(Subject subject)
subject
- subject for which to get the view bean URLPluginSchema
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |