oracle.ifs.beans
Class DirectoryGroup


java.lang.Object

  |

  +--oracle.ifs.beans.LibraryObject

        |

        +--oracle.ifs.beans.TieLibraryObject

              |

              +--oracle.ifs.beans.PublicObject

                    |

                    +--oracle.ifs.beans.TiePublicObject

                          |

                          +--oracle.ifs.beans.DirectoryObject

                                |

                                +--oracle.ifs.beans.TieDirectoryObject

                                      |

                                      +--oracle.ifs.beans.DirectoryGroup

All Implemented Interfaces:
DirectoryObjectInterface, IfsEventHandler, LibraryObjectInterface, PublicObjectInterface, Traceable
Direct Known Subclasses:
TieDirectoryGroup

public class DirectoryGroup
extends TieDirectoryObject

A DirectoryGroup represents an iFS group of users and/or other groups.

This class enables defining membership relationships by providing methods to add or or remove instances of the GroupMembershiprelationship class.

Also provided are methods to fetch the direct members of this group (that is, DirectoryObejcts that have a GroupMembershiprelationship associated with this object), and "all members" (also known as "fully resolved members") of the group, which is the union of the direct members and the fully resolved members of each of the direct members.

There is one special instance of DirectoryGroup, known as the "World" group. This group has an implied set of direct members that includes all DirectoryUsers defined in the server.


Field Summary
static java.lang.String ALLMEMBERS_ATTRIBUTE
          A system-set attribute containing the DirectoryObjects that are members of this DirectoryGroup, either directly or indirectly.
static java.lang.String CLASS_NAME
          Class name for this class.
 
Fields inherited from class oracle.ifs.beans.PublicObject
ACL_ATTRIBUTE, ADMINISTRATIONGROUP_ATTRIBUTE, CREATEDATE_ATTRIBUTE, CREATOR_ATTRIBUTE, DELETOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, EXPIRATIONDATE_ATTRIBUTE, FAMILY_ATTRIBUTE, FLAGS_ATTRIBUTE, LASTMODIFIER_ATTRIBUTE, LASTMODIFYDATE_ATTRIBUTE, LOCKEDFORSESSION_ATTRIBUTE, LOCKSTATE_ATTRIBUTE, LOCKSTATE_HARDLOCK, LOCKSTATE_SESSIONLOCK, LOCKSTATE_SOFTLOCK, LOCKSTATE_UNLOCK, LOCKSTATE_USERLOCK, NAME_ATTRIBUTE, OWNER_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE, RESOLVEDPUBLICOBJECT_ATTRIBUTE, SECURINGPUBLICOBJECT_ATTRIBUTE
 
Method Summary
 void addMember(DirectoryObject member)
          Adds a direct member to the group.
 void addMembers(DirectoryObject[] members)
          Adds a set of direct members to the group.
 DirectoryObject[] getAllMembers()
          Returns array of DirectoryObject that define the list of all members for this instance.
 DirectoryObject getAllMembers(int index)
          Gets the member at the specified index of this group.
 DirectoryUser[] getAllUserMembers()
          Gets the array of DirectoryUser that define the list of all DirectoryUser members for this instance.
 DirectoryUser getAllUserMembers(int index)
          Gets the member DirectoryUser at the specified index of this group.
 DirectoryObject[] getDirectMembers()
          Gets the direct members of this instance.
 DirectoryObject getDirectMembers(int index)
          Gets the direct member at the specified index of this group.
 void handleEvent(IfsEvent event)
          Handles the specified event and clears the cache of direct members.
 boolean isMember(DirectoryObject obj)
          Determines if the specified DirecotryObject is a member of the group.
 boolean isWorldGroup()
          Tests whether this group is the World group (the virtual group that contains all users).
 void removeMember(DirectoryObject member)
          Removes a direct member from the group.
 void removeMembers(DirectoryObject[] members)
          Removes a set of direct members from the group.
 
Methods inherited from class oracle.ifs.beans.DirectoryObject
getAllAncestors, getAllAncestors, getDirectAncestors, getDirectAncestors, resetAllAncestors, resetDirectAncestors
 
Methods inherited from class oracle.ifs.beans.PublicObject
addCategory, addRelationship, checkEffectiveAccess, checkEffectiveAccess, copy, getAcl, getAllFolderPaths, getAllFolderPaths, getAnyFolderPath, getAnyFolderPath, getCategories, getCategories, getCreateDate, getCreator, getDefaultAccessLevel, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFlags, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLockedState, getLockState, getLockStateLabel, getOwner, getPolicyBundle, getPropertyBundle, getResolvedPublicObject, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, grantAccess, hasNameAttribute, isLocked, isLockedForSession, isLockedForSessionByCurrentSession, isVersionable, isVersioned, lock, putPolicy, putProperty, putProperty, removeAllPolicies, removeAllProperties, removePolicy, removePolicy, removeProperty, removeRelationship, revokeAccess, revokeAllAccess, setAcl, setDescription, setExpirationDate, setFlags, setFolderReferencesSortSpecification, setOwner, setPolicyBundle, setPropertyBundle, setSecuringPublicObject, toLockStateLabel, toLockStateLabel, toLockStateLabel, unlock
 
Methods inherited from class oracle.ifs.beans.LibraryObject
equals, free, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getLabel, getName, getSession, invokeServerMethod, isInstanceOf, isTraced, lookupInstanceLabel, postEvent, postEvent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setName, toString, trace, update
 
Methods inherited from interface oracle.ifs.common.LibraryObjectInterface
getId
 
Methods inherited from interface oracle.ifs.common.Traceable
getTraceLogger, isTraced, trace
 

Field Detail


CLASS_NAME


public static final java.lang.String CLASS_NAME
Class name for this class.

Useful for methods that take a class name argument.

ALLMEMBERS_ATTRIBUTE


public static final java.lang.String ALLMEMBERS_ATTRIBUTE
A system-set attribute containing the DirectoryObjects that are members of this DirectoryGroup, either directly or indirectly.
Method Detail

isWorldGroup


public boolean isWorldGroup()
                     throws IfsException
Tests whether this group is the World group (the virtual group that contains all users).
Returns:
true if the group is the World group
Throws:
IfsException - if operation fails.

addMember


public void addMember(DirectoryObject member)
               throws IfsException
Adds a direct member to the group.

The member must not be the World group, nor can it already be a member of this group.

Also, it is not legal to add a DirectoryGroup to this * instance. Doing so would result in cyclic membership definition. For example, if DirectoryGroup A had a direct member of DirectoryGroup B, and DirectoryGroup B had a direct member of DirectoryGroup C, then it would be illegal to add DirectoryGroup A as a direct member of DirectoryGroup C.

Parameters:
member - the member to add to this DirectoryGroup
Throws:
IfsException - if the operation fails.

addMembers


public void addMembers(DirectoryObject[] members)
                throws IfsException
Adds a set of direct members to the group.

The membership restrictions are the same as outlined in the addMember method. If any member specified does not qualify as a valid member, the entire operation is not performed.

Parameters:
members - the members to add as direct members to this instance
Throws:
IfsException - if the operation fails.

removeMember


public void removeMember(DirectoryObject member)
                  throws IfsException
Removes a direct member from the group.

The member must not be the World group, and must already be a member of this group.

Parameters:
member - the member to remove from this DirectoryGroup
Throws:
IfsException - if the operation fails.

removeMembers


public void removeMembers(DirectoryObject[] members)
                   throws IfsException
Removes a set of direct members from the group.

The member specified must comply with the restrictions outlined in the removeMember method. If any member specified is not valid, the entire operation is not performed.

Parameters:
members - the members to add as direct members to this instance
Throws:
IfsException - if the operation fails.

getAllMembers


public DirectoryObject[] getAllMembers()
                                throws IfsException
Returns array of DirectoryObject that define the list of all members for this instance.

This list is the full set of DirectoryObject that are members (directly or indirectly) of this DirectoryGroup.

Overrides:
getAllMembers in class DirectoryObject
Returns:
array of member DirectoryObject
Throws:
IfsException - if operation fails.

getAllMembers


public DirectoryObject getAllMembers(int index)
                              throws IfsException
Gets the member at the specified index of this group.
Overrides:
getAllMembers in class DirectoryObject
Parameters:
index - index into the array of DirectoryObjects
Returns:
the requested DirectoryObject
Throws:
IfsException - if operation fails.

getAllUserMembers


public DirectoryUser[] getAllUserMembers()
                                  throws IfsException
Gets the array of DirectoryUser that define the list of all DirectoryUser members for this instance.

This list is the full set of DirectoryUser that are members (directly or indirectly) of this DirectoryGroup.

Overrides:
getAllUserMembers in class DirectoryObject
Returns:
array of member DirectoryUser
Throws:
IfsException - if operation fails.

getAllUserMembers


public DirectoryUser getAllUserMembers(int index)
                                throws IfsException
Gets the member DirectoryUser at the specified index of this group.
Overrides:
getAllUserMembers in class DirectoryObject
Parameters:
index - index into the array of AllUserMembers
Returns:
the requested DirectoryUser
Throws:
IfsException - if operation fails.

getDirectMembers


public DirectoryObject[] getDirectMembers()
                                   throws IfsException
Gets the direct members of this instance.
Overrides:
getDirectMembers in class DirectoryObject
Returns:
array of direct member DirectoryObjects
Throws:
IfsException - if operation fails.

getDirectMembers


public DirectoryObject getDirectMembers(int index)
                                 throws IfsException
Gets the direct member at the specified index of this group.
Overrides:
getDirectMembers in class DirectoryObject
Parameters:
index - index into the array of DirectoryObjects
Returns:
the requested DirectoryObject
Throws:
IfsException - if operation fails.

isMember


public boolean isMember(DirectoryObject obj)
                 throws IfsException
Determines if the specified DirecotryObject is a member of the group.
Parameters:
id - a DirectoryObject
Returns:
whether the specified DirectoryObject is a member of the group
Throws:
IfsException - if the operation fails

handleEvent


public void handleEvent(IfsEvent event)
                 throws IfsException
Handles the specified event and clears the cache of direct members.
Overrides:
handleEvent in class DirectoryObject
Parameters:
event - the event
Throws:
IfsException - if the operation fails