wt.folder
Interface FolderCache

All Known Implementing Classes:
DefaultFolderCache, PassThruFolderCache

public interface FolderCache

Allows for alternate implementations of folder caching. The two OOTB implementations are DefaultFolderCache and PassThruFolderCache.

Supported API: false

Extendable: false


Nested Class Summary
static class FolderCache.NamesToFoldersKey
           
 
Method Summary
 WTList getCabinetsByName(WTList ordered_containers, List ordered_cabinet_names, boolean read_only)
          Get the cabinets in the given parent containers with the given names.
 WTValuedMap getChildToParentMap(WTCollection children, boolean read_only)
          Get the parents of the given child folders
 WTKeyedMap getContainerToCabinetMap(WTCollection containers, boolean shared_only, boolean read_only)
          Get all of the cabinets that are in the given containers
 WTKeyedMap getParentToSubFoldersMap(WTCollection parents, boolean read_only)
          Get all the subfolders of the given parent folders
 WTList getSubFoldersByName(WTList ordered_parents, List ordered_child_names, boolean read_only)
          Get the children of the given parents with the given names.
 WTValuedMap getUserToCabinetMap(WTCollection users, boolean read_only)
          Get the personal cabinets for the given
 

Method Detail

getChildToParentMap

public WTValuedMap getChildToParentMap(WTCollection children,
                                       boolean read_only)
                                throws WTException
Get the parents of the given child folders

Parameters:
children - A collection of child folders. The implementation will not inflate the children
read_only - Whether or not the cached instances of the parents should be returned, if applicable
Returns:
The mapping of child folders to parent folders
Throws:
WTException

getSubFoldersByName

public WTList getSubFoldersByName(WTList ordered_parents,
                                  List ordered_child_names,
                                  boolean read_only)
                           throws WTException
Get the children of the given parents with the given names. This API needs to be list-based as neither the parent oids nor the child names need to be unique, and therefore neither can be used as a map key.

Parameters:
ordered_parents - A list of the parent folders to query in. This may either have as many elements as names, or have a single element used with each name
ordered_child_names - A list of child names to find subfolders for within the corresponding parent folder
read_only - Whether or not the cached instances of the subfolders should be returned, if applicable
Returns:
A WTList of the matching subfolders, in the same order as the input parameters.
Throws:
FolderNotFoundException - If any of the subfolders couldn't be found
WTException

getCabinetsByName

public WTList getCabinetsByName(WTList ordered_containers,
                                List ordered_cabinet_names,
                                boolean read_only)
                         throws WTException
Get the cabinets in the given parent containers with the given names. This API needs to be list-based as neither the container oids nor the cabinet names need to be unique, and therefore neither can be used as a map key.

Parameters:
ordered_containers - A list of the containers to query in. This may either have as many elements as names, or have a single element used with each name
ordered_cabinet_names - A list of cabinet names to find cabinets for within the corresponding container
read_only - Whether or not the cached instances of the cabinets should be returned, if applicable
Returns:
A WTList of the matching cabinets, in the same order as the input parameters.
Throws:
FolderNotFoundException - If any of the cabinets couldn't be found
WTException

getUserToCabinetMap

public WTValuedMap getUserToCabinetMap(WTCollection users,
                                       boolean read_only)
                                throws WTException
Get the personal cabinets for the given

Parameters:
users - The users to find personal cabinets for
read_only - Whether or not the cached instances of the cabinets should be returned, if applicable
Returns:
A mapping of users to personal cabinets or to null if the user does not have a personal cabinet.
Throws:
WTException

getContainerToCabinetMap

public WTKeyedMap getContainerToCabinetMap(WTCollection containers,
                                           boolean shared_only,
                                           boolean read_only)
                                    throws WTException
Get all of the cabinets that are in the given containers

Parameters:
containers - The containers to search in
shared_only - Whether or not to only return shared cabinets
read_only - Whether or not the cached instances of the cabinets should be returned, if applicable
Returns:
A mapping of the input containers to WTSets of all their cabinets
Throws:
WTException

getParentToSubFoldersMap

public WTKeyedMap getParentToSubFoldersMap(WTCollection parents,
                                           boolean read_only)
                                    throws WTException
Get all the subfolders of the given parent folders

Parameters:
parents - The parent folders to find children for
read_only - Whether or not the cached instances of the subfolders should be returned, if applicable
Returns:
A mapping of parent folders to WTSets of their child folders
Throws:
WTException