com.waveset.object
Class WSUser

java.lang.Object
  extended bycom.waveset.object.PersistentObject
      extended bycom.waveset.object.Principal
          extended bycom.waveset.object.WSUser
All Implemented Interfaces:
java.lang.Comparable, javax.naming.Referenceable, java.io.Serializable, XmlObject

public class WSUser
extends Principal

The memory representation for a Waveset user account.

Beyond a set of "special" attributes like id, password, and email address, the user may also have set of arbitrary attributes.

Each user normally has a role which defines a set of resources as well as security options to apply to this user. The role may be changed as time goes on, so we also must maintain a list of the resource accounts that are currently provisioned.

See Also:
Serialized Form

Nested Class Summary
static class WSUser.Delegate
          A class used to hold the set of capabilities and that have been delegated to other users by this user (e.g.
 
Nested classes inherited from class com.waveset.object.PersistentObject
PersistentObject.Comparator, PersistentObject.InitialInstance
 
Field Summary
static java.lang.String ALL_INTERFACES
          Value of the loginInterface argument indicating the "All Interfaces" value.
static java.lang.String code_id
           
static java.lang.String CORRELATION_KEY
           
static java.lang.String PASSWORD_EXPIRATION
           
static java.lang.String POLICIES
           
static java.lang.String ROLE
           
static java.lang.String ROLES
           
 
Fields inherited from class com.waveset.object.Principal
_adminGroupRefs, _adminGroups, _adminGroupsRuleRef, _adminRoleRefs, _controlledObjectGroupRefs, _controlledObjectGroups, _controlledObjectGroupsRuleRef, _permissions, _userFormRef, _viewUserFormRef, LAST_LOGIN_LOCALE_PROP, LOCALE_PROP
 
Fields inherited from class com.waveset.object.PersistentObject
_trace, trace
 
Constructor Summary
WSUser()
          Create an empty user object.
WSUser(Administrator admin)
          Note that this constructor is to be used strictly for migration/conversion of the old Administrator Type to Users.
WSUser(org.w3c.dom.Element e)
          Create a user object by parsing its DOM representation.
WSUser(java.lang.String xml)
          Create a user object by parsing its XML representation.
WSUser(java.lang.String name, java.lang.String noop)
           
WSUser(WSUser user)
          Create a basic Waveset User from an existing Waveset User.
 
Method Summary
 void addAuditPolicyRef(ObjectRef ref)
           
 void addPasswordToPasswordHistory(byte[] newPassword, Policy pwdpol)
          Add to the new password to the top of the list of previous passwords
 void addPasswordToPasswordHistory(byte[] newPassword, java.lang.String enc, Policy pwdpol)
           
 void addPolicyRef(ObjectRef ref)
           
 void addPrivateService(ObjectRef ref)
          Add a private service to the list.
 void addPrivateService(Service s)
          Add a private service to the list.
 void addPrivateServices(java.util.List src)
          Add a list of private services.
 void addResourceIdentity(ResourceIdentity rid)
          Add information about a resource identity.
 void addResourceInfo(ResourceInfo info)
          Add information about a resource account.
 void addRole(ObjectRef ref)
          Set the role reference.
 void addRole(Role role)
          Set the role.
 void addRoleRef(ObjectRef ref)
          Set the role reference.
protected  void addSubclassAttributes(java.lang.StringBuffer buf)
          Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist).
protected  void addSubclassElements(java.lang.StringBuffer buf)
          Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist).
 void applyAssignmentExclusions(java.util.Collection assignments)
           
static void applyAssignmentExclusions(java.util.Collection assignments, java.util.Collection exclusions)
          Static utility method to apply an exclusion list.
 void applyExclusions(java.util.Collection resources)
           
static void applyExclusions(java.util.Collection resources, java.util.Collection exclusions)
           
 java.util.List applyExclusions(java.util.List resources)
          Given a flattened list of Resource objects such as that returned by Service.getFlatResources, return a new list filtered to remove any Resources that are on this user's exclusion list.
static java.util.List applyExclusions(java.util.List resources, java.util.List exclusions)
          Static utility method to apply an exclusion list.
 void checkManagerAttribute(WSUser changedUser)
           
 void clearAnswers()
          Remove all answers from this user.
 void clearAnswers(java.lang.String loginInterface)
          Remove all answers for the specified login interface from this user.
 void clearResourceIdentities()
          Remove all the resource identity objects from the user.
 void clearResourceInfo()
          Remove all the resource info objects from the user.
 void clearWSAttributes()
           
 void convertAdminInfo(Administrator admin, java.lang.String option)
           
 int countProvisionedAccounts()
           
 void dumpSummary(java.lang.String file)
           
 void expirePassword()
          Sets the password expiration date to yesterday's date to force the next check to see if the password is expired to return true
 void filterPrivateServices(Type type)
          Filter the service list based on type.
 void forceProvisioned(boolean on)
           
 void fromMap(java.util.Map map, boolean checkRequiredAttributes)
          Assemble a user object from a map of name value pairs.
 boolean generateTemporaryIds()
          Walk over the ResourceInfo list looking for those that do not have an account id and make sure they have a temporary id.
 java.lang.String getAccountId()
          Get the account id.
 java.lang.String getAccountId(Resource r)
           
 java.util.Set getAllPrivateResourceAssignments()
           
 java.util.List getAllPrivateResources()
          Get a flat list of resolved resources.
 Answer getAnswer(java.lang.String id)
          Get the answer object with a given id.
 Answer[] getAnswers()
          Get the array of authentication answer objects assigned to this user.
 Answer[] getAnswers(java.lang.String loginInterface)
           
 WSUser.Delegate getApproverDelegate()
           
 Resource getAssignedResource(java.lang.String resNameOrId)
           
 java.util.List getAssignedResourceList()
          Return a flat list of Resource objects for all resources assigned directly or indirectly to this user.
 Resource[] getAssignedResources()
          Return a flat list of Resource objects assigned to this user.
 java.util.List getAssignmentList()
          Return a flat list of Resource objects plus any qualifiers for all qualified resources assigned directly or indirectly to this user.
 java.lang.String getAttribute(java.lang.String attrId)
          Get the value of an account attribute as a string.
protected  WSAttribute getAttributeValues(java.lang.String attrName)
           
 java.util.List getAuditPolicyRefs()
           
 java.util.ArrayList getAuthReferences()
          Return the list of references that should be access checked when changed.
 java.lang.String getCorrelationKey()
          Get the correlation key.
 java.util.List getCurrentServiceRefs()
           
 java.util.List getDelegateHistory()
           
 java.util.List getDelegates()
           
protected static int getDisabledLevel(WSUser user)
           
 java.lang.String getEmail()
          Get the email address of this user.
 java.util.List getEncryptedValues()
           
 java.util.List getExclusionRefs()
          Get the list of resource exclusions.
 java.util.List getExclusions()
          Get a resolved list of resource exclusions.
 java.util.List getExpandedAdminGroupRefs()
           
 java.util.List getExpandedControlledObjectGroupRefs()
           
 boolean getExternal()
           
 int getFailedPasswordLoginAttemptsCount()
           
 int getFailedQuestionLoginAttemptsCount()
           
 WSUser getForwardAdmin()
           
 ObjectRef getForwardAdminRef()
           
 WSUser getIdmManager()
           
 java.lang.String getIdmManagerId()
           
 java.lang.String getIdmManagerName()
           
 ObjectRef getIdmManagerRef()
           
static Attribute getInbuiltAttr(java.lang.String name)
           
static Attribute[] getInbuiltAttrs()
           
 Keychain getKeychain()
          Get the SSO keychain.
 java.util.Date getLastAuditorScan()
           
 long getLastPasswordUpdate()
           
 java.util.Date getLockExpiry()
          Get the lock expiration date.
 EncryptedData getPassword()
          Get the user's password.
 java.util.Date getPasswordExpiry()
          Get the password expiration date.
 java.util.Date getPasswordExpiryWarning()
          Get the password expiration warning date.
 java.util.List getPasswordHistory()
          Get the current list of stored previous passwords
 java.util.List getPolicyRefs()
           
 java.util.List getPrivateApplicationRefs()
          Get the list of private application references.
 java.util.List getPrivateApplications()
          Get a resolved list of private Applications.
 java.util.List getPrivateAuditPolicies()
           
 java.util.List getPrivatePolicies()
           
 java.util.List getPrivateResourceAssignmentRefs()
           
 java.util.List getPrivateResourceAssignments()
           
 java.util.ArrayList getPrivateResourceRefs()
          Get the list of private resource references.
 java.util.List getPrivateResources()
          Get a resolved list of private Resources.
 java.util.ArrayList getPrivateServiceRefs()
          Get the list of private service references.
 java.util.List getPrivateServices()
          Get a resolved list of private services.
 java.util.ArrayList getReferences()
          Return the list of references within this object.
 java.util.List getResetHistory()
          Get the password reset history.
 ResourceIdentity[] getResourceIdentities()
          Return the array of resource identity information.
 ResourceIdentity getResourceIdentity(Resource res)
          Find a resource identity given a Resource object.
 ResourceIdentity getResourceIdentity(java.lang.String name)
          Find a resource identity given a name or ID (usually a name).
 java.util.List getResourceIds(java.util.List refs)
          Given a list of references to Resources, normalize it into a list of repository ids or names.
 ResourceInfo[] getResourceInfo()
          Return the array of resource account information.
 ResourceInfo getResourceInfo(Resource res)
          Return the information about a specific resource account associated with this user.
 ResourceInfo getResourceInfo(ResourceInfo src)
          Look for a ResourceInfo on this user whose identity matches that of the supplied ResourceInfo object.
 ResourceInfo getResourceInfo(Resource resource, java.lang.String accountId)
           
 ResourceInfo getResourceInfo(java.lang.String resName)
          Return the information about a specific resource account associated with this user.
 ResourceInfo getResourceInfo(java.lang.String resname, java.lang.String accountId)
          Look for a ResourceInfo with the given resource name and id.
 java.util.List getResourceInfos(Resource res)
          Return a list of ResourceInfo objects associated with the given resource.
 java.util.List getResourceInfos(java.lang.String resName)
          Return a list of ResourceInfo objects associated with a resource with the given name.
 java.util.List getRoleAttributeRefs()
          Get all services associated with the user, then get their role attributes.
 java.util.List getRoleIds()
          Return a List of String ids of roles assigned to this user.
 java.util.List getRoleNames()
          Return a List of String names of roles assigned to this user.
 java.util.List getRoleRefs()
          Get the role reference.
 Resource[] getRoleResources()
          Return an array of all resources assigned through roles to this user.
 java.util.List getRoles()
          Resolve and return the role object.
 java.util.List getRoleServiceRefs()
          Return a List of ObjectRefs to all services assigned through roles to this user.
 WSAttributes getSummaryAttributes()
           
static Type[] getSummaryAttributeTypes()
          Types resolved by resolveSummaryAttributes
 Answer[] getSuppliedQuestionAnswers()
          Utility method to return Answers which have a suppliedQuestion set.
 Answer[] getSuppliedQuestionAnswers(java.lang.String loginInterface)
          Utility method to return just the answers to user supplied questions for the specified login interface.
 Type getType()
          Returns the associated Type object.
 WSAttribute getWSAttribute(java.lang.String attrId)
          Get an account attribute.
 WSAttributes getWSAttributes()
          Get the collection of all account attributes for this user.
 boolean hasAssignedResource(Resource r)
           
static boolean hasEncryptedData()
           
 boolean isDisabled()
          Test the account disabled flag.
 boolean isExternal()
          Test the external account flag.
static boolean isInbuiltAttribute(java.lang.String name)
          Returns true if this is the name of one of the built-in Waveset attributes that all user accounts must have.
 boolean isLocked()
           
 boolean isLockExpired()
           
 boolean isLoggedIn(Subject subject)
           
 boolean isLoggedInToApp(java.lang.String appName)
           
 boolean isNullAccountId()
           
 boolean isPasswordChanged()
          Test the password changed flag.
 boolean isPasswordExpired()
           
 boolean isQuestionLocked()
           
 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).
 void normalizeAssignments(java.util.List assigned)
          Normalize the ResourceInfo list given an existing assignment list.
 boolean normalizeResourceInfos()
          Normalize the resource info list based on assignments currently stored in the user.
 void normalizeResourceInfos(java.util.List assigned)
          Deprecated. in 6.0SP1, use normalizeResourceInfos() instead. More than just the list of assigned resources is required to normalize.
protected  void parseSubclassAttributes(org.w3c.dom.Element e)
          Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer).
protected  void parseSubclassElements(org.w3c.dom.Element e)
          Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer).
 void prepareForSerialization()
          We overload this to flesh out the ResourceInfo list according to our current assignments.
 WSAttribute putAttribute(WSAttribute attr)
          Set an account attribute, specifying through a WSAttribute object.
 void questionUnlock()
           
protected  void reEncryptSubclassAttributes()
          Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer).
 Answer removeAnswer(java.lang.String id)
          Remove one answer from the user, given its question id.
 WSAttribute removeAttribute(java.lang.String attrId)
           
 boolean removePrivateService(ObjectRef ref)
          Remove any private service reference that matches the specified service reference.
 boolean removePrivateService(Service service)
          Remove any private service reference that matches the specified service.
 void removeResourceIdentity(ResourceIdentity rid)
          Remove the information for one resource.
 void removeResourceInfo(ResourceInfo info)
          Remove the information for one resource.
 void removeResourceInfo(java.lang.String id)
          Remove the information for one resource.
