com.waveset.object
Class Principal

java.lang.Object
  extended by com.waveset.object.PersistentObject
      extended by com.waveset.object.Principal
All Implemented Interfaces:
com.waveset.object.AttributeBag, XmlObject, java.io.Serializable, java.lang.Comparable, javax.naming.Referenceable
Direct Known Subclasses:
WSUser

public abstract class Principal
extends PersistentObject
implements java.io.Serializable

A Principal represents a Subject identity. Principals are associated with a Subject.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.waveset.object.PersistentObject
PersistentObject.Comparator, PersistentObject.InitialInstance
 
Field Summary
static java.lang.String code_id
           
static java.lang.String LAST_LOGIN_LOCALE_PROP
          The name of the property used to store the locale where the user last logged in.
static java.lang.String LOCALE_PROP
          The name of the property used to store the locale of the user.
static java.lang.String USER_FORM_NAME
           
static java.lang.String VIEW_USER_FORM_NAME
           
 
Fields inherited from class com.waveset.object.PersistentObject
INITIAL_OBJECT_VERSION
 
Constructor Summary
Principal(com.sun.idm.object.IDMObjectClass objectClass)
           
Principal(com.sun.idm.object.IDMObjectClass objectClass, java.lang.String name)
           
Principal(Principal src)
           
 
Method Summary
 void addAdminGroup(com.waveset.object.AdminGroup ag)
           
 void addAdminGroupRef(com.waveset.object.ObjectRef ref)
          Add one approver to our approver list.
 void addControlledObjectGroup(ObjectGroup og)
           
 void addPermission(com.waveset.object.Permission perm)
           
 void clearAdminGroups()
           
 java.util.ArrayList getAdminGroupRefs()
           
 com.waveset.object.AdminGroup[] getAdminGroups()
           
 com.waveset.object.ObjectRef getAdminGroupsRuleRef()
           
 java.util.List getAdminRoleRefs()
           
 java.util.List getAdminRoles()
          Resolve and return the list of admin role objects.
 java.util.ArrayList getControlledObjectGroupRefs()
           
 ObjectGroup[] getControlledObjectGroups()
           
 com.waveset.object.ObjectRef getControlledObjectGroupsRuleRef()
           
 com.waveset.object.ObjectRef getCustomForm(java.lang.String key)
          Get the ObjectRef for a particular key in the per-user custom form list.
 java.util.List getCustomFormKeys()
          Return the keys for all the custom forms currently held by Principal.
 java.util.List getEncryptedValues()
           
 com.waveset.object.Permission[] getPermissions()
           
 java.util.ArrayList getReferences()
          Return the list of references within this object.
 com.waveset.object.Configuration getUserForm()
           
 java.lang.String getUserFormId()
           
 com.waveset.object.ObjectRef getUserFormRef()
           
 com.waveset.object.Configuration getViewUserForm()
           
 java.lang.String getViewUserFormId()
           
 com.waveset.object.ObjectRef getViewUserFormRef()
           
 boolean hasCapabilities()
           
 java.util.List listQueryableAttributes()
           
 java.util.List listQueryableReferenceAttributes()
           
 java.util.List listSummaryAttributes()
          Returns the complete list of defined attributes that this type of persistent object exposes as summary attributes (regardless of whether this particular object has a value for each).
static com.waveset.object.Permission[] parsePermissions(org.w3c.dom.Element e)
           
 void removeAdminGroup(com.waveset.object.AdminGroup ag)
           
 void removeControlledObjectGroup(ObjectGroup og)
           
 void removePermission(com.waveset.object.Permission perm)
           
 void setAdminGroupRefs(java.util.List refs)
           
 void setAdminGroups(com.waveset.object.AdminGroup[] agarray)
           
 void setAdminGroupsRuleRef(com.waveset.object.ObjectRef adminGroupsRuleRef)
           
 void setAdminRoleRefs(java.util.List adminRoles)
           
 void setAdminRoles(java.util.List adminRoles)
          set the list of admin roles.
 void setControlledObjectGroupRefs(java.util.List refs)
          Has to be public, its called by AccessPolicy.
 void setControlledObjectGroups(ObjectGroup[] ogarray)
           
 void setControlledObjectGroupsRuleRef(com.waveset.object.ObjectRef controlledObjectGroupsRuleRef)
           
 void setCustomForm(java.lang.String key, com.waveset.object.ObjectRef form)
          Set a name and (Form) ObjectRef pair on the object.
 void setPermissions(com.waveset.object.Permission[] permissions)
           
 void setUserForm(com.waveset.object.Configuration userForm)
           
 void setUserFormRef(com.waveset.object.ObjectRef userFormRef)
           
 void setViewUserForm(com.waveset.object.Configuration viewUserForm)
           
 void setViewUserFormRef(com.waveset.object.ObjectRef viewUserFormRef)
           
 
