Package com.sun.identity.policy
Class SubjectTypeManager
java.lang.Object
com.sun.identity.policy.SubjectTypeManager
Deprecated.
The class
SubjectTypeManager provides
methods to get a list of configured Subject
objects, and to obtain a factory object for it.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Constructs aSubjectTypeManagerobjectprotectedDeprecated.Constructs aSubjectTypeManagerobject -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubject(String subjectName, Subject subject) Deprecated.Adds a policy subject at realm.getDisplayName(String subjectType) Deprecated.Returns the display name for the subject typegetI18NKey(String subjectType) Deprecated.Returns the I18N key to be used to localize the display name for the subject type name.protected StringgetI18NPropertiesFileName(String subjectType) Deprecated.Returns the I18N properties file name that should be used to localize display names for the given subject type.Deprecated.Returns a set of valid subject type names configured for the organization.getSubject(String subjectType) Deprecated.Returns an instance of theSubjectgiven the subject type name.getSubjectByName(String subjectName) Deprecated.Returns the Subject object identified by subjectName defined at the realmDeprecated.Get the set of names of Subject(s) defined at the realmgetSubjectTypeName(Subject subject) Deprecated.Returns the type of theSubjectimplementation.Deprecated.Returns a set of all valid subject type names defined by the policy service.getViewBeanURL(Subject subject) Deprecated.Returns the view bean URL given the SubjectremoveSubject(String subjectName) Deprecated.Removes the subject with the given name from the realm.removeSubject(String subjectName, boolean forcedRemove) Deprecated.Removes the subject with the given name from the realm.voidreplaceSubject(String subjectName, Subject subject) Deprecated.Replaces an existing subject with the same name by the current one at the realm.
-
Constructor Details
-
SubjectTypeManager
Deprecated.Constructs aSubjectTypeManagerobject- Throws:
SSOException
-
SubjectTypeManager
Deprecated.Constructs aSubjectTypeManagerobject- Parameters:
pm-PolicyManagerto initializeSubjectTypeManagerwith
-
-
Method Details
-
getSubjectTypeNames
Deprecated.Returns a set of all valid subject type names defined by the policy service. Examples areLDAPRole,LDAPGroup, etc.- Returns:
- a set of all valid subject type names defined by the policy service.
- Throws:
SSOException- if theSSOTokenused to create thePolicyManagerhas become invalidPolicyException- for any other abnormal condition
-
getSelectedSubjectTypeNames
Deprecated.Returns a set of valid subject type names configured for the organization. Examples areLDAPRole,LDAPGroup, etc.- Returns:
- a set of valid subject type names configured for the organization.
- Throws:
SSOException- if theSSOTokenused to create thePolicyManagerhas become invalidPolicyException- for any other abnormal condition
-
getSubjectTypeName
Deprecated.Returns the type of theSubjectimplementation. For exampleLDAPGroupsetc.- Parameters:
subject-Subjectfor which this method will return its associated type- Returns:
- type of the
Subject, e.g.,LDAPGroups, etc. Returnsnullif not present.
-
getI18NPropertiesFileName
Deprecated.Returns the I18N properties file name that should be used to localize display names for the given subject type.- Parameters:
subjectType- subject type name- Returns:
- i18n properties file name
-
getI18NKey
Deprecated.Returns the I18N key to be used to localize the display name for the subject type name.- Parameters:
subjectType- subject type name- Returns:
- i18n key to obtain the display name
-
getDisplayName
Deprecated.Returns the display name for the subject type- Parameters:
subjectType- subject type- Returns:
- display name for the subject type
-
getSubject
Deprecated.Returns an instance of theSubjectgiven the subject type name.- Parameters:
subjectType- subject type.- Returns:
- an instance of the
Subjectgiven the subject type name. - Throws:
NameNotFoundException- if theSubjectfor thesubjectTypename is not foundPolicyException- for any other abnormal condition
-
addSubject
public void addSubject(String subjectName, Subject subject) throws NameAlreadyExistsException, InvalidNameException, PolicyException, SSOException Deprecated.Adds a policy subject at realm.- Parameters:
subjectName- name of the Subject instancesubject- Subject object to be added- Throws:
NameAlreadyExistsException- if a Subject with the given name already exists at the realmInvalidNameException- if the subject name is invalidPolicyException- if can not add the SubjectSSOException
-
removeSubject
public Subject removeSubject(String subjectName) throws ObjectInUseException, PolicyException, SSOException Deprecated.Removes the subject with the given name from the realm. This method would throw PolicyException if the subject is being used by any policy.- Parameters:
subjectName- name of the Subject- Returns:
- returns the Subject object being removed,
returns
nullif Subject with the given subjectName is not present - Throws:
PolicyException- if can not remove the SubjectObjectInUseExceptionSSOException
-
removeSubject
public Subject removeSubject(String subjectName, boolean forcedRemove) throws ObjectInUseException, PolicyException, SSOException Deprecated.Removes the subject with the given name from the realm. This method would throw PolicyException if the subject is being used by any policy unlessforcedRemoveargument is set totrue. If theforcedRemoveargument is set totruepolicies that are using the subject would be modified to remove the references to the subject- Parameters:
subjectName- name of the SubjectforcedRemove- if set totrue, policies that use the subject would be modifed to remove the references to the subject. Otherwise,ObjectInUseExceptionwould be thrown if there is any policy using the subject- Returns:
- returns the Subject object being removed,
returns
nullif Subject with the given subjectName is not present - Throws:
PolicyException- if can not remove the SubjectObjectInUseExceptionSSOException
-
replaceSubject
public void replaceSubject(String subjectName, Subject subject) throws NameNotFoundException, PolicyException, SSOException Deprecated.Replaces an existing subject with the same name by the current one at the realm. If a subject with the same name does not exist, it will be added.- Parameters:
subjectName- name of the Subject instancesubject- Subject that will replace an existing Subject with the same name- Throws:
NameNotFoundException- if a Subject instance with the given name is not presentPolicyException- if can not replace the SubjectSSOException
-
getSubjectNames
Deprecated.Get the set of names of Subject(s) defined at the realm- Returns:
- set of subject names
- Throws:
PolicyExceptionSSOException
-
getSubjectByName
Deprecated.Returns the Subject object identified by subjectName defined at the realm- Parameters:
subjectName- name of subject.- Returns:
- Subject object
- Throws:
NameNotFoundException- if a Subject with the given name does not existPolicyException- if can not get the Subject
-
getViewBeanURL
Deprecated.Returns the view bean URL given the Subject- Parameters:
subject- subject for which to get the view bean URL- Returns:
- view bean URL defined for the subject plugin in the policy
service
PluginSchema.
-
EntitlementSubjectinstead asEntitlementhas replacedPolicy.