|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.folder.FolderTaskLogic
Class FolderTaskLogic
contains static methods to retrieve
and manipulate Folder
and Foldered
objects.
Supported API: false
Folder
,
Supported API: true
Field Summary | |
private static String |
FOLDER_ROOT
|
private static String |
FOLDER_SEPARATOR
|
private static String |
MESSAGES_RESOURCE
|
private static String |
versionID
|
Constructor Summary | |
FolderTaskLogic()
|
Method Summary | |
static Foldered |
changeFolders(Foldered foldered,
Folder new_folder)
Deprecated. Use changeFolders( FolderEntry, Folder) instead Supported API: false |
static FolderEntry |
changeFolders(FolderEntry foldered,
Folder new_folder)
Changes the folder of the given FolderEntry object to the given folder. |
static SortedEnumeration |
getAllCabinets()
Returns a Sorted Enumeration of All Cabinets the current user has access to read. |
static SortedEnumeration |
getAllCabinets(Locale locale)
Returns a Sorted Enumeration of All Cabinets the current user has access to read. |
static SortedEnumeration |
getCabinetsByPermission(String permission)
Retrieves all cabinets for which the current user has the given permission. |
static SortedEnumeration |
getCabinetsByPermission(String permission,
Locale locale)
Retrieves all cabinets for which the current user has the given permission. |
static Cabinet |
getContainingCabinet(CabinetBased cabinet_based)
Returns the Cabinet that contains the given CabinetBased object. |
static String |
getCreatorName(Folder folder)
Returns the String name of the creator of the given SubFolder . |
static Folder |
getFolder(String folder_path)
Returns the Folder specified by the given String
folder path. |
static Folder |
getFolder(String folder_path,
WTContainerRef containerRef)
Returns the Folder specified by the given String
folder path. |
static SortedEnumeration |
getFolderContents(Folder folder)
Returns the contents of the given folder. |
static SortedEnumeration |
getFolderContents(Folder folder,
CollationKeyFactory key)
Returns the contents of the given folder. |
static SortedEnumeration |
getFolderContents(Folder folder,
Locale locale)
Returns the contents of the given folder. |
static String |
getFolderSeparator()
Returns the String which is used as the separator in building the folder path of a folder. |
static String |
getObjectId(CabinetBased object)
Returns a string represenation of the object id of the given CabinetBased object. |
static Folder |
getParentFolder(FolderEntry foldered)
Returns the Folder which is the parent that contains
the given Foldered object. |
static Cabinet |
getPersonalCabinet(WTPrincipal user)
Returns the personal cabinet corresponding to the given WTPrincipal. |
static String |
getRootPath()
Returns a String representation of the root of all cabinets - the top-level in the Cabinet-folder hierarchy. |
static SortedEnumeration |
getSubFolders(Folder folder)
Returns all subfolders of the given folder. |
static SortedEnumeration |
getSubFolders(Folder folder,
CollationKeyFactory key)
Returns the subfolders of the given folder. |
static SortedEnumeration |
getSubFolders(Folder folder,
Locale locale)
Returns all subfolders of the given folder. |
static SortedEnumeration |
getSubFoldersByPermission(String permission,
Folder folder)
Returns the subfolders of the given folder for which the user has the given permission. |
static SortedEnumeration |
getSubFoldersByPermission(String permission,
Folder folder,
Locale locale)
Returns the subfolders of the given folder for which the user has the given permission. |
static boolean |
inPersonalCabinet(CabinetBased cabinet_based)
Returns a boolean value indicating whether or not the given CabinetBased object resides in a personal cabinet. |
static boolean |
inPersonalCabinet(Folder folder)
Returns a boolean value indicating whether or not the given folder is in the current user's personal cabinet. |
static boolean |
inPersonalCabinet(String folder_path)
Returns a boolean value indicating whether or not the folder corresponding to the given String folder path is in the current user's personal cabinet. |
static boolean |
inPersonalCabinet(String folder_path,
WTContainerRef containerRef)
Returns a boolean value indicating whether or not the folder corresponding to the given String folder path is in the current user's personal cabinet. |
static boolean |
isEqual(CabinetBased object_a,
CabinetBased object_b)
Tests the equality of the two given CabinetBased objects. |
static boolean |
isPersonalCabinet(Cabinet cabinet)
Returns a boolean value indicating whether or not the given cabinet is a personal cabinet. |
static void |
setFolder(Foldered foldered_obj,
Folder folder)
Assigns the given Folder as the parent folder containing the
given Foldered object. |
static void |
setFolder(Foldered foldered_obj,
String folder)
Assigns the folder corresponding to the given folder path as the parent folder containing the given Foldered object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private static String MESSAGES_RESOURCE
private static String FOLDER_ROOT
private static String FOLDER_SEPARATOR
Constructor Detail |
public FolderTaskLogic()
Method Detail |
public static String getRootPath()
public static String getFolderSeparator()
public static Folder getFolder(String folder_path) throws FolderException, WTException
Folder
specified by the given String
folder path.
Folder
represented by the given path
FolderException
- if the given path does not correspond
to an actual folder
WTException
- if an error occurs trying to
retrieve the folder
public static Folder getFolder(String folder_path, WTContainerRef containerRef) throws FolderException, WTException
Folder
specified by the given String
folder path.
Folder
represented by the given path
FolderException
- if the given path does not correspond
to an actual folder
WTException
- if an error occurs trying to
retrieve the folder
public static Folder getParentFolder(FolderEntry foldered) throws WTException
Folder
which is the parent that contains
the given Foldered
object.
foldered
- the Foldered
object whose parent
is to be returned
WTException
- if an error occurs retrieving the parent
folder of the given FolderEntry
public static SortedEnumeration getAllCabinets() throws QueryException, WTException
QueryException
- if an error occurs querying the database for
cabinets
WTException
- if an error occurs retrieving the cabinets.
Supported API: true
public static SortedEnumeration getAllCabinets(Locale locale) throws QueryException, WTException
locale
- the Locale in which to sort the cabinets
QueryException
- if an error occurs querying the database for
cabinets
WTException
- if an error occurs retrieving the cabinets.
Supported API: true
public static SortedEnumeration getCabinetsByPermission(String permission) throws QueryException, WTException
QueryException
- if an error occurs querying the database for
cabinets
WTException
- if an error occurs retrieving the cabinets
Supported API: true
public static SortedEnumeration getCabinetsByPermission(String permission, Locale locale) throws QueryException, WTException
locale
- the Locale in which sorting should be done
QueryException
- if an error occurs querying the database for
cabinets
WTException
- if an error occurs retrieving the cabinets
Supported API: true
public static String getCreatorName(Folder folder) throws WTException
SubFolder
.
folder
- the Folder for which the name of the creator is
returned
WTException
- if an error occurs retrieving the creator of
the folder.
public static void setFolder(Foldered foldered_obj, Folder folder) throws WTException
Folder
as the parent folder containing the
given Foldered
object. This method should not be used to
change the folder of a foldered object, but should be used to set the
folder of a foldered object for the first time.
foldered_obj
- the Foldered
object whose parent folder
is assignedfolder
- the Folder
assigned as the parent folder
of the given foldered object
WTException
- if an error occurs assigning the folder of the given
foldered object.
Supported API: true
public static void setFolder(Foldered foldered_obj, String folder) throws WTException
Foldered
object. This method should
not be used to change the folder of a foldered object, but should be used
to set the folder of a foldered object for the first time.
foldered_obj
- the Foldered
object whose parent folder
is assignedfolder
- the String folder path corresponding to the folder
to be assigned as the parent folder of the given foldered object
WTException
- if an error occurs assigning the folder of the given
foldered object
Supported API: true
public static Foldered changeFolders(Foldered foldered, Folder new_folder) throws WTException
foldered
- the FolderEntry
object whose parent folder
is reassignednew_folder
- the Folder
to be assigned as the new
parent containing the given foldered object.
WTException
- if an error occurs changing the folder of the
given foldered object.setFolder(wt.folder.Foldered, wt.folder.Folder)
public static FolderEntry changeFolders(FolderEntry foldered, Folder new_folder) throws WTException
foldered
- the FolderEntry
object whose parent folder
is reassignednew_folder
- the Folder
to be assigned as the new
parent containing the given FolderEntry object.
WTException
- if an error occurs changing the folder of the
given FolderEntry object.
public static SortedEnumeration getSubFolders(Folder folder) throws WTException
folder
- the Folder whose subfolders are returned
WTException
- if an error occurs retrieving the subfolders.
public static SortedEnumeration getSubFolders(Folder folder, Locale locale) throws WTException
folder
- the Folder whose subfolders are returnedlocale
- the Locale used for sorting the folders
WTException
- if an error occurs retrieving the subfolders.
public static SortedEnumeration getSubFolders(Folder folder, CollationKeyFactory key) throws WTException
folder
- the Folder whose subfolders are returnedkey
- the CollationKeyFactory specifying how the subfolders are
sorted
WTException
- if an error occurs retrieving the subfolders.
public static SortedEnumeration getFolderContents(Folder folder) throws WTException
folder
- the folder whose contents are returned
WTException
- if an error occurs retrieving the folder contents
Supported API: true
public static SortedEnumeration getFolderContents(Folder folder, Locale locale) throws WTException
folder
- the folder whose contents are returnedlocale
- the Locale used for sorting the folders
WTException
- if an error occurs retrieving the folder contents
Supported API: true
public static SortedEnumeration getFolderContents(Folder folder, CollationKeyFactory key) throws WTException
folder
- the folder whose contents are returnedkey
- the CollationKeyFactory specifying the sorting order
of the returned SortedEnumeration
WTException
- if an error occurs retrieving the folder contentsCollationKeyFactory
,
Supported API: true
public static SortedEnumeration getSubFoldersByPermission(String permission, Folder folder) throws WTException
permission
- a String permission; only those subfolders for which the
current user has the given permission are returnedfolder
- the Folder whose subfolders are returned
WTException
- if an error occurs retrieving the subfolders.
public static SortedEnumeration getSubFoldersByPermission(String permission, Folder folder, Locale locale) throws WTException
permission
- a String permission; only those subfolders for which the
current user has the given permission are returnedfolder
- the Folder whose subfolders are returnedlocale
- the Locale in which to sort the folders
WTException
- if an error occurs retrieving the subfolders.
public static String getObjectId(CabinetBased object)
CabinetBased
object. The object id is useful
as a key to the object.
object
- the CabinetBased object whose object id is
returned
public static boolean isEqual(CabinetBased object_a, CabinetBased object_b) throws WTException
object_a
- one of the objects to be compared for equalityobject_b
- one of the objects to be compared for equality
WTException
- if an error occurs retrieving the WTReferences
of the given objects
Supported API: true
public static Cabinet getPersonalCabinet(WTPrincipal user) throws FolderNotFoundException, WTException
user
- the WTPrincipal whose personal cabinet is returned
FolderNotFoundException
- if the Cabinet of the given WTPrincipal
does not exist
WTException
- if an error occurs retrieving the personal Cabinet
public static Cabinet getContainingCabinet(CabinetBased cabinet_based) throws WTException
CabinetBased
object.
cabinet_based
- the CabinetBased
object whose containing
cabinet is returned.
CabinetBased
object
WTException
- public static boolean isPersonalCabinet(Cabinet cabinet)
public static boolean inPersonalCabinet(Folder folder) throws WTException
folder
- the folder to be test
WTException
- if an error occurs testing the given folder
public static boolean inPersonalCabinet(String folder_path) throws FolderNotFoundException, WTException
folder_path
- the String folder path corresponding to the folder to
be tested
WTException
- if an error occurs testing the given folder path
FolderNotFoundException
public static boolean inPersonalCabinet(String folder_path, WTContainerRef containerRef) throws FolderNotFoundException, WTException
folder_path
- the String folder path corresponding to the folder to
be tested
WTException
- if an error occurs testing the given folder path
FolderNotFoundException
public static boolean inPersonalCabinet(CabinetBased cabinet_based) throws WTException
cabinet_based
- the object to be tested for residing in a
personal cabinet
WTException
- if an error occurs testing the given cabinet_based
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |