Class FolderHelper
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassignLocation(WTCollection entries, Folder folder) Assigns a collection of FolderEntry objects to a given Folder.static voidassignLocation(FolderEntry new_entry, String location) Deprecated.static voidassignLocation(FolderEntry new_entry, Folder location) Assign the initial location of the foldered object.static voidassignLocations(WTValuedMap entry_to_folder_map) Assigns each FolderEntry key in the input map to the corresponding Folder map value.static WTValuedMapgetCabinetBasedToCabinetMap(WTCollection objects) Get the cabinets for the given set of CabinetBased objects.static WTValuedMapgetCabinetBasedToFolderMap(WTCollection objects) Get the parent folders for the given collection of CabinetBased objects.static WTKeyedMapgetCabinetBasedToLocationMap(WTCollection objects) Get the locations for the given CabinetBased objects.static WTKeyedMapgetCabinetBasedToPathMap(WTCollection objects) Get the paths for the given CabinetBased objects.static WTKeyedMapGet the paths for the given CabinetBased objects.static StringgetFolderPath(CabinetBased object) calculates the folder path of the specified entry
Supported API: truestatic StringgetLocation(CabinetBased object) calculates the location of aCabinetBasedobject where location is defined as the the folder path of theFolderthat the object is part of
Supported API: truestatic WTSetgetObjsInPersonalCabinets(WTCollection objsToCheck) Given an input WTCollection of CabinetBased objects, this routine returns the subset which reside in personal cabinets.
-
Field Details
-
service
Supported API: true
-
-
Method Details
-
assignLocation
Assign the initial location of the foldered object. This is required before a Foldered object can be stored in the database. This may not be used after the first store.
Supported API: true- Parameters:
new_entry-location-- Throws:
WTException- See Also:
-
assignLocation
@Deprecated public static void assignLocation(FolderEntry new_entry, String location) throws WTException, FolderNotFoundException Deprecated.Replaced byassignLocations(WTValuedMap)Assign the initial location of the foldered object. This is required before a Foldered object can be stored in the database. This may not be used after the first store. The string location supplied must be a valid folderpath. The operation will make a client-server hit to validate the location.
Supported API: true- Parameters:
new_entry-location-- Throws:
WTExceptionFolderNotFoundException
-
getFolderPath
calculates the folder path of the specified entry
Supported API: true- Parameters:
object-- Returns:
nullif the object has not been assigned to aFolderyet- Throws:
WTException- if a low level error occurs- See Also:
-
getLocation
calculates the location of aCabinetBasedobject where location is defined as the the folder path of theFolderthat the object is part of
Supported API: true- Parameters:
object-- Returns:
nullif the object has not been assigned to aFolderyet- Throws:
WTException- if a low level error occurs- See Also:
-
assignLocation
Assigns a collection of FolderEntry objects to a given Folder.
Supported API: true- Parameters:
entries-folder- Folder to assign objects to- Throws:
WTException- See Also:
-
assignLocations
Assigns each FolderEntry key in the input map to the corresponding Folder map value. This is required before a Foldered object can be stored in the database. This may not be used after the first store.
Supported API: true- Parameters:
entry_to_folder_map- map from FolderEntry objects to the Folders to which they are to be assigned- Throws:
WTException
-
getCabinetBasedToFolderMap
Get the parent folders for the given collection of CabinetBased objects. If any of the objects are Cabinets, then they are mapped to null.If any of the objects are Foldered, then the implementation will first check to see if their FolderingInfos contain a cached reference to their parent folder, and use the cached instance as the return value. So in some cases this API will not require a trip to the server.
Supported API: true- Parameters:
objects- The CabinetBased objects to find folders for- Returns:
- A mapping of the objects to their parent folders
- Throws:
FolderNotFoundExceptionWTException
-
getCabinetBasedToLocationMap
Get the locations for the given CabinetBased objects. The current user must have read access to all of their ancestor folders.If any of the objects are Foldered, then the implementation will first check to see if their FolderingInfos contain a cached location, and use the cached location as the return value. So in some cases this API will not require a trip to the server.
Supported API: true- Parameters:
objects- The CabinetBased objects to find locations for- Returns:
- A mapping of CabinetBased objects to locations
- Throws:
FolderNotFoundExceptionWTException
-
getCabinetBasedToPathMap
Get the paths for the given CabinetBased objects. The path includes the folder location of the object along with its own nameIf any of the objects are Foldered, then the implementation will first check to see if their FolderingInfos contain a cached reference to their path, and use the cached path as the return value. So in some cases this API will not require a trip to the server.
Supported API: true- Parameters:
objects- The CabinetBased objects to find paths for- Returns:
- A mapping of CabinetBased objects to paths
- Throws:
FolderNotFoundExceptionWTException
-
getCabinetBasedToPathMapSecure
Get the paths for the given CabinetBased objects. The path includes the folder location of the object along with its own name. If the current user does not have Read access permission for the object or any folder in the folder path, no entry is returned in the map for that object.If any of the objects are Foldered, then the implementation will first check to see if their FolderingInfos contain a cached reference to their path, and use the cached path as the return value. So in some cases this API will not require a trip to the server.
Supported API: true- Parameters:
objects- The CabinetBased objects to find paths for- Returns:
- A mapping of CabinetBased objects to paths
- Throws:
FolderNotFoundExceptionWTException
-
getCabinetBasedToCabinetMap
Get the cabinets for the given set of CabinetBased objects. Cabinets are mapped to a reference to themselves.This implementation will not inflate the resutling CabinetRefernece objects. To ensure the references are inflated, use
FolderService.getCabinetBasedToCabinetMap(wt.fc.collections.WTCollection)
Supported API: true- Parameters:
objects-- Returns:
- A mapping of the CabinetBased objects to their cabinets
- Throws:
WTException
-
getObjsInPersonalCabinets
Given an input WTCollection of CabinetBased objects, this routine returns the subset which reside in personal cabinets. Note that if non-CabinetBased objects are included in the input collection they are simply automatically excluded from the output collection as they have no associated Cabinet.This implementation will minimize client-server traffic by checking for inflated cabinet references on the input collection, and using the cached information if available.
This is a multi-object form of
inPersonalCabinet(CabinetBased).
Supported API: true- Parameters:
objsToCheck- objects to determine which reside in a personal cabinet- Returns:
- WTSet
- Throws:
WTException- See Also:
-
assignLocations(WTValuedMap)