|
||||||||
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.ObjectGroup
public class ObjectGroup
An ObjectGroup is a collection of PersistentObjects. ObjectGroups can be nested to form a hierarchy.
Lighthouse predefines two instances of ObjectGroup:
Top
is the most exclusive.
ObjectGroup:Top is the root of the object group hierarchy.
Access to Top implies access to every object group.
All
is the most inclusive.
ObjectGroup:All lies outside the object group hierarchy.
Any administrator has access to objects in All.
Nested Class Summary | |
---|---|
static class |
ObjectGroup.ResourceContainerInfo
Used for values of the _resetCheck field. |
Nested classes/interfaces inherited from class com.waveset.object.PersistentObject |
---|
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
---|---|
static ObjectGroup |
All
|
static java.lang.String |
code_id
|
static ObjectGroup |
Top
|
Fields inherited from class com.waveset.object.PersistentObject |
---|
INITIAL_OBJECT_VERSION |
Constructor Summary | |
---|---|
ObjectGroup()
|
|
ObjectGroup(org.w3c.dom.Element e)
|
|
ObjectGroup(ObjectGroup src)
Clone the object, cloning the object refs to remove any resolved refs that might not belong to the new object's cache. |
|
ObjectGroup(java.lang.String name)
|
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 |
addAuditPolicyRef(com.waveset.object.ObjectRef ref)
|
void |
addPolicyRef(com.waveset.object.ObjectRef ref)
|
void |
clearApprovers()
Clear the approvers list. |
PersistentObject |
cloneObject()
Clones an object. |
boolean |
dupOrgInParent()
|
java.util.ArrayList |
getApproverRefs()
Get the list of approver object references for this role. |
WSUser[] |
getApprovers()
Get an array of resolved approver objects for this group. |
java.util.List |
getAuditPolicies()
|
java.util.List |
getAuditPolicyRefs()
|
void |
getChildObjectGroupIds(java.util.List childogidlist)
Similar to getChildObjectGroupNames, but builds a list of ids instead. |
void |
getChildObjectGroupIdsWithUserMemberRule(java.util.List childogidlist)
Similar to getChildObjectGroupIds, but only returns child ObjectGroup Ids that reference a user member rule. |
void |
getChildObjectGroupNames(java.util.List childognamelist)
For this ObjectGroup, the method will find all child object groups (e.g. |
void |
getChildObjectGroupNamesWithUserMemberRule(java.util.List childognamelist)
Similar to getChildObjectGroupNames, but only returns child ObjectGroup Names that reference a user member rule. |
void |
getChildObjectGroupPathNames(java.util.List childogpathnamelist)
Similar to getChildObjectGroupNames, but builds a list of pathnames instead. |
void |
getChildObjectGroupPathNamesWithUserMemberRule(java.util.List childogpathnamelist)
Similar to getChildObjectGroupNames, but only returns child ObjectGroup Names that reference a user member rule. |
void |
getChildObjectGroups(java.util.List childoglist)
Similar to getChildObjectGroupNames, but builds a list of objects instead. |
void |
getChildObjectGroupsWithUserMemberRule(java.util.List childoglist)
Similar to getChildObjectGroups, but only returns child ObjectGroups that reference a user member rule. |
com.waveset.object.ObjectRef |
getCustomForm(java.lang.String key)
Get the ObjectRef for a particular key in the per-user custom form list. |
java.util.List |
getCustomFormKeys()
Return the keys for all the custom forms currently held by Principal. |
void |
getDirectChildObjectGroupIds(java.util.List childogidlist)
Similar to getChildObjectGroupIds, but returns only child object group ids whose parent is this object group |
void |
getDirectChildObjectGroupIdsWithUserMemberRule(java.util.List childogidlist)
Similar to getDirectChildObjectGroupIds, but only returns child ObjectGroup Ids that reference a user member rule. |
java.lang.String |
getDisplayableName()
Override this to return the path which is what we really want to display for orgs. |
static PersistentObject.InitialInstance[] |
getInitialInstances()
|
static java.util.List |
getMemberObjectGroupDisplayNames(ObjectSource objSrc,
PersistentObject po)
Return a list of displayNames of the member object groups of the PersistentObject parameter. |
static java.util.List |
getMemberObjectGroupNames(ObjectSource objSrc,
PersistentObject po)
Return a List of String where the Strings are names of the member object groups of the PersistentObject parameter. |
static java.util.List |
getMemberObjectGroupPaths(ObjectSource objSrc,
PersistentObject po)
Return a list of paths of the member object groups of the PersistentObject parameter. |
java.lang.String |
getName()
Return the name of this object. |
static java.lang.String |
getObjectGroupHandle(ObjectSource objSrc,
com.waveset.object.ObjectRef ref)
Return the org path or displayName for the given object reference. |
static java.util.List |
getObjectGroupHandles(ObjectSource objSrc,
java.util.List objectRefs)
Return a list of org paths or displayNames for the given list of object references. |
static com.waveset.object.ObjectRef |
getObjectGroupRef(ObjectSource objSrc,
java.lang.String orgHandle)
Takes an orgHandles (either name, path, or displayname) and returns a formal object reference . |
static java.util.List |
getObjectGroupRefs(ObjectSource objSrc,
java.util.List orgList)
Takes a list of orgHandles (either names, paths, or displaynames) and returns a list of formal object references . |
static java.lang.String |
getOrganizationPath(ObjectSource objSrc,
ObjectGroup group)
|
static java.util.List |
getOrganizationPathList(ObjectSource objSrc,
ObjectGroup group,
boolean returnIDs)
Build a list of names or IDs from the given organization back to the top containing the names of each intermediate object groups. |
java.lang.String[] |
getPath()
|
java.lang.String[] |
getPath(boolean returnIDs)
|
java.lang.String[] |
getPathAsIDs()
|
java.lang.String |
getPathString()
Return the organization path as a string of path elements seperated by colons. |
java.util.List |
getPolicies()
|
java.util.List |
getPolicyRefs()
|
com.sun.idm.object.IDMObjectClass |
getPrimaryObjectClass()
|
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
ObjectGroup.ResourceContainerInfo |
getResourceContainerInfo()
|
static java.util.List |
getTopControlledObjectGroups(LighthouseContext lc,
Subject subject)
Returns the set of 0 or more object groups controlled by the given Subject, each of which has no object group parent that is also controlled by the principal. |
com.waveset.object.Type |
getType()
Return the type of this object. |
com.waveset.object.Configuration |
getUserForm()
|
java.lang.String |
getUserFormId()
|
com.waveset.object.ObjectRef |
getUserFormRef()
|
java.lang.String |
getUserMembersRuleCacheTimeout()
If resource objects queries are to be cached, this option specifies the number of milliseconds before the cache times out. |
com.waveset.object.ObjectRef |
getUserMembersRuleRef()
|
com.waveset.object.Configuration |
getViewUserForm()
|
java.lang.String |
getViewUserFormId()
|
com.waveset.object.ObjectRef |
getViewUserFormRef()
|
boolean |
isJunction()
|
boolean |
isVirtual()
|
java.util.List |
listQueryableAttributes()
|
java.util.List |
listSummaryAttributes()
Returns the complete list of defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each). |
static void |
normalizeObjectGroup(com.waveset.object.ObjectCache cache,
ObjectGroup org)
|
static void |
normalizeObjectGroup(ObjectSource objSrc,
ObjectGroup org)
Update the path (from the top of the organization hierarchy) for the specified object group. |
void |
prepareForSerialization()
Overrides PersistentObject to ensure that our
"pathname" within the organization hierarchy is up-to-date
before this object is serialized (i.e., stored persistently). |
void |
setAuditPolicyRef(com.waveset.object.ObjectRef ref)
|
void |
setAuditPolicyRefs(java.util.List policies)
|
void |
setCache(com.waveset.object.ObjectCache c)
Overridden from PersistentObject to invalidate our path string cache - if the cache is changing, the path to top may change. |
void |
setCustomForm(java.lang.String key,
com.waveset.object.ObjectRef form)
Set a name and (Form) ObjectRef pair on the object. |
void |
setPath(java.lang.String[] path)
|
void |
setPathAsIDs(java.lang.String[] IDPath)
|
void |
setPolicyRef(com.waveset.object.ObjectRef ref)
|
void |
setPolicyRefs(java.util.List policies)
|
void |
setResourceContainerInfo(ObjectGroup.ResourceContainerInfo resourceContainerInfo)
|
void |
setUseOrgDisplayNames(boolean val)
|
void |
setUserForm(com.waveset.object.Configuration userForm)
|
void |
setUserFormRef(com.waveset.object.ObjectRef userFormRef)
|
void |
setUserMembersRuleCacheTimeout(java.lang.String userMembersRuleCacheTimeout)
|
void |
setUserMembersRuleRef(com.waveset.object.ObjectRef userMembersRuleRef)
|
void |
setViewUserForm(com.waveset.object.Configuration viewUserForm)
|
void |
setViewUserFormRef(com.waveset.object.ObjectRef viewUserFormRef)
|
static java.lang.String |
stripPath(java.lang.String path)
Given an organization name in "path" form, remove the path prefix. |
static boolean |
useOrgDisplayNames(ObjectSource objSrc)
|
void |
visit(com.waveset.object.Visitor v)
Visitor interface. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static ObjectGroup All
public static final java.lang.String code_id
public static ObjectGroup Top
Constructor Detail |
---|
public ObjectGroup()
public ObjectGroup(org.w3c.dom.Element e) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public ObjectGroup(ObjectGroup src) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public ObjectGroup(java.lang.String name)
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.
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 addAuditPolicyRef(com.waveset.object.ObjectRef ref)
public void addPolicyRef(com.waveset.object.ObjectRef ref)
public void clearApprovers()
public PersistentObject cloneObject() throws com.waveset.util.WavesetException
PersistentObject
We don't overload the java.lang.Object.clone
method
because it can't throw any exceptions, and there is the potential
for deserialization errors here (though I suppose we could
throw an unchecked exceptions).
The clone is done using the XML serialization that all PersistentObjects must support. It would probably be more efficient to implement java.lang.Serializable, but that's another serialization format that would have to be debugged. Since we have to support XML transforms anyway, just use that.
cloneObject
in class PersistentObject
Overridden for speed because object groups are moved between caches a lot.
com.waveset.util.WavesetException
- if there were problems duplicating the objectpublic boolean dupOrgInParent() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.ArrayList getApproverRefs()
These are references to Administrators that are considered approvers for provisioning requests using this group.
public WSUser[] getApprovers() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getAuditPolicies() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getAuditPolicyRefs()
public void getChildObjectGroupIds(java.util.List childogidlist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroupIdsWithUserMemberRule(java.util.List childogidlist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroupNames(java.util.List childognamelist) throws com.waveset.util.WavesetException
Inputs: - childognamelist - non-null list to be populated with child object group names
com.waveset.util.WavesetException
public void getChildObjectGroupNamesWithUserMemberRule(java.util.List childognamelist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroupPathNames(java.util.List childogpathnamelist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroupPathNamesWithUserMemberRule(java.util.List childogpathnamelist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroups(java.util.List childoglist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getChildObjectGroupsWithUserMemberRule(java.util.List childoglist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.ObjectRef getCustomForm(java.lang.String key)
key
- - index name of the form
public java.util.List getCustomFormKeys()
public void getDirectChildObjectGroupIds(java.util.List childogidlist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public void getDirectChildObjectGroupIdsWithUserMemberRule(java.util.List childogidlist) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.lang.String getDisplayableName()
getDisplayableName
in class PersistentObject
public static final PersistentObject.InitialInstance[] getInitialInstances()
public static java.util.List getMemberObjectGroupDisplayNames(ObjectSource objSrc, PersistentObject po) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public static java.util.List getMemberObjectGroupNames(ObjectSource objSrc, PersistentObject po) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public static java.util.List getMemberObjectGroupPaths(ObjectSource objSrc, PersistentObject po) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public java.lang.String getName()
PersistentObject
getName
in class PersistentObject
public static java.lang.String getObjectGroupHandle(ObjectSource objSrc, com.waveset.object.ObjectRef ref) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public static java.util.List getObjectGroupHandles(ObjectSource objSrc, java.util.List objectRefs) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public static com.waveset.object.ObjectRef getObjectGroupRef(ObjectSource objSrc, java.lang.String orgHandle) throws com.waveset.util.WavesetException
object reference
.
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.orgHandle
- - an object group identifier (e.g., name, path or displayName).
object reference
to the object group.
com.waveset.util.WavesetException
public static java.util.List getObjectGroupRefs(ObjectSource objSrc, java.util.List orgList) throws com.waveset.util.WavesetException
object references
.
objSrc
- - an ObjectSource
used to resolve object references.orgList
- - a list of org handles (names, paths or displayNames).
object references
to organizations.
com.waveset.util.WavesetException
public static java.lang.String getOrganizationPath(ObjectSource objSrc, ObjectGroup group) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public static java.util.List getOrganizationPathList(ObjectSource objSrc, ObjectGroup group, boolean returnIDs) throws com.waveset.util.WavesetException
Assumes that object groups can have only a single parent object group and therefore every object group will have a single unique fully qualified path from Top or All.
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public java.lang.String[] getPath() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.lang.String[] getPath(boolean returnIDs) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.lang.String[] getPathAsIDs()
public java.lang.String getPathString()
TODO: Support an option to filter out organization names that the user is not authorized to see. This probably can't be done at this level? - jsl
public java.util.List getPolicies() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.util.List getPolicyRefs()
public com.sun.idm.object.IDMObjectClass getPrimaryObjectClass()
getPrimaryObjectClass
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public ObjectGroup.ResourceContainerInfo getResourceContainerInfo()
public static java.util.List getTopControlledObjectGroups(LighthouseContext lc, Subject subject) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public com.waveset.object.Type getType()
PersistentObject
getType
in class PersistentObject
public com.waveset.object.Configuration getUserForm() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.lang.String getUserFormId()
public com.waveset.object.ObjectRef getUserFormRef()
public java.lang.String getUserMembersRuleCacheTimeout()
public com.waveset.object.ObjectRef getUserMembersRuleRef()
public com.waveset.object.Configuration getViewUserForm() throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public java.lang.String getViewUserFormId()
public com.waveset.object.ObjectRef getViewUserFormRef()
public boolean isJunction()
public boolean isVirtual()
public java.util.List listQueryableAttributes()
listQueryableAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as queryable
(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 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 this type 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.getSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
public static void normalizeObjectGroup(com.waveset.object.ObjectCache cache, ObjectGroup org) throws com.waveset.util.WavesetException
com.waveset.util.WavesetException
public static void normalizeObjectGroup(ObjectSource objSrc, ObjectGroup org) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
com.waveset.util.WavesetException
public void prepareForSerialization() throws com.waveset.util.WavesetException
PersistentObject
to ensure that our
"pathname" within the organization hierarchy is up-to-date
before this object is serialized (i.e., stored persistently).
Otherwise, PersistentObject.getQueryableAttributes()
may expose
an incorrect value for CONTAINED_BY_OBJECT_GROUP
.
Since we must resolve object references in order to do this, we have to do it in this method (while we have an ObjectCache).
prepareForSerialization
in class PersistentObject
com.waveset.util.WavesetException
public void setAuditPolicyRef(com.waveset.object.ObjectRef ref)
public void setAuditPolicyRefs(java.util.List policies)
public void setCache(com.waveset.object.ObjectCache c)
setCache
in class PersistentObject
c
- - an object cachepublic void setCustomForm(java.lang.String key, com.waveset.object.ObjectRef form)
key
- - the index name of the formform
- - object ref of the formpublic void setPath(java.lang.String[] path)
public void setPathAsIDs(java.lang.String[] IDPath)
public void setPolicyRef(com.waveset.object.ObjectRef ref)
public void setPolicyRefs(java.util.List policies)
public void setResourceContainerInfo(ObjectGroup.ResourceContainerInfo resourceContainerInfo)
public void setUseOrgDisplayNames(boolean val)
public void setUserForm(com.waveset.object.Configuration userForm)
public void setUserFormRef(com.waveset.object.ObjectRef userFormRef)
public void setUserMembersRuleCacheTimeout(java.lang.String userMembersRuleCacheTimeout)
public void setUserMembersRuleRef(com.waveset.object.ObjectRef userMembersRuleRef)
public void setViewUserForm(com.waveset.object.Configuration viewUserForm)
public void setViewUserFormRef(com.waveset.object.ObjectRef viewUserFormRef)
public static java.lang.String stripPath(java.lang.String path)
public static boolean useOrgDisplayNames(ObjectSource objSrc) throws com.waveset.util.WavesetException
objSrc
- - an ObjectSource
such as a ViewMaster
or LighthouseContext
.
true
if SystemConfiguration
specifies that object groups should use display names.
Otherwise, if object groups should use organization paths,
return false
.
com.waveset.util.WavesetException
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 |