|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.Service
com.waveset.object.Role
public class Role
An object defining a collection of services (resources, applications, and other roles) to be assigned to a user.
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 |
EL_AUTHENTICATOR
|
static java.lang.String |
EL_RESOURCES
|
static java.lang.String |
EL_ROLEATTRIBUTES
|
static java.lang.String |
EL_ROLEEXCLUSIONREFS
|
static java.lang.String |
EL_SERVICES
|
static java.lang.String |
EL_SUPERROLES
|
Fields inherited from class com.waveset.object.PersistentObject |
---|
INITIAL_OBJECT_VERSION |
Constructor Summary | |
---|---|
Role(org.w3c.dom.Element e)
Create a role by parsing its DOM representation. |
|
Role(com.sun.idm.object.IDMObjectClass objectClass)
|
Method Summary | |
---|---|
void |
addApprover(com.waveset.object.ObjectRef ref)
Add one approver to our approver list. |
void |
addApprover(WSUser admin)
Add one approver to our approver list. |
void |
addContainedRole(com.waveset.object.ContainedRole containedRole)
Add a contained role |
void |
addResource(com.waveset.object.ObjectRef r)
Adds a resource to the application. |
void |
addResource(com.waveset.object.Resource r)
Add a new resource to the application. |
void |
addRoleAttribute(com.waveset.object.RoleAttribute ra)
Adds a RoleAttribute(value assignment) to the role. |
void |
addRoleExclusionRef(com.waveset.object.ObjectRef or)
|
void |
addService(com.waveset.object.ObjectRef r)
Adds a service reference to the application. |
void |
addService(Service s)
Add one service to the list. |
void |
addSuperRole(com.waveset.object.ObjectRef r)
|
void |
addSuperRole(Role s)
|
void |
clearApprovers()
Clear the approvers list. |
void |
clearContainedRoles()
|
void |
clearResources()
Removes all resources from the application. |
void |
clearRoleAttributes()
Clear the list of RoleAttribute(value assignment) objects, which correspond to the attributes assigned to an account when a Role is assigned - not the (extended and built-in) attributes of a Role. |
void |
clearRoleExclusionRefs()
|
void |
clearServices()
Clear the services list. |
void |
clearSuperRoles()
|
WSUser |
getAdministrator()
Get the approval administrator for this role. |
java.util.List |
getApplicationRefs()
Gets the list of applications references in this application. |
com.waveset.object.Application[] |
getApplications()
Return the current list of applications assigned to this role/ |
java.util.List |
getApproverRefs()
Get the list of references to approvers for this role. |
WSUser[] |
getApprovers()
Get an array of resolved approver objects for this role. |
com.waveset.object.ObjectRef |
getApproversRuleRef()
|
java.util.List |
getAssignedApplicationRefs()
return Application refs directly assigned to this role |
java.util.List |
getAssignedRefs(com.waveset.object.Type type)
Gets the list of resource references directly assigned to this role |
java.util.List |
getAssignedResourceRefs()
return Resource refs directly assigned to this role |
java.util.List |
getAssignedRoleRefs()
return Role refs directly assigned to this role |
java.util.List |
getAssignmentRefs()
return possibly qualified Resource refs directly assigned to this role |
com.waveset.object.ObjectRef |
getAuthenticatorRef()
|
java.lang.String |
getAuthType()
Return the authorization type of this object. |
com.waveset.object.ContainedRole |
getContainedRole(java.lang.String roleName)
Return the ContainedRole for the given role name. |
java.util.List<com.waveset.object.ContainedRole> |
getContainedRoles()
|
java.lang.String |
getDescription()
|
WSAttribute |
getExtendedAttribute(java.lang.String attributeName)
Get a (copy of a) role attribute. |
WSAttributes |
getExtendedAttributes()
Get the collection of all attributes for this role. |
java.util.List |
getNotificationRefs()
Get the list of references to notification listeners for this role. |
WSUser[] |
getNotifications()
|
com.waveset.object.ObjectRef |
getNotificationsRuleRef()
|
java.util.List |
getOwnerRefs()
|
WSUser[] |
getOwners()
Get an array of resolved owner objects for this role. |
com.waveset.object.ObjectRef |
getOwnersRuleRef()
|
GenericObject |
getPolicyUpgradeMap()
Create a map of the attributes and elements that make up what has moved to the LighthouseAccountPolicy - specifically: Attributes: idSource String passwordSource String questionPolicy String randomQuestionCount int roundRobinQuestionIndex int accountLock boolean resetOption String resetCheck String Elements: PasswordExpiry Util.TimePeriod PasswordExpiryWarning Util.TimePeriod TempPasswordExpiry Util.TimePeriod AuthenticationQuestions List of GenericObject, attributes id & question ResetLimit int resetLimitPeriod resetLimitPeriod |
com.sun.idm.object.IDMObjectClass |
getPrimaryObjectClass()
|
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
java.util.Set |
getResourceAssignmentRefs()
Gets the list of possibly qualified resource references in this application. |
java.util.Set |
getResourceAssignments()
Return the set of ResourceAssignments encapsulated by this Service and any Services it contains. |
java.util.List |
getResourceRefs()
Gets the list of resource references in this application. |
com.waveset.object.Resource[] |
getResources()
Calculate a flattened list of resource objects referenced by this role. |
java.util.List<com.waveset.object.RoleAttribute> |
getRoleAttributes()
RoleAttribute(value assignment) objects correspond to the attributes assigned to an account when a Role is assigned, not the (extended and built-in) attributes of a Role. |
java.util.List |
getRoleExclusionRefs()
|
java.util.List |
getRoleRefs()
Gets the list of applications references in this application. |
Role[] |
getRoles()
Return array of current roles assigned to this role |
java.util.List |
getServiceRefs()
Get the list of references to services. |
Service[] |
getServices()
Resolve the list of service references, and return an array of service objects. |
java.util.List |
getSubRoleIdList()
Return the current list of roles assigned to this role |
java.util.List |
getSubRoleList()
Return the current list of roles assigned to this role |
java.util.List |
getSubRoleNameList()
Return the current list of roles assigned to this role |
WSAttributes |
getSummaryAttributes()
|
java.util.List |
getSuperRoleIdList()
Return the current list of roles that assign this role |
java.util.List |
getSuperRoleList()
|
java.util.List |
getSuperRoleRefs()
|
Role[] |
getSuperRoles()
|
com.waveset.object.Type |
getType()
Returns the associated Type object. |
boolean |
isDisabled()
Test the role disabled flag. |
boolean |
isOpaque()
Test the opaque flag. |
boolean |
isOrdered()
Override this if this service is a container and order is important. |
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 |
removeApprover(com.waveset.object.ObjectRef ref)
Remove one approver from our approver list. |
void |
removeApprover(WSUser admin)
Remove one approver from our approver list. |
void |
removeContainedRole(com.waveset.object.ContainedRole containedRole)
Remove a contained role |
void |
removeExtendedAttribute(java.lang.String attributeName)
Removes the named attribute from the role. |
void |
removeResource(com.waveset.object.ObjectRef ref)
Removes a resource reference. |
void |
removeResource(com.waveset.object.Resource r)
Removes a resource reference. |
void |
removeService(com.waveset.object.ObjectRef ref)
Removes a service. |
void |
removeService(Service s)
Removes a service reference. |
void |
removeSuperRole(com.waveset.object.ObjectRef ref)
|
void |
removeSuperRole(Role s)
|
static void |
resolveSummaryAttributes(com.waveset.object.ObjectCache cache,
WSAttributes attrs)
|
void |
setAdministrator(WSUser a)
Set the approval administrator for this role. |
void |
setApprovers(java.util.List approvers)
|
void |
setApproversRuleRef(com.waveset.object.ObjectRef ruleRef)
|
void |
setAuthenticator(com.waveset.object.ObjectRef ref)
|
void |
setDescription(java.lang.String description)
|
void |
setDisabled(boolean b)
Set the role disabled flag. |
void |
setExtendedAttribute(WSAttribute attribute)
Set an account attribute to a copy of attribute. |
void |
setExtendedAttributes(WSAttributes extendedAttributes)
Utility to replace all extended attributes on a Role at once. |
void |
setNotificationRefs(java.util.List refs)
|
void |
setNotificationsRuleRef(com.waveset.object.ObjectRef ruleRef)
|
void |
setOpaque(boolean b)
|
void |
setOrdered(boolean b)
|
void |
setOwnerRefs(java.util.List owners)
|
void |
setOwnersRuleRef(com.waveset.object.ObjectRef ruleRef)
|
void |
setRoleAttributes(java.util.List<com.waveset.object.RoleAttribute> list)
Specify/Replace the list of RoleAttribute(value assignment) objects - these correspond to the attributes assigned to an account when a Role is assigned, not the (extended and built-in) attributes of a Role. |
void |
setRoleExclusionRefs(java.util.List list)
|
void |
setServices(Service[] sarray)
Set the services list in one operation by specifying an array of service objects. |
void |
setSuperRoles(Service[] sarray)
|
void |
visit(com.waveset.object.Visitor v)
Visitor interface. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
public static final java.lang.String code_id
public static final java.lang.String EL_AUTHENTICATOR
public static final java.lang.String EL_RESOURCES
public static final java.lang.String EL_ROLEATTRIBUTES
public static final java.lang.String EL_ROLEEXCLUSIONREFS
public static final java.lang.String EL_SERVICES
public static final java.lang.String EL_SUPERROLES
Constructor Detail |
---|
public Role(org.w3c.dom.Element e) throws com.waveset.util.WavesetException
e
- XML element
com.waveset.util.WavesetException
- if the XML can't be parsed.public Role(com.sun.idm.object.IDMObjectClass objectClass)
Method Detail |
---|
public void addApprover(com.waveset.object.ObjectRef ref)
These should be administrators with APPROVAL rights. Can't check that here, it will have to be done as part of the Checkin validator. The GUI currently tries to prevent selection of bad values.
ref
- ObjectRef to approverpublic void addApprover(WSUser admin)
These should be administrators with APPROVAL rights. Can't check that here, it will have to be done as part of the Checkin validator. The GUI currently tries to prevent selection of bad values.
If you want to specify a completely new list, call
clearApprovers
first.
clearApprovers()
public void addContainedRole(com.waveset.object.ContainedRole containedRole)
public void addResource(com.waveset.object.ObjectRef r)
public void addResource(com.waveset.object.Resource r)
public void addRoleAttribute(com.waveset.object.RoleAttribute ra)
ra
- role attribute value assignment for the rolepublic void addRoleExclusionRef(com.waveset.object.ObjectRef or)
public void addService(com.waveset.object.ObjectRef r)
public void addService(Service s)
public void addSuperRole(com.waveset.object.ObjectRef r)
public void addSuperRole(Role s)
public void clearApprovers()
public void clearContainedRoles()
public void clearResources()
public void clearRoleAttributes()
public void clearRoleExclusionRefs()
public void clearServices()
public void clearSuperRoles()
public WSUser getAdministrator() throws com.waveset.util.WavesetException
Deprecated, you should be using getApprovers
.
If there are more than approvers, the first one is returned.
#see #getApprovers
com.waveset.util.WavesetException
public java.util.List getApplicationRefs() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.Application[] getApplications() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getApproverRefs()
public WSUser[] getApprovers() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.ObjectRef getApproversRuleRef()
public java.util.List getAssignedApplicationRefs()
public java.util.List getAssignedRefs(com.waveset.object.Type type)
public java.util.List getAssignedResourceRefs()
public java.util.List getAssignedRoleRefs()
public java.util.List getAssignmentRefs()
public com.waveset.object.ObjectRef getAuthenticatorRef()
public java.lang.String getAuthType()
getAuthType
in class PersistentObject
public com.waveset.object.ContainedRole getContainedRole(java.lang.String roleName)
public java.util.List<com.waveset.object.ContainedRole> getContainedRoles()
public java.lang.String getDescription()
public WSAttribute getExtendedAttribute(java.lang.String attributeName)
The attribute is returned as a WSAttribute
object.
Note that the WSAttribute returned is a copy of the role's attribute, so modifying the returned value will not change the role's attribute value. Use setExtendedAttribute(WSAttribute) to change the value on the role.
attributeName
- name of attribute to retrieve
public WSAttributes getExtendedAttributes()
Note the collection is a copy of the attributes, so modifying any of the values will not be reflected on the role. To change a role's attribute, use setExtendedAttribute(WSAttribute).
public java.util.List getNotificationRefs()
public WSUser[] getNotifications() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.ObjectRef getNotificationsRuleRef()
public java.util.List getOwnerRefs()
public WSUser[] getOwners() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.ObjectRef getOwnersRuleRef()
public GenericObject getPolicyUpgradeMap()
public com.sun.idm.object.IDMObjectClass getPrimaryObjectClass()
getPrimaryObjectClass
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public java.util.Set getResourceAssignmentRefs() throws com.waveset.util.WavesetException
getResourceAssignmentRefs
in class Service
com.waveset.util.WavesetException
public java.util.Set getResourceAssignments() throws com.waveset.util.WavesetException
Service
getResourceAssignments
in class Service
com.waveset.util.WavesetException
public java.util.List getResourceRefs() throws com.waveset.util.WavesetException
getResourceRefs
in class Service
com.waveset.util.WavesetException
public com.waveset.object.Resource[] getResources() throws com.waveset.util.WavesetException
We formerly tried to cache this, but its fragile. Now the array is calculated every time.
getResources
in class Service
com.waveset.util.WavesetException
public java.util.List<com.waveset.object.RoleAttribute> getRoleAttributes()
public java.util.List getRoleExclusionRefs()
public java.util.List getRoleRefs() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public Role[] getRoles() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getServiceRefs()
getServiceRefs
in class Service
public Service[] getServices() throws com.waveset.util.WavesetException
Formerly the array was cached for subsequent calls, but that was fragile, and I don't think was all that necessary.
getServices
in class Service
com.waveset.util.WavesetException
public java.util.List getSubRoleIdList() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getSubRoleList() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getSubRoleNameList() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public WSAttributes getSummaryAttributes()
getSummaryAttributes
in class PersistentObject
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.
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(String)}.
A subclass should not need to override this method
(except to limit the number of values for a summary attribute).
public java.util.List getSuperRoleIdList() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getSuperRoleList() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getSuperRoleRefs()
public Role[] getSuperRoles() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.Type getType()
getType
in class PersistentObject
public boolean isDisabled()
public boolean isOpaque()
public boolean isOrdered()
Service
isOrdered
in class Service
public java.util.List listQueryableAttributes()
listQueryableAttributes
in class PersistentObject
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.
public java.util.List listQueryableReferenceAttributes()
listQueryableReferenceAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as queryable
and for which each value is a reference
to another persistent object.public java.util.List listSummaryAttributes()
PersistentObject
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.
listSummaryAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this 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.
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
public void removeApprover(com.waveset.object.ObjectRef ref)
public void removeApprover(WSUser admin)
public void removeContainedRole(com.waveset.object.ContainedRole containedRole)
containedRole
- public void removeExtendedAttribute(java.lang.String attributeName)
attributeName
- name of attribute to remove.public void removeResource(com.waveset.object.ObjectRef ref)
public void removeResource(com.waveset.object.Resource r)
public void removeService(com.waveset.object.ObjectRef ref)
public void removeService(Service s)
The reference is specified as a Service object.
public void removeSuperRole(com.waveset.object.ObjectRef ref)
public void removeSuperRole(Role s)
public static void resolveSummaryAttributes(com.waveset.object.ObjectCache cache, WSAttributes attrs) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void setAdministrator(WSUser a)
Deprecated, you should be using addApprover
.
If there is currently more than one approver, the entire
list will be cleared and set to this one.
addApprover(com.waveset.object.ObjectRef)
public void setApprovers(java.util.List approvers)
public void setApproversRuleRef(com.waveset.object.ObjectRef ruleRef)
public void setAuthenticator(com.waveset.object.ObjectRef ref)
public void setDescription(java.lang.String description)
public void setDisabled(boolean b)
b
- disabled flagpublic void setExtendedAttribute(WSAttribute attribute)
If this attribute is already set, the old value is replaced. Note: Modifying attribute after calling setWSAttribute will not change the value of the role's attribute. To change a role's attribute, use setExtendedAttribute(WSAttribute) with the revised attribute.
attribute
- to set on the role.public void setExtendedAttributes(WSAttributes extendedAttributes)
extendedAttributes
- New collection of extended attributes.public void setNotificationRefs(java.util.List refs)
public void setNotificationsRuleRef(com.waveset.object.ObjectRef ruleRef)
public void setOpaque(boolean b)
public void setOrdered(boolean b)
public void setOwnerRefs(java.util.List owners)
public void setOwnersRuleRef(com.waveset.object.ObjectRef ruleRef)
public void setRoleAttributes(java.util.List<com.waveset.object.RoleAttribute> list)
list
- of role attribute value definitions for the role.public void setRoleExclusionRefs(java.util.List list)
public void setServices(Service[] sarray)
public void setSuperRoles(Service[] sarray)
public void visit(com.waveset.object.Visitor v) throws com.waveset.util.WavesetException
visit
in class PersistentObject
v
- Visitor for this persistent object.
com.waveset.util.WavesetException
- if there's a problem from visitPersistentObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |