com.sun.identity.policy
Class SubjectTypeManager

java.lang.Object
  |
  +--com.sun.identity.policy.SubjectTypeManager

public class SubjectTypeManager
extends java.lang.Object

The class SubjectTypeManager provides methods to get a list of configured Subject objects, and to obtain a factory object for it.


Method Summary
 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.
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSubjectTypeNames

public java.util.Set getSubjectTypeNames()
                                  throws SSOException,
                                         PolicyException
Returns a set of all valid subject type names defined by the policy service. Examples are LDAPRole, LDAPGroup, etc.
Returns:
a set of all valid subject type names defined by the policy service.
Throws:
SSOException - if the SSOToken used to create the PolicyManager has become invalid
PolicyException - for any other abnormal condition

getSelectedSubjectTypeNames

public java.util.Set getSelectedSubjectTypeNames()
                                          throws SSOException,
                                                 PolicyException
Returns a set of valid subject type names configured for the organization. Examples are LDAPRole, LDAPGroup, etc.
Returns:
a set of valid subject type names configured for the organization.
Throws:
SSOException - if the SSOToken used to create the PolicyManager has become invalid
PolicyException - for any other abnormal condition

getSubjectTypeName

public java.lang.String getSubjectTypeName(Subject subject)
Returns the type of the Subject implementation. For example Role, Group, Organization, etc.
Parameters:
subject - subject object for which this method will return its associated type
Returns:
type of the subject, e.g., LDAPRole, LDAPGroup, etc. Returns null if not present.

getI18NKey

public 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.
Parameters:
subjectType - subject type name
Returns:
i18n key to obtain the display name

getDisplayName

public java.lang.String getDisplayName(java.lang.String subjectType)
Gets the display name for the subject type
Parameters:
subjectType - subject type
Returns:
display name for the subject type

getSubject

public Subject getSubject(java.lang.String subjectType)
                   throws NameNotFoundException,
                          PolicyException
Returns an instance of the Subject given the subject type name.
Parameters:
subjectType - subject type.
Returns:
an instance of the Subject given the subject type name.
Throws:
NameNotFoundException - if the Subject for the subjectType name is not found
PolicyException - for any other abnormal condition

getViewBeanURL

public java.lang.String getViewBeanURL(Subject subject)
Gets 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.