Oracle Content Management SDK

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
          Deprecated. iFS 9.0.3: this attribute will be removed in a future release
static java.lang.String CLASS_NAME
          Class name for this class.
static java.lang.String CONTENTQUOTA_ATTRIBUTE
          The ContentQuota associated with this group for the purpose of adminstering quota on a group-wise basis.
static java.lang.String OWNERUNIQUENAME_ATTRIBUTE
          A system-set attribute used to ensure no groups owned by a user have duplicate names.
 
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, LOCKOBJECT_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)
          Deprecated. iFS 9.0.3 Use getAllMembers() and index into the resultant array
 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.
 ContentQuota getContentQuota()
          Gets the group's ContentQuota object.
 DirectoryObject[] getDirectMembers()
          Gets the direct members of this instance.
 DirectoryObject getDirectMembers(int index)
          Gets the direct member at the specified index of this group.
static DirectoryGroup getWorldDirectoryGroup(LibrarySession session)
          Gets the DirectoryGroup that represents World access.
 boolean isDirectMember(DirectoryObject member)
          Determines if the specified DirecotryObject is a direct member of the group.
 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.
 void setContentQuota(ContentQuota quota)
          Sets the group's ContentQuota attribute.
 
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, getCategories, getCategories, getCreateDate, getCreator, getDefaultAccessLevel, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFlags, getFolderReferences, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLockObject, getLockState, getLockStateLabel, getOwner, getPolicyBundle, getPropertyBundle, getResolvedPublicObject, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, grantAccess, handleEvent, hasNameAttribute, isLocked, isLockedForSession, isLockedForSessionByCurrentSession, isVersionable, isVersioned, lock, lock, 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, updateLock
 
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
Deprecated. iFS 9.0.3: this attribute will be removed in a future release

A system-set attribute containing the DirectoryObjects that are members of this DirectoryGroup, either directly or indirectly.

OWNERUNIQUENAME_ATTRIBUTE

public static final java.lang.String OWNERUNIQUENAME_ATTRIBUTE
A system-set attribute used to ensure no groups owned by a user have duplicate names.

CONTENTQUOTA_ATTRIBUTE

public static final java.lang.String CONTENTQUOTA_ATTRIBUTE
The ContentQuota associated with this group for the purpose of adminstering quota on a group-wise basis.
Method Detail

getContentQuota

public ContentQuota getContentQuota()
                             throws IfsException
Gets the group's ContentQuota object. Returns null if there is no quota object associated with this group.
Returns:
the ContentQuota assigned to this group
Throws:
IfsException - if the operation fails

setContentQuota

public void setContentQuota(ContentQuota quota)
                     throws IfsException
Sets the group's ContentQuota attribute.
Parameters:
quota - the ContentQuota to be associated with this group
Throws:
IfsException - if the operation fails

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.

getWorldDirectoryGroup

public static DirectoryGroup getWorldDirectoryGroup(LibrarySession session)
                                             throws IfsException
Gets the DirectoryGroup that represents World access.
Parameters:
session - the session
Returns:
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.

If the specified DirectoryObject is null, no action will be taken and no exception will be thrown.

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.

If any of the specified DirectoryObjects is null, that array element will be ignored.

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 specified member must not be the World group.

If the specified DirectoryObject is not a member of this group or is null, no action will be taken and no exception will be thrown.

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.

If any of the specified DirectoryObjects is not a member of this group or is null, that array element will be ignored.

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
Deprecated. iFS 9.0.3 Use getAllMembers() and index into the resultant array

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.

isDirectMember

public boolean isDirectMember(DirectoryObject member)
                       throws IfsException
Determines if the specified DirecotryObject is a direct member of the group.
Parameters:
member - the DirectoryObject that will be checked for membership
Returns:
whether the specified DirectoryObject is a member of the group
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

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.