Package org.alfresco.webdav.dsl
Class WebDavUtil
- java.lang.Object
-
- org.alfresco.webdav.dsl.WebDavUtil
-
public class WebDavUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WebDavUtil(WebDavWrapper webDavWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcheckForWhiteSpace(java.lang.String content)booleancontentExists()Verify if content (file or folder) existsWebDavWrappercopyOrMove(org.alfresco.utility.model.ContentModel destinationModel, boolean copy, boolean overwrite)java.util.List<org.alfresco.utility.model.ContentModel>getChildren()Get a list of contents (file and folders) from current locationprotected java.lang.StringgetContent()Get the content from a filejava.util.List<org.alfresco.utility.model.FileModel>getFiles()Get a list of files from current locationjava.util.List<org.alfresco.utility.model.FolderModel>getFolders()Get a list of folders from current locationjava.lang.StringgetLastResourceName()protected intgetStatus()protected booleanisContentInList(org.alfresco.utility.model.ContentModel contentModel, java.util.List<org.alfresco.utility.model.ContentModel> contents)protected booleanisFileInList(org.alfresco.utility.model.FileModel fileModel, java.util.List<org.alfresco.utility.model.FileModel> files)protected booleanisFolderInList(org.alfresco.utility.model.FolderModel folderModel, java.util.List<org.alfresco.utility.model.FolderModel> folders)booleanisLocked()java.io.FilesetNewFile(org.alfresco.utility.model.FileModel fileModel)
-
-
-
Constructor Detail
-
WebDavUtil
public WebDavUtil(WebDavWrapper webDavWrapper)
-
-
Method Detail
-
setNewFile
public java.io.File setNewFile(org.alfresco.utility.model.FileModel fileModel) throws java.lang.Exception- Throws:
java.lang.Exception
-
isFolderInList
protected boolean isFolderInList(org.alfresco.utility.model.FolderModel folderModel, java.util.List<org.alfresco.utility.model.FolderModel> folders)
-
isFileInList
protected boolean isFileInList(org.alfresco.utility.model.FileModel fileModel, java.util.List<org.alfresco.utility.model.FileModel> files)
-
isContentInList
protected boolean isContentInList(org.alfresco.utility.model.ContentModel contentModel, java.util.List<org.alfresco.utility.model.ContentModel> contents)
-
getFolders
public java.util.List<org.alfresco.utility.model.FolderModel> getFolders() throws java.lang.ExceptionGet a list of folders from current location- Returns:
- List
- Throws:
java.lang.Exception
-
getFiles
public java.util.List<org.alfresco.utility.model.FileModel> getFiles() throws java.lang.ExceptionGet a list of files from current location- Returns:
- List
- Throws:
java.lang.Exception
-
getChildren
public java.util.List<org.alfresco.utility.model.ContentModel> getChildren() throws java.lang.ExceptionGet a list of contents (file and folders) from current location- Returns:
- List
- Throws:
java.lang.Exception
-
checkForWhiteSpace
public java.lang.String checkForWhiteSpace(java.lang.String content)
-
getStatus
protected int getStatus()
-
copyOrMove
public WebDavWrapper copyOrMove(org.alfresco.utility.model.ContentModel destinationModel, boolean copy, boolean overwrite) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getContent
protected java.lang.String getContent() throws java.lang.ExceptionGet the content from a file- Returns:
- Throws:
java.lang.Exception
-
contentExists
public boolean contentExists() throws java.lang.ExceptionVerify if content (file or folder) exists- Returns:
- Throws:
java.lang.Exception
-
getLastResourceName
public java.lang.String getLastResourceName()
-
isLocked
public boolean isLocked() throws java.lang.Exception- Throws:
java.lang.Exception
-
-