protected  void resolveObjectReference(ObjectRef ref, PersistentObject owner, ObjectCache cache)
           
static void resolveSummaryAttributes(ObjectCache cache, WSAttributes attrs)
          Walk the summary attributes, translating the embedded IDs to names.
 void setAccountId(java.lang.String s)
          Sets the account id.
 void setAnswer(java.lang.String id, EncryptedData answer, java.lang.String loginInterface)
          Add or modify an answer.
 void setAnswer(java.lang.String id, java.lang.String answer, java.lang.String loginInterface)
          Add or modify an answer.
 void setAnswers(Answer[] answers)
           
 void setApproverDelegate(WSUser.Delegate approverDelegate)
           
 void setAttribute(java.lang.String attrId, java.lang.String value)
          Sets an abstract attribute.
 void setAuditPolicyRef(ObjectRef ref)
           
 void setAuditPolicyRefs(java.util.List auditPolicies)
           
 void setCorrelationKey(java.lang.String key)
          Set the correlation key.
 void setDelegateHistory(java.util.List delegateHistory)
           
 void setDelegates(java.util.List delegates)
           
 void setDisabled(boolean b)
          Set the account disabled flag.
 void setEmail(java.lang.String s)
          Set the email address of this user.
 void setExclusions(java.util.List refs)
          Set the list of resource exclusions.
protected  void setExpandedAdminGroupRefs(java.util.List expandedAdminGroupRefs)
           
protected  void setExpandedControlledObjectGroupRefs(java.util.List expandedControlledObjectGroupRefs)
           
 void setExternal(boolean b)
          Set the external account flag.
 void setFailedPasswordLoginAttemptsCount(int failedPasswordLoginAttemptsCount)
           
 void setFailedQuestionLoginAttemptsCount(int failedQuestionLoginAttemptsCount)
           
 void setForwardAdmin(ObjectRef ref)
           
 void setForwardAdmin(WSUser admin)
           
 void setIdmManager(java.lang.Object idmManager)
           
static void setInbuiltAttrs(Attribute[] userAttrs)
           
 void setKeychain(Keychain keys)
          Set the SSO keycain.
 void setLastAuditorScan(java.util.Date lastScan)
           
 void setLastPasswordChange(long millis)
           
 void setLocked(boolean b)
           
 void setLockExpiry(java.util.Date d)
          Set the lock expiration date.
 void setLoggedIn(Subject subject, boolean loggedIn)
           
 void setNullAccountId(boolean b)
           
 void setPassword(EncryptedData p)
          Set the user's password.
 void setPassword(java.lang.String p)
          Set the user's password.
 void setPasswordChanged(boolean passwordChanged)
           
 void setPasswordExpiry(java.util.Date d)
          Set the password expiration date.
 void setPasswordExpiryWarning(java.util.Date d)
          Set the password expiration warning date.
 void setPolicyRef(ObjectRef ref)
           
 void setPolicyRefs(java.util.List policies)
           
 void setPrivateServiceRefs(java.util.List refs)
          Set the list of private service references.
 void setQuestionLocked(boolean b)
           
 void setResetHistory(java.util.List hist)
          Sets the password reset history.
 void setResourceInfo(ResourceInfo[] infos)
          Assigned the full ResourceInfo array.
 void setRoleRef(ObjectRef ref)
           
 void setRoleRefs(java.util.List roles)
           
 void setRoles(java.util.List roles)
          set the roles.
 boolean setWSAttribute(java.lang.String attrId, java.lang.Object value)
          Sets an account attribute of supported types.
 WSAttribute setWSAttribute(WSAttribute attr)
          Set an account attribute.
 void setWSAttributes(WSAttributes attrs)
          Sets all of the account attributes for this user.
 void terminateLoggedIn(java.lang.String appName)
           
 java.util.HashMap toHashMap(boolean convertAttrValuesToStrings)
          Converts a WSUser object into a Map of name/value pairs.
 java.lang.String toIdentityString()
           
 java.lang.String toVerboseString()
           
 java.lang.String toVerboseString(java.lang.String indent)
           
 void unlock()
           
 void unlockAll()
           
 void visit(Visitor v)
          Visitor interface.
static AttributeCondition[] withAnyListedResource(java.util.List resoIdList)
           
static AttributeCondition[] withResource(Resource r)
           
static WSUser xcloneObject(WSUser src)
          Make a clone of the object, doing a deep copy where needed to prune ObjectRefs and protect Lists.
 
Methods inherited from class com.waveset.object.Principal
addAdminGroup, addAdminGroupRef, addCommonPrincipalElements, addControlledObjectGroup, addPermission, clearAdminGroups, getAdminGroupRefs, getAdminGroups, getAdminGroupsRuleRef, getAdminRoleRefs, getAdminRoles, getControlledObjectGroupRefs, getControlledObjectGroups, getControlledObjectGroupsRuleRef, getPermissions, getUserForm, getUserFormId, getUserFormRef, getViewUserForm, getViewUserFormId, getViewUserFormRef, hasCapabilities, parseCommonPrincipalElements, parsePermissions, removeAdminGroup, removeControlledObjectGroup, removePermission, setAdminGroupRefs, setAdminGroups, setAdminGroupsRuleRef, setAdminRoleRefs, setAdminRoles, setControlledObjectGroupRefs, setControlledObjectGroups, setControlledObjectGroupsRuleRef, setPermissions, setUserForm, setUserFormRef, setViewUserForm, setViewUserFormRef
 
Methods inherited from class com.waveset.object.PersistentObject
addCommonElements, addEndTag, addMemberObjectGroup, addMemberObjectGroup, addPersistentAttributes, addStartTag, addSummaryAttributes, addXmlHeader, attributesMatch, attributesMatch, attributesMatch, checkReference, checkReferences, clearId, cloneAs, cloneObject, compareTo, create, create, create, create, createLastModItem, createLastModItem, createLastModItemList, directObjectGroupMember, dump, dumpFile, equals, fakeId, getAttributeValues, getAuthType, getBasicAttributes, getBasicAttributes, getBasicAttributes, getCache, getCounterValue, getCreateDate, getCreator, getDisplayableName, getDisplayName, getElementName, getId, getIdOrName, getInitialInstances, getLastMod, getLastModDate, getLastModifier, getLastModItemId, getLockInfo, getMemberObjectGroupRefs, getMemberObjectGroupRefsUpTo, getMemberObjectGroups, getName, getNameOrId, getProperties, getProperty, getPropertyAsString, getPropertyList, getQueryableAttributes, getReference, getRuleDrivenMemberObjectGroupRefs, getRuleDrivenMemberObjectGroupRefsUpTo, getRuleDrivenMemberObjectGroups, getSubtype, getSummaryString, hashCode, identityEquals, isAlias, isHidden, isId, isProtected, isProtectedFromDelete, isReferencedIn, listOperationalAttributes, objectGroupMember, objectGroupMemberRef, parseCommonElement, parseCommonElements, parsePersistentAttributes, parseXml, parseXml, prepareToSerialize, println, reEncrypt, removeMemberObjectGroup, removeProperty, resolve, resolve, resolve, resolveArray, resolveArrayByFetching, resolveObjectReferences, resolveReference, resolveSummaryAttributes, ruleDrivenObjectGroupMemberRef, setAuthType, setAuthType, setCache, setCreateDate, setCreator, setDisplayName, setDisplayName, setHidden, setIsAlias, setLastMod, setLastMod, setLastModDate, setLastModifier, setMemberObjectGroupRef, setMemberObjectGroupRefs, setMemberObjectGroups, setName, setProperties, setProperty, setPropertyList, setProtected, setProtectedFromDelete, setRuleDrivenMembersCache, setSubtype, setTrace, toString, toXml, toXml, toXml, toXmlFile
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

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

