|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.filesys.repo.CifsHelper
public class CifsHelper
Class with supplying helper methods and potentially acting as a cache for queries.
Constructor Summary | |
---|---|
CifsHelper()
Class constructor |
Method Summary | |
---|---|
NodeRef |
createNode(NodeRef rootNodeRef,
java.lang.String path,
boolean isFile)
Creates a file or directory using the given paths. |
ContentFileInfo |
getFileInformation(NodeRef nodeRef)
Helper method to extract file info from a specific node. |
ContentFileInfo |
getFileInformation(NodeRef pathRootNodeRef,
java.lang.String path)
Extract a single node's file info, where the node is reference by a path relative to an ancestor node. |
java.lang.String |
getFileName(NodeRef node)
Return the file name for a node |
NodeRef |
getNodeRef(NodeRef pathRootNodeRef,
java.lang.String path)
Attempts to fetch a specific single node at the given path. |
java.util.List |
getNodeRefs(NodeRef pathRootNodeRef,
java.lang.String path)
Finds the nodes being reference by the given directory and file paths. |
boolean |
hasLockedFilesAsOffline()
Check if locked files should be marked as offline |
boolean |
isDirectory(NodeRef nodeRef)
|
boolean |
isFolderEmpty(NodeRef folderNode)
Check if the folder node is empty |
boolean |
isReadOnly()
|
void |
move(NodeRef nodeToMoveRef,
NodeRef newParentNodeRef,
java.lang.String newName)
Move a node |
void |
relinkNode(NodeRef tempNodeRef,
NodeRef nodeToMoveRef,
NodeRef newParentNodeRef,
java.lang.String newName)
Relink the content data from a new node to an existing node to preserve the version history. |
void |
rename(NodeRef nodeToRenameRef,
java.lang.String newName)
Rename a node |
void |
setAllowWrites(boolean allowWrites)
Set whether the system allows files to be edited or not. |
void |
setDictionaryService(DictionaryService dictionaryService)
|
void |
setFileFolderService(FileFolderService fileFolderService)
|
void |
setMarkLockedFilesAsOffline(boolean ena)
Enable marking of locked files as offline |
void |
setMimetypeService(MimetypeService mimetypeService)
|
void |
setNodeService(NodeService nodeService)
|
void |
setPermissionService(PermissionService permissionService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CifsHelper()
Method Detail |
---|
public void setDictionaryService(DictionaryService dictionaryService)
public void setNodeService(NodeService nodeService)
public void setFileFolderService(FileFolderService fileFolderService)
public void setMimetypeService(MimetypeService mimetypeService)
public void setPermissionService(PermissionService permissionService)
public boolean isReadOnly()
public void setAllowWrites(boolean allowWrites)
allowWrites
- true to allow writes, otherwise false for read-only modepublic final void setMarkLockedFilesAsOffline(boolean ena)
ena
- booleanpublic final boolean hasLockedFilesAsOffline()
public boolean isDirectory(NodeRef nodeRef)
serviceRegistry
- for repo connectionnodeRef
-
folder
org.alfresco.error.AlfrescoRuntimeException
- if the type is neither related to a folder or contentpublic ContentFileInfo getFileInformation(NodeRef pathRootNodeRef, java.lang.String path) throws java.io.FileNotFoundException
pathRootNodeRef
- path
-
java.io.FileNotFoundException
public ContentFileInfo getFileInformation(NodeRef nodeRef) throws java.io.FileNotFoundException
This method goes direct to the repo for all information and no data is cached here.
nodeRef
- the node that the path is relative topath
- the path to get info for
java.io.FileNotFoundException
- if the path refers to a non-existent filepublic NodeRef createNode(NodeRef rootNodeRef, java.lang.String path, boolean isFile) throws org.alfresco.jlan.server.filesys.FileExistsException
If the directory path doesn't exist, then all the parent directories will be created.
If the file path is null
, then the file will not be created
rootNodeRef
- the root node of the pathpath
- the path to a nodeisFile
- true if the node to be created must be a file
org.alfresco.jlan.server.filesys.FileExistsException
- if the file or folder already existspublic java.util.List getNodeRefs(NodeRef pathRootNodeRef, java.lang.String path)
Examples of the path are:
searchRootNodeRef
- the node from which to start the path searchpath
- the search path to either a folder or file
public NodeRef getNodeRef(NodeRef pathRootNodeRef, java.lang.String path) throws java.io.FileNotFoundException
java.io.FileNotFoundException
- if the path can't be resolved to a nodeCifsHelper.getNodeRefs(NodeRef, String)
public void relinkNode(NodeRef tempNodeRef, NodeRef nodeToMoveRef, NodeRef newParentNodeRef, java.lang.String newName) throws java.io.FileNotFoundException, org.alfresco.jlan.server.filesys.FileExistsException
oldNodeRef
- NodeRefnewNodeRef
- NodeRef
java.io.FileNotFoundException
org.alfresco.jlan.server.filesys.FileExistsException
public void move(NodeRef nodeToMoveRef, NodeRef newParentNodeRef, java.lang.String newName) throws org.alfresco.jlan.server.filesys.FileExistsException
nodeToMoveRef
- Node to be movednewParentNodeRef
- New parent folder nodenewName
- New name for the moved node
org.alfresco.jlan.server.filesys.FileExistsException
public void rename(NodeRef nodeToRenameRef, java.lang.String newName) throws org.alfresco.jlan.server.filesys.FileExistsException
nodeToRenameRef
- Node to be renamednewName
- New name for the node
org.alfresco.jlan.server.filesys.FileExistsException
public java.lang.String getFileName(NodeRef node)
node
- NodeRef
java.io.FileNotFoundException
public boolean isFolderEmpty(NodeRef folderNode)
folderNode
- NodeRef
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |