public class CifsHelper extends Object
Constructor and Description |
---|
CifsHelper()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
org.alfresco.service.cmr.repository.NodeRef |
createNode(org.alfresco.service.cmr.repository.NodeRef rootNodeRef,
String path,
org.alfresco.service.namespace.QName typeQName)
Creates a file or directory using the given paths.
|
ContentFileInfo |
getFileInformation(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean readOnly,
boolean lockedFilesAsOffline) |
ContentFileInfo |
getFileInformation(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef,
String path,
boolean readOnly,
boolean lockedFilesAsOffline)
Extract a single node's file info, where the node is reference by
a path relative to an ancestor node.
|
ContentFileInfo |
getFileInformationImpl(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef,
String path,
boolean readOnly,
boolean lockedFilesAsOffline)
Extract a single node's file info, where the node is reference by
a path relative to an ancestor node.
|
String |
getFileName(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Return the file name for a node
|
String |
getFileNameImpl(org.alfresco.service.cmr.repository.NodeRef node)
Return the file name for a node
|
LockService |
getLockService() |
org.alfresco.service.cmr.repository.NodeRef |
getNodeRef(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef,
String path)
Attempts to fetch a specific single node at the given path.
|
List<org.alfresco.service.cmr.repository.NodeRef> |
getNodeRefs(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef,
String path)
Finds the nodes being reference by the given directory and file paths.
|
protected org.alfresco.service.cmr.repository.NodeService |
getNodeService()
Return the node service
|
RetryingTransactionHelper |
getRetryingTransactionHelper() |
void |
init() |
boolean |
isDirectory(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
boolean |
isFolderEmpty(org.alfresco.service.cmr.repository.NodeRef folderNode)
Check if the folder node is empty
|
void |
move(org.alfresco.service.cmr.repository.NodeRef nodeToMoveRef,
org.alfresco.service.cmr.repository.NodeRef oldParent,
org.alfresco.service.cmr.repository.NodeRef newParentNodeRef,
String newName)
Deprecated.
- not used by live code - exception handling is too severe
|
void |
relinkNode(org.alfresco.service.cmr.repository.NodeRef tempNodeRef,
org.alfresco.service.cmr.repository.NodeRef nodeToMoveRef,
org.alfresco.service.cmr.repository.NodeRef newParentNodeRef,
String newName)
Relink the content data from a new node to an existing node to preserve the version history.
|
void |
rename(org.alfresco.service.cmr.repository.NodeRef nodeToRenameRef,
String newName)
Deprecated.
- not used by live code - exception handling is too severe
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setExcludedTypes(List<String> excludedTypes) |
void |
setFileFolderService(FileFolderService fileFolderService) |
void |
setHiddenAspect(HiddenAspect hiddenAspect) |
void |
setLockService(LockService lockService) |
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setReadOnlyFlagOnFolders(boolean setReadOnlyFlagOnFolders)
Controls whether the read only flag is set on folders.
|
void |
setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) |
public void init()
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setFileFolderService(FileFolderService fileFolderService)
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setHiddenAspect(HiddenAspect hiddenAspect)
protected org.alfresco.service.cmr.repository.NodeService getNodeService()
public void setReadOnlyFlagOnFolders(boolean setReadOnlyFlagOnFolders)
setReadOnlyFlagOnFolders
- the setReadOnlyFlagOnFolders to setpublic boolean isDirectory(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- folder
org.alfresco.error.AlfrescoRuntimeException
- if the type is neither related to a folder or contentpublic ContentFileInfo getFileInformation(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef, String path, boolean readOnly, boolean lockedFilesAsOffline) throws FileNotFoundException
pathRootNodeRef
- path
- the pathFileNotFoundException
public ContentFileInfo getFileInformation(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean readOnly, boolean lockedFilesAsOffline) throws FileNotFoundException
FileNotFoundException
public ContentFileInfo getFileInformationImpl(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef, String path, boolean readOnly, boolean lockedFilesAsOffline) throws FileNotFoundException
pathRootNodeRef
- path
- the pathFileNotFoundException
public org.alfresco.service.cmr.repository.NodeRef createNode(org.alfresco.service.cmr.repository.NodeRef rootNodeRef, String path, org.alfresco.service.namespace.QName typeQName) 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 nodetypeQName
- type of foleorg.alfresco.jlan.server.filesys.FileExistsException
- if the file or folder already existspublic List<org.alfresco.service.cmr.repository.NodeRef> getNodeRefs(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef, String path)
Examples of the path are:
pathRootNodeRef
- the node from which to start the path searchpath
- the search path to either a folder or filepublic org.alfresco.service.cmr.repository.NodeRef getNodeRef(org.alfresco.service.cmr.repository.NodeRef pathRootNodeRef, String path) throws FileNotFoundException
The path may contain wild cards
FileNotFoundException
- if the path can't be resolved to a nodegetNodeRefs(NodeRef, String)
public void relinkNode(org.alfresco.service.cmr.repository.NodeRef tempNodeRef, org.alfresco.service.cmr.repository.NodeRef nodeToMoveRef, org.alfresco.service.cmr.repository.NodeRef newParentNodeRef, String newName) throws FileNotFoundException, org.alfresco.jlan.server.filesys.FileExistsException
tempNodeRef
- temp nodeRefnodeToMoveRef
- NodeRefnewParentNodeRef
- NodeRefnewName
- new nameFileNotFoundException
org.alfresco.jlan.server.filesys.FileExistsException
public void move(org.alfresco.service.cmr.repository.NodeRef nodeToMoveRef, org.alfresco.service.cmr.repository.NodeRef oldParent, org.alfresco.service.cmr.repository.NodeRef newParentNodeRef, String newName) throws org.alfresco.jlan.server.filesys.FileExistsException
nodeToMoveRef
- Node to be movednewParentNodeRef
- New parent folder nodenewName
- New name for the moved nodeorg.alfresco.jlan.server.filesys.FileExistsException
public void rename(org.alfresco.service.cmr.repository.NodeRef nodeToRenameRef, String newName) throws org.alfresco.jlan.server.filesys.FileExistsException
nodeToRenameRef
- Node to be renamednewName
- New name for the nodeorg.alfresco.jlan.server.filesys.FileExistsException
public String getFileName(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRef of node to get the file namepublic String getFileNameImpl(org.alfresco.service.cmr.repository.NodeRef node)
node
- NodeRefpublic boolean isFolderEmpty(org.alfresco.service.cmr.repository.NodeRef folderNode)
folderNode
- NodeRefpublic void setLockService(LockService lockService)
public LockService getLockService()
public void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
public RetryingTransactionHelper getRetryingTransactionHelper()
Copyright © 2005–2017 Alfresco Software. All rights reserved.