Package com.sun.identity.policy
Class SubjectTypeManager
- java.lang.Object
-
- com.sun.identity.policy.SubjectTypeManager
-
@SupportedAll @Deprecated public class SubjectTypeManager extends Object
Deprecated.The classSubjectTypeManager
provides methods to get a list of configuredSubject
objects, and to obtain a factory object for it.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SubjectTypeManager()
Deprecated.Constructs aSubjectTypeManager
objectprotected
SubjectTypeManager(PolicyManager pm)
Deprecated.Constructs aSubjectTypeManager
object
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addSubject(String subjectName, Subject subject)
Deprecated.Adds a policy subject at realm.String
getDisplayName(String subjectType)
Deprecated.Returns the display name for the subject typeString
getI18NKey(String subjectType)
Deprecated.Returns the I18N key to be used to localize the display name for the subject type name.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.Set
getSelectedSubjectTypeNames()
Deprecated.Returns a set of valid subject type names configured for the organization.Subject
getSubject(String subjectType)
Deprecated.Returns an instance of theSubject
given the subject type name.Subject
getSubjectByName(String subjectName)
Deprecated.Returns the Subject object identified by subjectName defined at the realmSet
getSubjectNames()
Deprecated.Get the set of names of Subject(s) defined at the realmString
getSubjectTypeName(Subject subject)
Deprecated.Returns the type of theSubject
implementation.Set
getSubjectTypeNames()
Deprecated.Returns a set of all valid subject type names defined by the policy service.String
getViewBeanURL(Subject subject)
Deprecated.Returns the view bean URL given the SubjectSubject
removeSubject(String subjectName)
Deprecated.Removes the subject with the given name from the realm.Subject
removeSubject(String subjectName, boolean forcedRemove)
Deprecated.Removes the subject with the given name from the realm.void
replaceSubject(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 SSOException
Deprecated.Constructs aSubjectTypeManager
object- Throws:
SSOException
-
SubjectTypeManager
protected SubjectTypeManager(PolicyManager pm)
Deprecated.Constructs aSubjectTypeManager
object- Parameters:
pm
-PolicyManager
to initializeSubjectTypeManager
with
-
-
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 theSSOToken
used to create thePolicyManager
has 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 theSSOToken
used to create thePolicyManager
has become invalidPolicyException
- for any other abnormal condition
-
getSubjectTypeName
public String getSubjectTypeName(Subject subject)
Deprecated.Returns the type of theSubject
implementation. For exampleLDAPGroups
etc.- Parameters:
subject
-Subject
for which this method will return its associated type- Returns:
- type of the
Subject
, e.g.,LDAPGroups
, etc. Returnsnull
if 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 theSubject
given the subject type name.- Parameters:
subjectType
- subject type.- Returns:
- an instance of the
Subject
given the subject type name. - Throws:
NameNotFoundException
- if theSubject
for thesubjectType
name 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
null
if Subject with the given subjectName is not present - Throws:
PolicyException
- if can not remove the SubjectObjectInUseException
SSOException
-
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 unlessforcedRemove
argument is set totrue
. If theforcedRemove
argument is set totrue
policies 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,ObjectInUseException
would be thrown if there is any policy using the subject- Returns:
- returns the Subject object being removed,
returns
null
if Subject with the given subjectName is not present - Throws:
PolicyException
- if can not remove the SubjectObjectInUseException
SSOException
-
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:
PolicyException
SSOException
-
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
-
-