|
||||||||||
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
An object defining a collection of services (resources, applications, and other roles) to be assgned to a user.
Nested Class Summary |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
ATT_OPAQUE
|
static java.lang.String |
ATT_ORDERED
|
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 |
_trace, trace |
Constructor Summary | |
Role()
Create an empty role, ready to be filled. |
|
Role(org.w3c.dom.Element e)
Create a role by parsing its DOM representation. |
Method Summary | |
void |
addApprover(ObjectRef ref)
Add one approver to our approver list. |
void |
addApprover(WSUser admin)
Add one approver to our approver list. |
void |
addResource(ObjectRef r)
Adds a resource to the application. |
void |
addResource(Resource r)
Add a new resource to the application. |
void |
addRoleAttribute(RoleAttribute ra)
|
void |
addRoleExclusionRef(ObjectRef or)
|
void |
addService(ObjectRef r)
Adds a service reference to the application. |
void |
addService(Service s)
Add one service to the list. |
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
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 b)
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 |
addSuperRole(ObjectRef r)
|
void |
addSuperRole(Role s)
|
void |
clearApprovers()
Clear the approvers list. |
void |
clearResources()
Removes all resources from the application. |
void |
clearRoleAttributes()
|
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. |
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. |
java.util.List |
getAssignedApplicationRefs()
return Application refs directly assigned to this role |
java.util.List |
getAssignedRefs(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 |
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
ObjectRef |
getAuthenticatorRef()
|
java.util.List |
getNotificationRefs()
Get the list of references to notification listeners for this role. |
WSUser[] |
getNotifications()
|
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 |
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. |
Resource[] |
getResources()
Calculate a flattened list of resource objects referenced by this role. |
java.util.List |
getRoleAttributes()
|
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()
|
Type |
getType()
Returns the associated Type object. |
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). |
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 |
removeApprover(ObjectRef ref)
Remove one approver from our approver list. |
void |
removeApprover(WSUser admin)
Remove one approver from our approver list. |
void |
removeResource(ObjectRef ref)
Removes a resource reference. |
void |
removeResource(Resource r)
Removes a resource reference. |
void |
removeService(ObjectRef ref)
Removes a service. |
void |
removeService(Service s)
Removes a service reference. |
void |
removeSuperRole(ObjectRef ref)
|
void |
removeSuperRole(Role s)
|
static void |
resolveSummaryAttributes(ObjectCache cache,
WSAttributes attrs)
Walk the summary attributes, translating the embedded IDs to names. |
void |
setAdministrator(WSUser a)
Set the approval administrator for this role. |
void |
setApprovers(java.util.List approvers)
|
void |
setAuthenticator(ObjectRef ref)
|
void |
setNotificationRefs(java.util.List refs)
|
void |
setOpaque(boolean b)
|
void |
setOrdered(boolean b)
|
void |
setRoleAttributes(java.util.List list)
|
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(Visitor v)
Visitor interface. |
Methods inherited from class com.waveset.object.Service |
checkForReferenceCycles, dumpSummary, findApplications, findApplications, findResourceAssignments, findResources, findRoleAttributes, findRoleExclusions, findRoles, findRoles, findServices, findServices, getFlatResourceAssignments, getFlatResourceAssignments, getFlatResources, getFlatResources, getFlatResources, getFlatResources, toIdentityString, toVerboseString, toVerboseString |
Methods inherited from class java.lang.Object |
clone, finalize, 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_SERVICES
public static final java.lang.String EL_SUPERROLES
public static final java.lang.String EL_RESOURCES
public static final java.lang.String EL_AUTHENTICATOR
public static final java.lang.String EL_ROLEATTRIBUTES
public static final java.lang.String EL_ROLEEXCLUSIONREFS
public static final java.lang.String ATT_OPAQUE
public static final java.lang.String ATT_ORDERED
Constructor Detail |
public Role()
public Role(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public void visit(Visitor v) throws WavesetException
visit
in class PersistentObject
WavesetException
public Type getType()
getType
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public boolean isOrdered()
Service
isOrdered
in class Service
public void setOrdered(boolean b)
public java.util.List getApproverRefs()
public WSUser[] getApprovers() throws WavesetException
WavesetException
public java.util.List getNotificationRefs()
public void setNotificationRefs(java.util.List refs)
public WSUser[] getNotifications() throws WavesetException
WavesetException
public void clearApprovers()
public void addApprover(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.
public 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 removeApprover(ObjectRef ref)
public void removeApprover(WSUser admin)
public void setApprovers(java.util.List approvers)
public java.util.List getServiceRefs()
getServiceRefs
in class Service
public java.util.List getSuperRoleRefs()
public Service[] getServices() throws 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
WavesetException
public Role[] getSuperRoles() throws WavesetException
WavesetException
public java.util.List getSuperRoleList() throws WavesetException
WavesetException
public void addService(ObjectRef r)
public void removeService(Service s)
The reference is specified as a Service object.
public void addSuperRole(ObjectRef r)
public void removeSuperRole(Role s)
public Resource[] getResources() throws WavesetException
We formerly tried to cache this, but its fragile. Now the array is calculated every time.
getResources
in class Service
WavesetException
public java.util.Set getResourceAssignments() throws WavesetException
Service
getResourceAssignments
in class Service
WavesetException
public Application[] getApplications() throws WavesetException
WavesetException
public Role[] getRoles() throws WavesetException
WavesetException
public java.util.List getSubRoleList() throws WavesetException
WavesetException
public java.util.List getSubRoleNameList() throws WavesetException
WavesetException
public java.util.List getSubRoleIdList() throws WavesetException
WavesetException
public java.util.List getSuperRoleIdList() throws WavesetException
WavesetException
public void clearServices()
public void clearSuperRoles()
public void setServices(Service[] sarray)
public void setSuperRoles(Service[] sarray)
public void addService(Service s)
public void addSuperRole(Role s)
public void removeService(ObjectRef ref)
public void removeSuperRole(ObjectRef ref)
public java.util.List getResourceRefs() throws WavesetException
getResourceRefs
in class Service
WavesetException
public java.util.Set getResourceAssignmentRefs() throws WavesetException
getResourceAssignmentRefs
in class Service
WavesetException
public java.util.List getAssignedRefs(Type type)
public java.util.List getAssignedRoleRefs()
public java.util.List getAssignedApplicationRefs()
public java.util.List getAssignedResourceRefs()
public java.util.List getAssignmentRefs()
public java.util.List getApplicationRefs() throws WavesetException
WavesetException
public java.util.List getRoleRefs() throws WavesetException
WavesetException
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 static void resolveSummaryAttributes(ObjectCache cache, WSAttributes attrs) throws WavesetException
PersistentObject
WavesetException
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 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(Attribute)}.
A subclass should not need to override this method
(except to limit the number of values for a summary attribute).
protected WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in class PersistentObject
attrName
- - the name of the attribute for which to return values.
WSAttribute
that represents the value (or values)
that this object contains for the specified attribute
.
public GenericObject getPolicyUpgradeMap()
protected void addSubclassAttributes(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void addSubclassElements(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.
addSubclassElements
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
public WSUser getAdministrator() throws WavesetException
Deprecated, you should be using getApprovers
.
If there are more than approvers, the first one is returned.
#see #getApprovers
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 addResource(Resource r)
public void addResource(ObjectRef r)
public void removeResource(Resource r)
public void removeResource(ObjectRef ref)
public void clearResources()
public boolean isOpaque()
public void setOpaque(boolean b)
public ObjectRef getAuthenticatorRef()
public void setAuthenticator(ObjectRef ref)
public java.util.List getRoleAttributes()
public void setRoleAttributes(java.util.List list)
public void clearRoleAttributes()
public void addRoleAttribute(RoleAttribute ra)
public java.util.List getRoleExclusionRefs()
public void setRoleExclusionRefs(java.util.List list)
public void clearRoleExclusionRefs()
public void addRoleExclusionRef(ObjectRef or)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |