Package com.sun.identity.policy
Class SubjectTypeManager
- java.lang.Object
-
- com.sun.identity.policy.SubjectTypeManager
-
@Deprecated public class SubjectTypeManager extends Object
Deprecated.since 12.0.0The classSubjectTypeManagerprovides methods to get a list of configuredSubjectobjects, and to obtain a factory object for it.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSubjectTypeManager()Deprecated.Constructs aSubjectTypeManagerobjectprotectedSubjectTypeManager(PolicyManager pm)Deprecated.Constructs aSubjectTypeManagerobject
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddSubject(String subjectName, Subject subject)Deprecated.Adds a policy subject at realm.StringgetDisplayName(String subjectType)Deprecated.Returns the display name for the subject typeStringgetI18NKey(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.SetgetSelectedSubjectTypeNames()Deprecated.Returns a set of valid subject type names configured for the organization.SubjectgetSubject(String subjectType)Deprecated.Returns an instance of theSubjectgiven the subject type name.SubjectgetSubjectByName(String subjectName)Deprecated.Returns the Subject object identified by subjectName defined at the realmSetgetSubjectNames()Deprecated.Get the set of names of Subject(s) defined at the realmStringgetSubjectTypeName(Subject subject)Deprecated.Returns the type of theSubjectimplementation.SetgetSubjectTypeNames()Deprecated.Returns a set of all valid subject type names defined by the policy service.StringgetViewBeanURL(Subject subject)Deprecated.Returns the view bean URL given the SubjectSubjectremoveSubject(String subjectName)Deprecated.Removes the subject with the given name from the realm.SubjectremoveSubject(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 Detail
-
SubjectTypeManager
protected SubjectTypeManager() throws SSOExceptionDeprecated.Constructs aSubjectTypeManagerobject- Throws:
SSOException
-
SubjectTypeManager
protected SubjectTypeManager(PolicyManager pm)
Deprecated.Constructs aSubjectTypeManagerobject- Parameters:
pm-PolicyManagerto initializeSubjectTypeManagerwith
-
-
Method Detail
-
getSubjectTypeNames
public Set getSubjectTypeNames() throws SSOException, PolicyException
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
public Set getSelectedSubjectTypeNames() throws SSOException, PolicyException
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
public String getSubjectTypeName(Subject subject)
Deprecated.Returns the type of theSubjectimplementation. For exampleLDAPRoles,LDAPGroupsetc.- Parameters:
subject-Subjectfor which this method will return its associated type- Returns:
- type of the
Subject, e.g.,LDAPRoles,LDAPGroups, etc. Returnsnullif not present.
-
getI18NPropertiesFileName
protected String getI18NPropertiesFileName(String subjectType)
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
public String getI18NKey(String subjectType)
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
public String getDisplayName(String subjectType)
Deprecated.Returns the display name for the subject type- Parameters:
subjectType- subject type- Returns:
- display name for the subject type
-
getSubject
public Subject getSubject(String subjectType) throws NameNotFoundException, PolicyException
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
public Set getSubjectNames() throws PolicyException, SSOException
Deprecated.Get the set of names of Subject(s) defined at the realm- Returns:
- set of subject names
- Throws:
PolicyExceptionSSOException
-
getSubjectByName
public Subject getSubjectByName(String subjectName) throws NameNotFoundException, PolicyException
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
-
-