|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@PublicService public interface FileFolderService
Provides methods specific to manipulating files
and folders.
ContentModel| Method Summary | |
|---|---|
FileInfo |
copy(NodeRef sourceNodeRef,
NodeRef targetParentRef,
java.lang.String newName)
Copy a source file or folder. |
FileInfo |
create(NodeRef parentNodeRef,
java.lang.String name,
QName typeQName)
Create a file or folder; or any valid node of type derived from file or folder |
void |
delete(NodeRef nodeRef)
Delete a file or folder |
FileInfo |
getFileInfo(NodeRef nodeRef)
Get the file info (name, folder, etc) for the given node |
java.util.List |
getNamePath(NodeRef rootNodeRef,
NodeRef nodeRef)
Get the file or folder names from the root down to and including the node provided. |
ContentReader |
getReader(NodeRef nodeRef)
Get the reader to the file represented by the node according to the File/Folder model. |
FileFolderServiceType |
getType(QName typeQName)
Checks the type for whether it is a recognised file or folder type or is invalid for the FileFolderService. |
ContentWriter |
getWriter(NodeRef nodeRef)
Get the writer to the file represented by the node according to the File/Folder model. |
java.util.List |
list(NodeRef contextNodeRef)
Lists immediate child files and folders of the given context node |
java.util.List |
listFiles(NodeRef folderNodeRef)
Lists all immediate child files of the given context node |
java.util.List |
listFolders(NodeRef contextNodeRef)
Lists all immediate child folders of the given context node |
FileInfo |
makeFolders(NodeRef parentNodeRef,
java.util.List pathElements,
QName folderTypeQName)
Deprecated. - See the static helper method FileFolderServiceImpl.makeFolders |
FileInfo |
move(NodeRef sourceNodeRef,
NodeRef targetParentRef,
java.lang.String newName)
Move a file or folder to a new name and/or location. |
FileInfo |
rename(NodeRef fileFolderRef,
java.lang.String newName)
Rename a file or folder in its current location |
FileInfo |
resolveNamePath(NodeRef rootNodeRef,
java.util.List pathElements)
Resolve a file or folder name path from a given root node down to the final node. |
java.util.List |
search(NodeRef contextNodeRef,
java.lang.String namePattern,
boolean includeSubFolders)
Searches for all files and folders with the matching name pattern, using wildcard characters * and ?. |
java.util.List |
search(NodeRef contextNodeRef,
java.lang.String namePattern,
boolean fileSearch,
boolean folderSearch,
boolean includeSubFolders)
Perform a search against the name of the files or folders within a hierarchy. |
NodeRef |
searchSimple(NodeRef contextNodeRef,
java.lang.String name)
Get a simple list of nodes that have the given name within the parent node |
| Method Detail |
|---|
@Auditable(key=ARG_0,
parameters="contextNodeRef")
java.util.List list(NodeRef contextNodeRef)
contextNodeRef - the node to start searching in
@Auditable(key=ARG_0,
parameters="folderNodeRef")
java.util.List listFiles(NodeRef folderNodeRef)
folderNodeRef - the folder to start searching in
@Auditable(key=ARG_0,
parameters="contextNodeRef")
java.util.List listFolders(NodeRef contextNodeRef)
contextNodeRef - the node to start searching in
@Auditable(key=ARG_0,
parameters={"contextNodeRef", "name"})
NodeRef searchSimple(NodeRef contextNodeRef,
java.lang.String name)
contextNodeRef - the parent nodename - the name of the node to search for
@Auditable(key=ARG_0,
parameters={"contextNodeRef", "namePattern", "includeSubFolders"})
java.util.List search(NodeRef contextNodeRef,
java.lang.String namePattern,
boolean includeSubFolders)
contextNodeRef - the context of the search. This node will never be returned
as part of the search results.namePattern - the name of the file or folder to search for, or a
wildcard pattern
to search for.includeSubFolders - true to search the entire hierarchy below the search context
FileFolderService.search(NodeRef, String, boolean, boolean, boolean)
@Auditable(key=ARG_0,
parameters={"contextNodeRef", "namePattern", "fileSearch", "folderSearch", "includeSubFolders"})
java.util.List search(NodeRef contextNodeRef,
java.lang.String namePattern,
boolean fileSearch,
boolean folderSearch,
boolean includeSubFolders)
contextNodeRef - the context of the search. This node will never be returned
as part of the search results.namePattern - the name of the file or folder to search for, or a
wildcard pattern
to search for.fileSearch - true if file types are to be included in the search resultsfolderSearch - true if folder types are to be included in the search resultsincludeSubFolders - true to search the entire hierarchy below the search context
@Auditable(key=ARG_0,
parameters={"fileFolderRef", "newName"})
FileInfo rename(NodeRef fileFolderRef,
java.lang.String newName)
throws FileExistsException,
FileNotFoundException
fileFolderRef - the file or folder to renamenewName - the new name
FileExistsException - if a file or folder with the new name already exists
FileNotFoundException - the file or folder reference doesn't exist
@Auditable(key=ARG_0,
parameters={"sourceNodeRef", "targetParentRef", "newName"})
FileInfo move(NodeRef sourceNodeRef,
NodeRef targetParentRef,
java.lang.String newName)
throws FileExistsException,
FileNotFoundException
If both the parent folder and name remain the same, then nothing is done.
sourceNodeRef - the file or folder to movetargetParentRef - the new parent node to move the node to - null means rename in situnewName - the name to change the file or folder to - null to keep the existing name
FileExistsException
FileNotFoundException
@Auditable(key=ARG_0,
parameters={"sourceNodeRef", "targetParentRef", "newName"})
FileInfo copy(NodeRef sourceNodeRef,
NodeRef targetParentRef,
java.lang.String newName)
throws FileExistsException,
FileNotFoundException
If both the parent folder and name remain the same, then nothing is done.
sourceNodeRef - the file or folder to copytargetParentRef - the new parent node to copy the node to - null means rename in situnewName - the new name, or null to keep the existing name.
FileExistsException
FileNotFoundException
@Auditable(key=ARG_0,
parameters={"parentNodeRef", "name", "typeQName"})
FileInfo create(NodeRef parentNodeRef,
java.lang.String name,
QName typeQName)
throws FileExistsException
parentNodeRef - the parent node. The parent must be a valid
container.name - the name of the nodetypeQName - the type to create
FileExistsException
@Auditable(key=ARG_0,
parameters="nodeRef")
void delete(NodeRef nodeRef)
nodeRef - the node to delete
@Auditable(key=ARG_0,
parameters={"parentNodeRef", "pathElements", "folderTypeQName"})
FileInfo makeFolders(NodeRef parentNodeRef,
java.util.List pathElements,
QName folderTypeQName)
An empty path list is not allowed as it would be impossible to necessarily return file info for the parent node - it might not be a folder node.
parentNodeRef - the node under which the path will be createdpathElements - the folder name path to create - may not be emptyfolderTypeQName - the types of nodes to create. This must be a valid subtype of
they folder type.
@Auditable(key=ARG_0,
parameters={"rootNodeRef", "nodeRef"})
java.util.List getNamePath(NodeRef rootNodeRef,
NodeRef nodeRef)
throws FileNotFoundException
rootNodeRef - the start of the returned path, or null if the store root
node must be assumed.nodeRef - a reference to the file or folder
FileNotFoundException - if the node could not be found
@Auditable(key=ARG_0,
parameters={"rootNodeRef", "pathElements"})
FileInfo resolveNamePath(NodeRef rootNodeRef,
java.util.List pathElements)
throws FileNotFoundException
rootNodeRef - the start of the path given, i.e. the '/' in '/A/B/C' for examplepathElements - a list of names in the path
FileNotFoundException - if no file or folder exists along the path
@Auditable(key=ARG_0,
parameters="nodeRef")
FileInfo getFileInfo(NodeRef nodeRef)
nodeRef - the node to get info for
@Auditable(key=ARG_0,
parameters="nodeRef")
ContentReader getReader(NodeRef nodeRef)
nodeRef - the content node
@Auditable(key=ARG_0,
parameters="nodeRef")
ContentWriter getWriter(NodeRef nodeRef)
nodeRef - the content node
@Auditable(parameters="typeQName") FileFolderServiceType getType(QName typeQName)
typeQName - the type to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||