atg.userdirectory
Interface RoleFolder


public interface RoleFolder

A RoleFolder is a collection of child Roles and RoleFolders that serves as a organizing element for the space of global roles. It is not a Principal; no security permissions may be assigned to a RoleFolder.

Some directory implementations may not support the creation of any folders but the root folder.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 Role createGlobalRole(java.lang.String pRolePath)
          Create an assignable global role in the directory in this RoleFolder.
 RoleFolder createRoleFolder(java.lang.String pFolderPath)
          Create a new role folder within this RoleFolder.
 java.lang.String getName()
           
 RoleFolder getParentFolder()
          Get the parent RoleFolder of this Role, if it belongs to one.
 java.lang.String getPathName()
           
 Role getRole(java.lang.String pRolePath)
          Given the folder-relative pathname of a role, obtain the corresponding global role within this folder if it exists, otherwise return null.
 RoleFolder getRoleFolder(java.lang.String pFolderPath)
          Given the folder-relative pathname of a child folder, obtain the corresponding child folder if it exists, otherwise return null.
 java.util.Collection getRoleFolders()
          Obtain the set of child RoleFolders of this folder.
 java.util.Collection getRoles()
          Obtain a set of global roles in this folder.
 java.util.Collection getRolesSortOnName(int pStartIndex, int pEndIndex, int pSortOrder)
          Obtain a set of global roles in this folder, sorted on the name of the role, with index control of the roles returned.
 void remove()
          Remove this folder and all of its descendant folders and roles from the user directory, and from its parent folder.
 void setName(java.lang.String folderName)
          Rename the RoleFolder
 void setParentFolder(RoleFolder parent)
          Make this RoleFolder the child of another RoleFolder.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getRoles

java.util.Collection getRoles()
Obtain a set of global roles in this folder.

Returns:
a collection of Roles

getRolesSortOnName

java.util.Collection getRolesSortOnName(int pStartIndex,
                                        int pEndIndex,
                                        int pSortOrder)
Obtain a set of global roles in this folder, sorted on the name of the role, with index control of the roles returned.

Parameters:
pStartIndex - starting index of roles in returned Collection of roles.
pEndIndex - ending index of roles in returned Collection of roles.
pSortOrder - sort order of return Collection of roles. values = { UserDirectory.SORT_ASCENDING, UserDirectory.SORT_DESCENDING )
Returns:
a collection of atg.userdirectory.Roles

getName

java.lang.String getName()
Returns:
The name of this folder, not the path from the root folder, just the name within the parent folder.

setName

void setName(java.lang.String folderName)
             throws DirectoryModificationException
Rename the RoleFolder

Parameters:
folderName - The name of the folder within the parent folder. It must have no "/" characters.
Throws:
DirectoryModificationException

getPathName

java.lang.String getPathName()
Returns:
the full path name of this RoleFolder.

setParentFolder

void setParentFolder(RoleFolder parent)
                     throws DirectoryModificationException
Make this RoleFolder the child of another RoleFolder. Every Role and child RoleFolder of this RoleFolder is also moved.

Parameters:
parent - The new parent RoleFolder.
Throws:
DirectoryModificationException

getRoleFolders

java.util.Collection getRoleFolders()
Obtain the set of child RoleFolders of this folder.

Returns:
a collection of RoleFolders

getRole

Role getRole(java.lang.String pRolePath)
Given the folder-relative pathname of a role, obtain the corresponding global role within this folder if it exists, otherwise return null.

Parameters:
pRolePath - the pathname of a role relative to this folder
Returns:
the role with that relative pathname

createGlobalRole

Role createGlobalRole(java.lang.String pRolePath)
                      throws DirectoryModificationException
Create an assignable global role in the directory in this RoleFolder.

If the specified global role already exists, it is simply returned, without any modification to the directory having taken place.

Parameters:
pRolePath - the pathname of the new role relative to this folder. The role will be assigned a full name that is unique within the namespace of all global roles. No path delimiters may be included; the role must be a direct child of this folder.
Returns:
an assignable global Role.
Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.
RoleNotAssignableException - occurs if the role already exists but is not assignable.

getRoleFolder

RoleFolder getRoleFolder(java.lang.String pFolderPath)
Given the folder-relative pathname of a child folder, obtain the corresponding child folder if it exists, otherwise return null.

Parameters:
pFolderPath - the pathname of a child folder relative to this folder
Returns:
the child folder with that relative pathname

createRoleFolder

RoleFolder createRoleFolder(java.lang.String pFolderPath)
                            throws DirectoryModificationException
Create a new role folder within this RoleFolder.

If the specified folder already exists, it is simply returned, without any modification to the directory having taken place.

Parameters:
pFolderPath - the pathname of the new folder relative to this folder.
Returns:
a RoleFolder
Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.

getParentFolder

RoleFolder getParentFolder()
Get the parent RoleFolder of this Role, if it belongs to one.

Returns:
a parent RoleFolder, or null if the role does not belong to any folder.

remove

void remove()
            throws DirectoryModificationException
Remove this folder and all of its descendant folders and roles from the user directory, and from its parent folder.

Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.