ROLE

public static final java.lang.String ROLE

ROLES

public static final java.lang.String ROLES

POLICIES

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

CORRELATION_KEY

public static final java.lang.String CORRELATION_KEY

PASSWORD_EXPIRATION

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

ALL_INTERFACES

public static final java.lang.String ALL_INTERFACES
Value of the loginInterface argument indicating the "All Interfaces" value. This is currently the message catalog key which is unwieldy, if we must use keys for these things, can we rewrite them so they have shorter more obvious names?

See Also:
Constant Field Values
Constructor Detail

WSUser

public WSUser()
Create an empty user object.


WSUser

public WSUser(java.lang.String xml)
       throws WavesetException
Create a user object by parsing its XML representation.


WSUser

public WSUser(org.w3c.dom.Element e)
       throws WavesetException
Create a user object by parsing its DOM representation.


WSUser

public WSUser(WSUser user)
       throws WavesetException
Create a basic Waveset User from an existing Waveset User. The new user will only have the following attributes set - accountId - password - confirmpassword (if non-null) - role - privateResourceRefs - memberObjectGroups


WSUser

public WSUser(java.lang.String name,
              java.lang.String noop)

WSUser

public WSUser(Administrator admin)
       throws WavesetException
Note that this constructor is to be used strictly for migration/conversion of the old Administrator Type to Users. The only caller should be Importer cmdConvert Create a Waveset User with capabilities from an existing Waveset Administrator. New users will only have the following attributes set: - name - id (for built-in admins only - e.g. #ID#Configurator) - password - permissions - adminGroupRefs - controlledObjectGroupRefs - userFormRef - forwardAdmin - memberObjectGroups

Method Detail

visit

public void visit(Visitor v)
           throws WavesetException
Visitor interface.

Overrides:
visit in class PersistentObject
Throws:
WavesetException

countProvisionedAccounts

public int countProvisionedAccounts()

xcloneObject

public static WSUser xcloneObject(WSUser src)
                           throws WavesetException
Make a clone of the object, doing a deep copy where needed to prune ObjectRefs and protect Lists. Because there is already a shallow copy constructor, make an explicit method (ugh)

Throws:
WavesetException

convertAdminInfo

public void convertAdminInfo(Administrator admin,
                             java.lang.String option)
                      throws WavesetException
Throws:
WavesetException

getType

public Type getType()
Returns the associated Type object.

Specified by:
getType in class PersistentObject

getReferences

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

Overrides:
getReferences in class Principal

getAuthReferences

public java.util.ArrayList getAuthReferences()
Return the list of references that should be access checked when changed.

Overrides:
getAuthReferences in class PersistentObject

setPolicyRefs

public void setPolicyRefs(java.util.List policies)

setPolicyRef

public void setPolicyRef(ObjectRef ref)

addPolicyRef

public void addPolicyRef(ObjectRef ref)

getPolicyRefs

public java.util.List getPolicyRefs()

getPrivatePolicies

public java.util.List getPrivatePolicies()
                                  throws WavesetException
Returns:
a List of Policy objects, resolved from getPolicyRefs
Throws:
WavesetException

getPasswordExpiry

public java.util.Date getPasswordExpiry()
Get the password expiration date.


setPasswordExpiry

public void setPasswordExpiry(java.util.Date d)
Set the password expiration date.


expirePassword

public void expirePassword()
Sets the password expiration date to yesterday's date to force the next check to see if the password is expired to return true


isPasswordExpired

public boolean isPasswordExpired()

getPasswordExpiryWarning

public java.util.Date getPasswordExpiryWarning()
Get the password expiration warning date.


setPasswordExpiryWarning

public void setPasswordExpiryWarning(java.util.Date d)
Set the password expiration warning date.


getLockExpiry

public java.util.Date getLockExpiry()
Get the lock expiration date.


setLockExpiry

public void setLockExpiry(java.util.Date d)
Set the lock expiration date.


isLockExpired

public boolean isLockExpired()

getCorrelationKey

public java.lang.String getCorrelationKey()
Get the correlation key.


setCorrelationKey

public void setCorrelationKey(java.lang.String key)
Set the correlation key.


isExternal

public boolean isExternal()
Test the external account flag.


setExternal

public void setExternal(boolean b)
Set the external account flag.

Setting this to true indicates that the ResourceInfo list attached to this user is to be treated as the immutable definition of resource accounts. Reprovisioning operations will obey this list, regardless of what role the user is assigned to.


getExternal

public boolean getExternal()

getResetHistory

public java.util.List getResetHistory()
Get the password reset history.

This is a list of Date objects representing the times at which the password was reset. This is not necessarily the complete list, it may be cleaned periodically by the provisioning engine. Note that the returned list is mutable, you do not need to call setResetHistory to record list modifications.


setResetHistory

public void setResetHistory(java.util.List hist)
Sets the password reset history.

The provisioning engine will want to add elements to the history list, and may age selected entries out of the list.


getKeychain

public Keychain getKeychain()
Get the SSO keychain. The chain and the keys may be modified.


setKeychain

public void setKeychain(Keychain keys)
Set the SSO keycain.


isDisabled

public boolean isDisabled()
Test the account disabled flag.


setDisabled

public void setDisabled(boolean b)
Set the account disabled flag.


isLocked

public boolean isLocked()

setLocked

public void setLocked(boolean b)

isQuestionLocked

public boolean isQuestionLocked()

setQuestionLocked

public void setQuestionLocked(boolean b)

unlock

public void unlock()

questionUnlock

public void questionUnlock()

unlockAll

public void unlockAll()

getFailedPasswordLoginAttemptsCount

public int getFailedPasswordLoginAttemptsCount()

setFailedPasswordLoginAttemptsCount

public void setFailedPasswordLoginAttemptsCount(int failedPasswordLoginAttemptsCount)

getFailedQuestionLoginAttemptsCount

public int getFailedQuestionLoginAttemptsCount()

setFailedQuestionLoginAttemptsCount

public void setFailedQuestionLoginAttemptsCount(int failedQuestionLoginAttemptsCount)

isLoggedIn

public boolean isLoggedIn(Subject subject)

isLoggedInToApp

public boolean isLoggedInToApp(java.lang.String appName)

setLoggedIn

public void setLoggedIn(Subject subject,
                        boolean loggedIn)

terminateLoggedIn

public void terminateLoggedIn(java.lang.String appName)

setNullAccountId

public void setNullAccountId(boolean b)

isNullAccountId

public boolean isNullAccountId()

getLastPasswordUpdate

public long getLastPasswordUpdate()

setLastPasswordChange

public void setLastPasswordChange(long millis)

getRoleRefs

public java.util.List getRoleRefs()
Get the role reference.


addRoleRef

public void addRoleRef(ObjectRef ref)
Set the role reference.


addRole

public void addRole(ObjectRef ref)
Set the role reference.


getRoles

public java.util.List getRoles()
                        throws WavesetException
Resolve and return the role object.

Throws:
WavesetException

addRole

public void addRole(Role role)
Set the role.


setRoles

public void setRoles(java.util.List roles)
set the roles.

Parameters:
roles - - List of ObjectRefs to Role objects

setRoleRefs

public void setRoleRefs(java.util.List roles)

setRoleRef

public void setRoleRef(ObjectRef ref)

getRoleResources

public Resource[] getRoleResources()
                            throws WavesetException
Return an array of all resources assigned through roles to this user.

Throws:
WavesetException

getRoleServiceRefs

public java.util.List getRoleServiceRefs()
                                  throws WavesetException
Return a List of ObjectRefs to all services assigned through roles to this user. Since roles are now services and can be ordered, return the roles and applications instead of their resources. Note that this list includes only Role or Application objects, not Resources. // jsl - this name is wrong since Resources are also Services.

Throws:
WavesetException

getRoleIds

public java.util.List getRoleIds()
                          throws WavesetException
Return a List of String ids of roles assigned to this user.

Throws:
WavesetException

getRoleNames

public java.util.List getRoleNames()
                            throws WavesetException
Return a List of String names of roles assigned to this user.

Throws:
WavesetException

getPrivateServiceRefs

public java.util.ArrayList getPrivateServiceRefs()
Get the list of private service references.


setPrivateServiceRefs

public void setPrivateServiceRefs(java.util.List refs)
Set the list of private service references.


getPrivateApplicationRefs

public java.util.List getPrivateApplicationRefs()
Get the list of private application references.


getPrivateResourceRefs

public java.util.ArrayList getPrivateResourceRefs()
Get the list of private resource references.


getPrivateResourceAssignmentRefs

public java.util.List getPrivateResourceAssignmentRefs()

getPrivateServices

public java.util.List getPrivateServices()
                                  throws WavesetException
Get a resolved list of private services.

Throws:
WavesetException

getPrivateResources

public java.util.List getPrivateResources()
                                   throws WavesetException
Get a resolved list of private Resources.

Throws:
WavesetException

getPrivateResourceAssignments

public java.util.List getPrivateResourceAssignments()
                                             throws WavesetException
Throws:
WavesetException

getPrivateApplications

public java.util.List getPrivateApplications()
                                      throws WavesetException
Get a resolved list of private Applications.

Throws:
WavesetException

getAllPrivateResources

public java.util.List getAllPrivateResources()
                                      throws WavesetException
Get a flat list of resolved resources.

Throws:
WavesetException

getAllPrivateResourceAssignments

public java.util.Set getAllPrivateResourceAssignments()
                                               throws WavesetException
Throws:
WavesetException

addPrivateService

public void addPrivateService(ObjectRef ref)
Add a private service to the list.


addPrivateService

public void addPrivateService(Service s)
Add a private service to the list.


addPrivateServices

public void addPrivateServices(java.util.List src)
Add a list of private services.


removePrivateService

public boolean removePrivateService(ObjectRef ref)
Remove any private service reference that matches the specified service reference. Returns whether or not any service was removed.


removePrivateService

public boolean removePrivateService(Service service)
Remove any private service reference that matches the specified service. Returns whether or not any service was removed.


filterPrivateServices

public void filterPrivateServices(Type type)
Filter the service list based on type.


setExclusions

public void setExclusions(java.util.List refs)
Set the list of resource exclusions.


getExclusionRefs

public java.util.List getExclusionRefs()
Get the list of resource exclusions.


getExclusions

public java.util.List getExclusions()
                             throws WavesetException
Get a resolved list of resource exclusions.

Throws:
WavesetException

applyExclusions

public java.util.List applyExclusions(java.util.List resources)
Given a flattened list of Resource objects such as that returned by Service.getFlatResources, return a new list filtered to remove any Resources that are on this user's exclusion list.


applyExclusions

public void applyExclusions(java.util.Collection resources)

applyAssignmentExclusions

public void applyAssignmentExclusions(java.util.Collection assignments)

applyExclusions

public static java.util.List applyExclusions(java.util.List resources,
                                             java.util.List exclusions)
Static utility method to apply an exclusion list.


applyExclusions

public static void applyExclusions(java.util.Collection resources,
                                   java.util.Collection exclusions)

applyAssignmentExclusions

public static void applyAssignmentExclusions(java.util.Collection assignments,
                                             java.util.Collection exclusions)
Static utility method to apply an exclusion list.


getAssignedResourceList

public java.util.List getAssignedResourceList()
                                       throws WavesetException
Return a flat list of Resource objects for all resources assigned directly or indirectly to this user. The exclusion list will be applied. The list is relatively expensive to compute and is not retained, so if you need to call this more than once, keep the list.

Throws:
WavesetException

getAssignmentList

public java.util.List getAssignmentList()
                                 throws WavesetException
Return a flat list of Resource objects plus any qualifiers for all qualified resources assigned directly or indirectly to this user. The exclusion list will be applied. This list is relatively expensive to compute and is not retained, so if you need to call this more than once, keep the list.

Throws:
WavesetException

getAssignedResources

public Resource[] getAssignedResources()
                                throws WavesetException
Return a flat list of Resource objects assigned to this user. Same as getAssignedResourceList but converts it to an array.

Throws:
WavesetException

getAssignedResource

public Resource getAssignedResource(java.lang.String resNameOrId)
                             throws WavesetException
Throws:
WavesetException

hasAssignedResource

public boolean hasAssignedResource(Resource r)
                            throws WavesetException
Throws:
WavesetException

normalizeResourceInfos

public void normalizeResourceInfos(java.util.List assigned)
                            throws WavesetException
Deprecated. in 6.0SP1, use normalizeResourceInfos() instead. More than just the list of assigned resources is required to normalize.

Normalize the ResourceInfo list given an existing assignment list. With the introduction of exclusions, it is also necessary to remove any ResourceInfos for for resources that were formerly assigned, but not yet created. Without this, the user may show with the "provisioning needed" icon since getSummaryProvisioningLevel just looks at ResourceInfos not current assignments.

Throws:
WavesetException

normalizeAssignments

public void normalizeAssignments(java.util.List assigned)
                          throws WavesetException
Normalize the ResourceInfo list given an existing assignment list. With the introduction of exclusions, it is also necessary to remove any ResourceInfos for for resources that were formerly assigned, but not yet created. Without this, the user may show with the "provisioning needed" icon since getSummaryProvisioningLevel just looks at ResourceInfos not current assignments.

Throws:
WavesetException

getResourceIds

public java.util.List getResourceIds(java.util.List refs)
Given a list of references to Resources, normalize it into a list of repository ids or names.


normalizeResourceInfos

public boolean normalizeResourceInfos()
                               throws WavesetException
Normalize the resource info list based on assignments currently stored in the user. Returns true if any new temporary ids were generated. This is sometimes used as a signal to the view handler that it needs to save this WSUser so the view objects can be later be correlated with the ResourceInfos.

Throws:
WavesetException

getCurrentServiceRefs

public java.util.List getCurrentServiceRefs()
                                     throws WavesetException
Throws:
WavesetException

getRoleAttributeRefs

public java.util.List getRoleAttributeRefs()
                                    throws WavesetException
Get all services associated with the user, then get their role attributes. jsl - this doesn't appear to be called anywhere

Throws:
WavesetException

getForwardAdminRef

public ObjectRef getForwardAdminRef()

getForwardAdmin

public WSUser getForwardAdmin()
                       throws WavesetException
Throws:
WavesetException

setForwardAdmin

public void setForwardAdmin(WSUser admin)

setForwardAdmin

public void setForwardAdmin(ObjectRef ref)

getIdmManagerRef

public ObjectRef getIdmManagerRef()

getIdmManager

public WSUser getIdmManager()
                     throws WavesetException
Throws:
WavesetException

getIdmManagerName

public java.lang.String getIdmManagerName()

getIdmManagerId

public java.lang.String getIdmManagerId()

setIdmManager

public void setIdmManager(java.lang.Object idmManager)

getDelegates

public java.util.List getDelegates()

getApproverDelegate

public WSUser.Delegate getApproverDelegate()

setDelegates

public void setDelegates(java.util.List delegates)

setApproverDelegate

public void setApproverDelegate(WSUser.Delegate approverDelegate)

getDelegateHistory

public java.util.List getDelegateHistory()

setDelegateHistory

public void setDelegateHistory(java.util.List delegateHistory)

getAttribute

public java.lang.String getAttribute(java.lang.String attrId)
Get the value of an account attribute as a string.

A convenience method that hides WSAttribute handling, since most attributes are strings.

Overrides:
getAttribute in class PersistentObject

setAttribute

public void setAttribute(java.lang.String attrId,
                         java.lang.String value)
Sets an abstract attribute.

A convenience method for string valued attributes that hides the WSAttribute manipulation.


getAccountId

public java.lang.String getAccountId()
Get the account id.

This is a convenience method for a standard attribute. You can also get at it with the getAttribute method under the name specified by the ACCOUNT_ID constant.

NOTE: The account ID is never different than the PersistentObject._name field, so we decided to keep it in the name, and not represent it as a WSAttribute to avoid consistency problems.


setAccountId

public void setAccountId(java.lang.String s)
Sets the account id. The account id is the same as the name of this persistent object.

See Also:
getAccountId()

getPassword

public EncryptedData getPassword()
Get the user's password. The password is returned in its encrypted form


setPassword

public void setPassword(java.lang.String p)
Set the user's password. The password is passed as an unencrypted byte array, it will be converted into an encrypted byte array.


setPassword

public void setPassword(EncryptedData p)
Set the user's password. The password is passed as an encrypted byte array.


isPasswordChanged

public boolean isPasswordChanged()
Test the password changed flag.


setPasswordChanged

public void setPasswordChanged(boolean passwordChanged)

getPasswordHistory

public java.util.List getPasswordHistory()
Get the current list of stored previous passwords


addPasswordToPasswordHistory

public void addPasswordToPasswordHistory(byte[] newPassword,
                                         Policy pwdpol)
                                  throws WavesetException
Add to the new password to the top of the list of previous passwords

Throws:
WavesetException

addPasswordToPasswordHistory

public void addPasswordToPasswordHistory(byte[] newPassword,
                                         java.lang.String enc,
                                         Policy pwdpol)
                                  throws WavesetException
Throws:
WavesetException

getEmail

public java.lang.String getEmail()
Get the email address of this user.


setEmail

public void setEmail(java.lang.String s)
Set the email address of this user.


getWSAttribute

public WSAttribute getWSAttribute(java.lang.String attrId)
Get an account attribute.

The attribute is returned as a WSAttribute object. You might use this instead of getAttribute if you want to avoid coercing the attribute value to a string.

Note that the reference to this object is retained by the user so any modifications to the WSAttribute will be reflected in the WSUser. This is NOT the recommended way to modify user attributes. To change the value of an attribute, create a new WSAttribute and use setWSAttribute. In particular note account id isn't represented as a "real" attribute, so we have to fake one up if you ask for it here. Modifying this WSAttribute will have no effect on the name of this object.


setWSAttribute

public WSAttribute setWSAttribute(WSAttribute attr)
Set an account attribute.

If this attribute is already set, the old value is returned.


setWSAttribute

public boolean setWSAttribute(java.lang.String attrId,
                              java.lang.Object value)
                       throws WavesetException
Sets an account attribute of supported types. If 'value' is an ArrayList, then we will add a multi-valued attribute with 0 or more values. If there are no values in the list, this indicates to the resource adapter that all values should be cleared. If the value of an attribute is "", we will set the attribute's value to null to indicate to resource adapters that the value of this attribute should be cleared. Returns true if the attribute is set, otherwise returns false.

Throws:
WavesetException

putAttribute

public WSAttribute putAttribute(WSAttribute attr)
Set an account attribute, specifying through a WSAttribute object.

This was the original interface, but it lacked symetry with getWSAttribute and other "set" methods. This an alias for backward compatibility.


getWSAttributes

public WSAttributes getWSAttributes()
Get the collection of all account attributes for this user.

To keep up the appearances of the account ID being a "real" attribute, we have to add it to the list before returning it.

NOTE: This may result in inconsistencies if the name is changed later since we're still referencing the WSAttributes list. // * I think this should be invisible, since you can't get // * at the WSAttribute copy of the name without causing it to // * be refreshed with the new name. Should consider not // * treating this as an attribute? We might at least want // * to copy the list before returning it. - jsl


setWSAttributes

public void setWSAttributes(WSAttributes attrs)
Sets all of the account attributes for this user.

The attribute list will be copied, so subsequent modifications to it by the application will have no effect.

Note that the account ID and hence the object name can be set indirectly here, but since that isn't a real attribute we have to convert it.


clearWSAttributes

public void clearWSAttributes()

removeAttribute

public WSAttribute removeAttribute(java.lang.String attrId)

prepareForSerialization

public void prepareForSerialization()
                             throws WavesetException
We overload this to flesh out the ResourceInfo list according to our current assignments. This is used later by getSummaryProvisioningLevel. Since we have to resolve object references in order to do this, we have to do it here rather than in toXml, getQueryableAttributes or getSummaryAttributes due to concurrency issues with the repository.

Overrides:
prepareForSerialization in class PersistentObject
Throws:
WavesetException

listQueryableAttributes

public java.util.List listQueryableAttributes()
Overrides:
listQueryableAttributes in class Principal
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 Principal
Returns:
the complete list of defined attributes that this type of persistent object exposes as queryable attributes and for which each value is a reference to another persistent object.

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 Principal
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.


getSummaryAttributes

public WSAttributes getSummaryAttributes()
Overrides:
getSummaryAttributes in class PersistentObject
Returns:
attribute values to be displayed when this object appears in a list. The WSAttributes contains a WSAttribute for each summary attribute. Each WSAttribute may contain multiple values.

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

See Also:

If a subclass wants to expose a different set of summary attributes, that subclass should override {@link #listSummaryAttributes}. In order to supply values for summary attributes that may not be available in PersistentObject (e.g., from a field specified to that subclass), such a subclass may also override {@link #getAttributeValues(Attribute)}.

A subclass should not need to override this method (except to limit the number of values for a summary attribute).


getAttributeValues

protected WSAttribute getAttributeValues(java.lang.String attrName)
Overrides:
getAttributeValues in class Principal
Parameters:
attrName - - the name of the requested attribute.
Returns:
a WSAttribute that represents the value (or values) that this object contains for the specified attribute.


getEncryptedValues

public java.util.List getEncryptedValues()
Overrides:
getEncryptedValues in class Principal
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.


withResource

public static AttributeCondition[] withResource(Resource r)

withAnyListedResource

public static AttributeCondition[] withAnyListedResource(java.util.List resoIdList)
                                                  throws InvalidArgument
Returns:
conditions to select every user that claims any of the specified resources.
Throws:
InvalidArgument

getDisabledLevel

protected static int getDisabledLevel(WSUser user)

resolveSummaryAttributes

public static void resolveSummaryAttributes(ObjectCache cache,
                                            WSAttributes attrs)
                                     throws WavesetException
Walk the summary attributes, translating the embedded IDs to names. For this object, they are just name and ID, which need no translation. IF YOU ADD A TYPE HERE, add it to the referenced types list

Throws:
WavesetException

getSummaryAttributeTypes

public static Type[] getSummaryAttributeTypes()
Types resolved by resolveSummaryAttributes


forceProvisioned

public final void forceProvisioned(boolean on)

getAnswers

public Answer[] getAnswers()
Get the array of authentication answer objects assigned to this user.


getSuppliedQuestionAnswers

public Answer[] getSuppliedQuestionAnswers()
Utility method to return Answers which have a suppliedQuestion set.

Returns:
Answers which have a suppliedQuestion set.

setAnswers

public void setAnswers(Answer[] answers)

getAnswers

public Answer[] getAnswers(java.lang.String loginInterface)

getSuppliedQuestionAnswers

public Answer[] getSuppliedQuestionAnswers(java.lang.String loginInterface)
Utility method to return just the answers to user supplied questions for the specified login interface.

Parameters:
loginInterface -
Returns:
Answers for user supplied questions on the loginInterface

clearAnswers

public void clearAnswers()
Remove all answers from this user. Used if the user's role changes, and all the answers have become meaningless.


clearAnswers

public void clearAnswers(java.lang.String loginInterface)
Remove all answers for the specified login interface from this user. Used if the user's role changes, and all login interface specific answers have become meaningless.


getAnswer

public Answer getAnswer(java.lang.String id)
Get the answer object with a given id.


setAnswer

public void setAnswer(java.lang.String id,
                      java.lang.String answer,
                      java.lang.String loginInterface)
Add or modify an answer.


setAnswer

public void setAnswer(java.lang.String id,
                      EncryptedData answer,
                      java.lang.String loginInterface)
Add or modify an answer.


removeAnswer

public Answer removeAnswer(java.lang.String id)
Remove one answer from the user, given its question id. If the answer existed, it is returned.


getResourceInfo

public ResourceInfo getResourceInfo(ResourceInfo src)
Look for a ResourceInfo on this user whose identity matches that of the supplied ResourceInfo object. This is the most flexible of the ResourceInfo search methods and should now be used by code within the system. The other search methods are supported for backward compatibility, but since they do not handle account identity matching they cannot be used reliably in an environment where more than one account may exists on a resource. The following things are considered in determining the match: - Resource identity - account GUID - accountId - Lighthouse "temporary id" The resource identity must match. Either a repository id, name, or resolved Resource object may be provided. If a GUID is present in the passed object, then we look for an object with a matching GUID. If one is found it is returned even if the accountId does not match. This is because GUIDs are immutable, but accountIds can be changed (e.g. local rename or moving something in a directory hierarchy). If a GUID was passed but we do not find a GUID match, we will look for a matching accountId. If the ResourceInfo with the matching accountId does not also have a GUID it is returned. If it has a matching accountId but a different GUID it is not returned. If a GUID was not passed but an accountId was passed, we will look for a ResourceInfo with a matching accountId. If only a tempId is passed, we look for a matching tempId. If no identity is passed, we return the "primary" account for this resource.


getResourceInfos

public java.util.List getResourceInfos(java.lang.String resName)
Return a list of ResourceInfo objects associated with a resource with the given name.


getResourceInfos

public java.util.List getResourceInfos(Resource res)
Return a list of ResourceInfo objects associated with the given resource.


getResourceInfo

public ResourceInfo getResourceInfo(java.lang.String resName)
Return the information about a specific resource account associated with this user. The resource is identifed by name.


getResourceInfo

public ResourceInfo getResourceInfo(Resource res)
Return the information about a specific resource account associated with this user. The resource is identified with a Resource object.


getResourceInfo

public ResourceInfo getResourceInfo(java.lang.String resname,
                                    java.lang.String accountId)
Look for a ResourceInfo with the given resource name and id. If id is null, return the primary ResourceInfo. These were added to support multiple accounts per resource, but you probably should be using getResourceInfo(ResourceInfo) instead as that will in addition handle matching based on GUID. These will work only if you know that the accountId will match.


getResourceInfo

public ResourceInfo getResourceInfo(Resource resource,
                                    java.lang.String accountId)

getAccountId

public java.lang.String getAccountId(Resource r)
Returns:
the account id associated with a specified resource. If this user has no recorded account for that resource, return null. NOTE: Will return the account id of the designated primary resource if there is more than one.

getResourceInfo

public ResourceInfo[] getResourceInfo()
Return the array of resource account information.


addResourceInfo

public void addResourceInfo(ResourceInfo info)
Add information about a resource account.

Called by the Provisioner as it provisions or re-provisions.


removeResourceInfo

public void removeResourceInfo(ResourceInfo info)
Remove the information for one resource.

Called by the Provisioner as it de-provisions resource accounts. // This would be easier if it were a Collection rather than an array.


removeResourceInfo

public void removeResourceInfo(java.lang.String id)
Remove the information for one resource.

Called by the Provisioner as it de-provisions resource accounts. // This would be easier if it were a Collection rather than an array.


setResourceInfo

public void setResourceInfo(ResourceInfo[] infos)
Assigned the full ResourceInfo array.


clearResourceInfo

public void clearResourceInfo()
Remove all the resource info objects from the user.

This used to be called by Provisioner, but it now calls removeResourceInfo incrementally. Its still called by some of the session tests though.


generateTemporaryIds

public boolean generateTemporaryIds()
Walk over the ResourceInfo list looking for those that do not have an account id and make sure they have a temporary id. Return true if we generated any ids. This will be called by view handlers before they build the view to ensure that we have unique ways to identify accounts that are on the list but haven't been created yet.


getResourceIdentities

public ResourceIdentity[] getResourceIdentities()
Return the array of resource identity information.


clearResourceIdentities

public void clearResourceIdentities()
Remove all the resource identity objects from the user.


getResourceIdentity

public ResourceIdentity getResourceIdentity(java.lang.String name)
Find a resource identity given a name or ID (usually a name).


getResourceIdentity

public ResourceIdentity getResourceIdentity(Resource res)
Find a resource identity given a Resource object.


addResourceIdentity

public void addResourceIdentity(ResourceIdentity rid)
Add information about a resource identity.


removeResourceIdentity

public void removeResourceIdentity(ResourceIdentity rid)
Remove the information for one resource.

Called by the Provisioner or Adapter as it creates resource accounts.


toHashMap

public java.util.HashMap toHashMap(boolean convertAttrValuesToStrings)
                            throws WavesetException
Converts a WSUser object into a Map of name/value pairs. This is mostly used for placing a representation of the user into the provisioning pipe.

Throws:
WavesetException

fromMap

public void fromMap(java.util.Map map,
                    boolean checkRequiredAttributes)
             throws WavesetException
Assemble a user object from a map of name value pairs. Check to make sure that we have all of the values required by the resources contained in the map.

Throws:
WavesetException

getExpandedControlledObjectGroupRefs

public java.util.List getExpandedControlledObjectGroupRefs()

setExpandedControlledObjectGroupRefs

protected void setExpandedControlledObjectGroupRefs(java.util.List expandedControlledObjectGroupRefs)

getExpandedAdminGroupRefs

public java.util.List getExpandedAdminGroupRefs()

setExpandedAdminGroupRefs

protected void setExpandedAdminGroupRefs(java.util.List expandedAdminGroupRefs)

getLastAuditorScan

public java.util.Date getLastAuditorScan()

setLastAuditorScan

public void setLastAuditorScan(java.util.Date lastScan)

setAuditPolicyRefs

public void setAuditPolicyRefs(java.util.List auditPolicies)

setAuditPolicyRef

public void setAuditPolicyRef(ObjectRef ref)

addAuditPolicyRef

public void addAuditPolicyRef(ObjectRef ref)

getAuditPolicyRefs

public java.util.List getAuditPolicyRefs()

getPrivateAuditPolicies

public java.util.List getPrivateAuditPolicies()
                                       throws WavesetException
Returns:
a List of Policy objects, resolved from getAuditPolicyRefs
Throws:
WavesetException

addSubclassAttributes

protected void addSubclassAttributes(java.lang.StringBuffer buf)
Description copied from class: PersistentObject
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). PersistentObject's default implementation is a no-op.

NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.

Overrides:
addSubclassAttributes in class PersistentObject
See Also:


addSubclassElements

protected void addSubclassElements(java.lang.StringBuffer buf)
Description copied from class: PersistentObject
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). PersistentObject's default implementation is a no-op.

NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.

Overrides:
addSubclassElements in class PersistentObject
See Also:


hasEncryptedData

public static boolean hasEncryptedData()

reEncryptSubclassAttributes

protected void reEncryptSubclassAttributes()
                                    throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). // * @see #addSubclassAttributes(StringBuffer)

PersistentObject's default implementation is a no-op.

// * @see #parseXml(Element)

Overrides:
reEncryptSubclassAttributes in class PersistentObject
Throws:
WavesetException

parseSubclassAttributes

protected void parseSubclassAttributes(org.w3c.dom.Element e)
                                throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer).

Overrides:
parseSubclassAttributes in class PersistentObject
Throws:
WavesetException
See Also:

PersistentObject's default implementation is a no-op.

, PersistentObject.parseXml(Element)

parseSubclassElements

protected void parseSubclassElements(org.w3c.dom.Element e)
                              throws WavesetException
Description copied from class: PersistentObject
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer).

Overrides:
parseSubclassElements in class PersistentObject
Throws:
WavesetException
See Also:

PersistentObject's default implementation is a no-op.

, PersistentObject.parseXml(Element)

getInbuiltAttr

public static Attribute getInbuiltAttr(java.lang.String name)

getInbuiltAttrs

public static Attribute[] getInbuiltAttrs()

setInbuiltAttrs

public static void setInbuiltAttrs(Attribute[] userAttrs)

isInbuiltAttribute

public static boolean isInbuiltAttribute(java.lang.String name)
Returns true if this is the name of one of the built-in Waveset attributes that all user accounts must have. We treat these in a few special ways, notably they are rendered as XML attributes rather than as elements in the body.

Called by the toXml method, but might be of general use. // *

// * Note that this is going to be called a LOT due to way // * we serialize the types differently, I don't really like this, // * can we just keep the waveset attributes on a different list, // * or just as fields? // * jsl


dumpSummary

public void dumpSummary(java.lang.String file)

toIdentityString

public java.lang.String toIdentityString()

toVerboseString

public java.lang.String toVerboseString()

toVerboseString

public java.lang.String toVerboseString(java.lang.String indent)

checkManagerAttribute

public void checkManagerAttribute(WSUser changedUser)
                           throws WavesetException
Throws:
WavesetException

resolveObjectReference

protected void resolveObjectReference(ObjectRef ref,
                                      PersistentObject owner,
                                      ObjectCache cache)
                               throws WavesetException
Overrides:
resolveObjectReference in class PersistentObject
Throws:
WavesetException