org.apache.jetspeed.page.document
Interface FolderHandler


public interface FolderHandler

FolderHandler

Version:
$Id: FolderHandler.java 553584 2007-07-05 18:09:45Z taylor $
Author:
Scott T. Weaver

Method Summary
 Folder getFolder(String path)
           getFolder
 Folder getFolder(String path, boolean fromCache)
           getFolder
 NodeSet getFolders(String path)
           getFolders
 NodeSet getNodes(String path, boolean regexp, String documentType)
           getNodes
 boolean isFolder(String path)
          Returns true if the path is a folder
 String[] list(String folderPath, String documentType)
           list
 String[] listAll(String folderPath)
           
 void removeFolder(Folder folder)
           removeFolder
 void updateFolder(Folder folder)
           updateFolder
 

Method Detail

getFolder

Folder getFolder(String path)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException

getFolder

Locates a folder given using the path argument. This should behave as getFolder("folder/subfolder, true);

Parameters:
path - fully-quallified path to a folder
Returns:
Folder represented by the path argument. Never returns null
Throws:
DocumentException - if there was an error processing the request.
InvalidFolderException
NodeException
DocumentNotFoundException - If there is no folder at the path specified.
FolderNotFoundException

updateFolder

void updateFolder(Folder folder)
                  throws FailedToUpdateFolderException

updateFolder

Updates the folder specified with the folder argument.

Parameters:
folder - folder to update
Throws:
FailedToUpdateFolderException

removeFolder

void removeFolder(Folder folder)
                  throws FailedToDeleteFolderException

removeFolder

Removes the folder specified with the folder argument.

Parameters:
folder - folder to update
Throws:
FailedToDeleteFolderException

getFolder

Folder getFolder(String path,
                 boolean fromCache)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException

getFolder

Locates a folder given using the path argument.

Parameters:
path - fully-quallified path to a folder
fromCache - whether or not to check the cache first before checking the underlying folder repository.
Returns:
Folder represented by the path argument. Never returns null
Throws:
DocumentException - if there was an error processing the request.
InvalidFolderException
NodeException
DocumentNotFoundException - If there is no folder at the path specified.
FolderNotFoundException

getFolders

NodeSet getFolders(String path)
                   throws FolderNotFoundException,
                          InvalidFolderException,
                          NodeException

getFolders

Parameters:
path - Path from which to locate child folders
Returns:
NodeSet of sub-folders located under the path argument.
Throws:
FolderNotFoundException - if folder under the path does not actually exist
DocumentException - if an error is encountered reading the folders.
InvalidFolderException
NodeException

list

String[] list(String folderPath,
              String documentType)
              throws FolderNotFoundException

list

generates a list of document names, relative to the folderPath argument of the type indicated by the documentType argument.

Parameters:
folderPath - folder path to search under
documentType - document type to filter on.
Returns:
a String[] of child document names relative to the folderPath argument and matching the documentType argument.
Throws:
FolderNotFoundException - if the folderPath does not exsit.

listAll

String[] listAll(String folderPath)
                 throws FolderNotFoundException
Throws:
FolderNotFoundException

getNodes

NodeSet getNodes(String path,
                 boolean regexp,
                 String documentType)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException

getNodes

Returns a set of nodes relative to the folder argument of the type indicated by the documentType argument. The folder argument may include regular expressions if indicated by the regex argument. The returned set is unordered.

Parameters:
path - Path from which to locate documents
regexp - Flag indicating whether regexp should be expanded in path
documentType - document type to filter on.
Returns:
NodeSet of documents and folders located under the path argument.
Throws:
FolderNotFoundException - if folder under the path does not actually exist.
DocumentException - if an error is encountered reading the folders.
InvalidFolderException
NodeException

isFolder

boolean isFolder(String path)
Returns true if the path is a folder

Parameters:
path -
Returns:


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.