Methods inherited from class com.waveset.object.PersistentObject
addMemberObjectGroup, addMemberObjectGroup, addXmlHeader, attributesMatch, attributesMatch, attributesMatch, checkReference, checkReferences, clearId, cloneAs, cloneObject, compareTo, create, create, create, create, createLastModItem, createLastModItem, createLastModItemList, directObjectGroupMember, dump, dumpFile, equals, getAttribute, getAttributeValues, getAuthReferences, getAuthType, getBasicAttributes, getBasicAttributes, getBasicAttributes, getCache, getCounterValue, getCreateDate, getCreator, getDisplayableName, getDisplayName, getElementName, getId, getIdOrName, getInitialInstances, getLastMod, getLastModDate, getLastModifier, getLastModItemId, getLockInfo, getMemberObjectGroupRefs, getMemberObjectGroupRefsUpTo, getMemberObjectGroups, getName, getNameOrId, getPrimaryObjectClass, getProperties, getProperty, getPropertyAsString, getPropertyList, getQueryableAttributes, getReference, getRepositoryMod, getRuleDrivenMemberObjectGroupRefs, getRuleDrivenMemberObjectGroupRefsUpTo, getRuleDrivenMemberObjectGroups, getSubtype, getSummaryAttributes, getSummaryString, getType, getXMLSize, hasEncryptedData, hashCode, identityEquals, isAlias, isHidden, isProtected, isProtectedFromDelete, isReferencedIn, listOperationalAttributes, objectGroupMember, objectGroupMemberRef, prepareForSerialization, prepareToSerialize, reEncrypt, removeMemberObjectGroup, removeProperty, resolve, resolve, resolve, resolveArray, resolveArrayByFetching, resolveObjectReferences, resolveReference, resolveSummaryAttributes, resolveSummaryAttributes, ruleDrivenObjectGroupMemberRef, setAuthType, setAuthType, setCache, setDisplayName, setDisplayName, setHidden, setIsAlias, setMemberObjectGroupRef, setMemberObjectGroupRefs, setMemberObjectGroups, setName, setProperties, setProperty, setPropertyList, setRuleDrivenMembersCache, setSubtype, setTrace, toString, toXml, toXml, toXml, toXmlFile, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

LAST_LOGIN_LOCALE_PROP

public static final java.lang.String LAST_LOGIN_LOCALE_PROP
The name of the property used to store the locale where the user last logged in. If the user has not explicitly set their locale, this is used as a hint of the user's locale. It's set each time the user logs in. See LOCALE_PROP for more information including the format of the stored value.

See Also:
Constant Field Values

LOCALE_PROP

public static final java.lang.String LOCALE_PROP
The name of the property used to store the locale of the user. This was originally added to enable localized email messages. The value is determined by Locale.toString(), e.g. "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr__MAC". This allows us to store the language, country, and variant. See bug 9597 for more information.

See Also:
Constant Field Values

USER_FORM_NAME

public static final java.lang.String USER_FORM_NAME
See Also:
Constant Field Values

VIEW_USER_FORM_NAME

public static final java.lang.String VIEW_USER_FORM_NAME
See Also:
Constant Field Values
Constructor Detail

Principal

public Principal(com.sun.idm.object.IDMObjectClass objectClass)

Principal

public Principal(com.sun.idm.object.IDMObjectClass objectClass,
                 java.lang.String name)

Principal

public Principal(Principal src)
          throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException
Method Detail

addAdminGroup

public void addAdminGroup(com.waveset.object.AdminGroup ag)
                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

addAdminGroupRef

public void addAdminGroupRef(com.waveset.object.ObjectRef ref)
Add one approver to our approver list.


addControlledObjectGroup

public void addControlledObjectGroup(ObjectGroup og)

addPermission

public void addPermission(com.waveset.object.Permission perm)

clearAdminGroups

public void clearAdminGroups()

getAdminGroupRefs

public java.util.ArrayList getAdminGroupRefs()

getAdminGroups

public com.waveset.object.AdminGroup[] getAdminGroups()
                                               throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getAdminGroupsRuleRef

public com.waveset.object.ObjectRef getAdminGroupsRuleRef()

getAdminRoleRefs

public java.util.List getAdminRoleRefs()

getAdminRoles

public java.util.List getAdminRoles()
                             throws com.waveset.util.WavesetException
Resolve and return the list of admin role objects.

Throws:
com.waveset.util.WavesetException

getControlledObjectGroupRefs

public java.util.ArrayList getControlledObjectGroupRefs()

getControlledObjectGroups

public ObjectGroup[] getControlledObjectGroups()
                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getControlledObjectGroupsRuleRef

public com.waveset.object.ObjectRef getControlledObjectGroupsRuleRef()

getCustomForm

public com.waveset.object.ObjectRef getCustomForm(java.lang.String key)
Get the ObjectRef for a particular key in the per-user custom form list.

Parameters:
key - - index name of the form
Returns:
ObjectRef associated with key, or null

getCustomFormKeys

public java.util.List getCustomFormKeys()
Return the keys for all the custom forms currently held by Principal.

Returns:
List of names of all custom forms. If no custom forms are held an empty list is returned.

getEncryptedValues

public java.util.List getEncryptedValues()
Overrides:
getEncryptedValues in class PersistentObject
Returns:
the complete set of object values whose type is encrypted data (regardless of whether this object has a value for each).

Any subclass of PersistentObject that overrides this method must first invoke super.getEncryptedValues() to ensure that the list of encrypted values for PersistentObjects are included in the subclasses list.


getPermissions

public com.waveset.object.Permission[] getPermissions()

getReferences

public java.util.ArrayList getReferences()
Return the list of references within this object.

Overrides:
getReferences in class PersistentObject

getUserForm

public com.waveset.object.Configuration getUserForm()
                                             throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUserFormId

public java.lang.String getUserFormId()

getUserFormRef

public com.waveset.object.ObjectRef getUserFormRef()

getViewUserForm

public com.waveset.object.Configuration getViewUserForm()
                                                 throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getViewUserFormId

public java.lang.String getViewUserFormId()

getViewUserFormRef

public com.waveset.object.ObjectRef getViewUserFormRef()

hasCapabilities

public boolean hasCapabilities()

listQueryableAttributes

public java.util.List listQueryableAttributes()
Overrides:
listQueryableAttributes in class PersistentObject
Returns:
the complete list of defined attributes that this type of persistent object exposes as queryable attributes (regardless of whether this particular object has a value for each).

Any subclass of PersistentObject that overrides this method should first invoke super.listQueryableAttributes() to ensure that the subclass includes queryable attributes that are common to all PersistentObjects.


listQueryableReferenceAttributes

public java.util.List listQueryableReferenceAttributes()
Overrides:
listQueryableReferenceAttributes in class PersistentObject
Returns:
the list of defined attributes that this type of persistent object supports as queryable attributes and for which each value is a reference to another persistent object.

Any subclass of Principal that overrides this method must first invoke super.listQueryableReferenceAttributes() to ensure that the following attributes are returned as queryable reference attributes for all Principals.

  • MemberAdminGroups
  • ControlledObjectGroups
  • AdminRoles

listSummaryAttributes

public java.util.List listSummaryAttributes()
Description copied from class: PersistentObject
Returns the complete list of defined attributes that this type of persistent object exposes as summary attributes (regardless of whether this particular object has a value for each).

Any subclass of PersistentObject that overrides this method should first invoke super.listSummaryAttributes() to ensure that the subclass includes summary attributes that are common to all PersistentObjects.

Any subclass that overrides this implementation must also consider the length of the summary string that will be generated from these attributes.

Overrides:
listSummaryAttributes in class PersistentObject
Returns:
the complete list of defined attributes that this type of persistent object exposes as summary attributes (regardless of whether this particular object has a value for each).

Any subclass of PersistentObject that overrides this method should first invoke super.listSummaryAttributes() to ensure that the subclass includes summary attributes that are common to all PersistentObjects.

See Also:
Constants.MAX_SUMMARY_STRING_LENGTH, PersistentObject.getSummaryString()

parsePermissions

public static com.waveset.object.Permission[] parsePermissions(org.w3c.dom.Element e)
                                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

removeAdminGroup

public void removeAdminGroup(com.waveset.object.AdminGroup ag)

removeControlledObjectGroup

public void removeControlledObjectGroup(ObjectGroup og)

removePermission

public void removePermission(com.waveset.object.Permission perm)

setAdminGroupRefs

public void setAdminGroupRefs(java.util.List refs)

setAdminGroups

public void setAdminGroups(com.waveset.object.AdminGroup[] agarray)
                    throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

setAdminGroupsRuleRef

public void setAdminGroupsRuleRef(com.waveset.object.ObjectRef adminGroupsRuleRef)

setAdminRoleRefs

public void setAdminRoleRefs(java.util.List adminRoles)

setAdminRoles

public void setAdminRoles(java.util.List adminRoles)
set the list of admin roles.

Parameters:
adminRoles - - List of ObjectRefs or Admin Role objects

setControlledObjectGroupRefs

public void setControlledObjectGroupRefs(java.util.List refs)
Has to be public, its called by AccessPolicy.


setControlledObjectGroups

public void setControlledObjectGroups(ObjectGroup[] ogarray)

setControlledObjectGroupsRuleRef

public void setControlledObjectGroupsRuleRef(com.waveset.object.ObjectRef controlledObjectGroupsRuleRef)

setCustomForm

public void setCustomForm(java.lang.String key,
                          com.waveset.object.ObjectRef form)
Set a name and (Form) ObjectRef pair on the object. These are used by parts of IdM that need per-user customizations of Forms. Specific examples are the attestation and remediation list viewers, which allow an IdM user to specify a specific form to be used when viewing the list of WorkItems. This method is used to support the binding of arbitrary name/ObjectRef pairs to the Principal (and thus the WSUser object).

Parameters:
key - - the index name of the form
form - - object ref of the form

setPermissions

public void setPermissions(com.waveset.object.Permission[] permissions)

setUserForm

public void setUserForm(com.waveset.object.Configuration userForm)

setUserFormRef

public void setUserFormRef(com.waveset.object.ObjectRef userFormRef)

setViewUserForm

public void setViewUserForm(com.waveset.object.Configuration viewUserForm)

setViewUserFormRef

public void setViewUserFormRef(com.waveset.object.ObjectRef viewUserFormRef)