Package org.alfresco.webdav
Class WebDavWrapper
- java.lang.Object
-
- org.alfresco.utility.dsl.DSLWrapper<Client>
-
- org.alfresco.utility.dsl.DSLProtocol<Client>
-
- org.alfresco.utility.dsl.DSLProtocolWithNetworkDrive<WebDavWrapper>
-
- org.alfresco.webdav.WebDavWrapper
-
- All Implemented Interfaces:
org.alfresco.utility.dsl.DSL<WebDavWrapper>,org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>,org.alfresco.utility.dsl.DSLFile<WebDavWrapper>,org.alfresco.utility.dsl.DSLFolder<WebDavWrapper>
@Service @Scope("prototype") public class WebDavWrapper extends org.alfresco.utility.dsl.DSLProtocolWithNetworkDrive<WebDavWrapper> implements org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>, org.alfresco.utility.dsl.DSLFolder<WebDavWrapper>, org.alfresco.utility.dsl.DSLFile<WebDavWrapper>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESPONSE_HEADER_CONTENT_DISPOSITIONstatic java.lang.StringRESPONSE_HEADER_CONTENT_TYPEintstatusstatic java.lang.StringSTEP_PREFIXorg.alfresco.utility.TasPropertiestasPropertiesprotected WebDavNetworkDrivewebDavNetworkDrive
-
Constructor Summary
Constructors Constructor Description WebDavWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebDavAssertionassertThat()Assertion DSL.WebDavWrapperauthenticateUser(org.alfresco.utility.model.UserModel userModel)java.lang.StringbuildPath(java.lang.String parent, java.lang.String... paths)WebDavWrappercopyTo(org.alfresco.utility.model.ContentModel destinationModel)WebDavWrappercreateFile(org.alfresco.utility.model.FileModel fileModel)WebDavWrappercreateFolder(org.alfresco.utility.model.FolderModel folderModel)WebDavWrapperdelete()WebDavWrapperdisconnect()WebDavWrapperdoNotOverwriteIfExists()WebDavWrapperdownload()Download the last file resource in target folder.java.lang.StringgetDataDictionaryPath()java.util.List<org.alfresco.utility.model.FileModel>getFiles()java.util.List<org.alfresco.utility.model.FolderModel>getFolders()org.apache.commons.httpclient.HttpClientgetHttpClient()java.lang.StringgetPrefixSpace()protected java.lang.StringgetProtocolJMXConfigurationStatus()java.lang.StringgetResponseHeaderValue(java.lang.String headerName)Get the response header value for a certain header.java.lang.StringgetRootPath()java.lang.StringgetSitesPath()java.lang.StringgetUserHomesPath()WebDavWrapperlock()Lock fileWebDavWrappermoveTo(org.alfresco.utility.model.ContentModel destinationModel)WebDavWrapperoverwriteIfExists()WebDavWrapperrename(java.lang.String newName)WebDavWrapperunlock()Unlock fileWebDavWrapperunmountNetworkDrive()WebDavWrapperupdate(java.lang.String content)WebDavWrapperuploadFile(java.io.File fileToUpload)Upload a local file to webdav locationWebDavWrapperusingNetworkDrive()WebDavWrapperusingResource(org.alfresco.utility.model.ContentModel model)WebDavWrapperusingRoot()WebDavWrapperusingSite(java.lang.String siteId)WebDavWrapperusingSite(org.alfresco.utility.model.SiteModel siteModel)WebDavWrapperusingUserHome()WebDavWrapperusingUserHome(java.lang.String username)JmxUtilwithJMX()WebDavUtilwithWebDavUtil()-
Methods inherited from class org.alfresco.utility.dsl.DSLProtocolWithNetworkDrive
isActionExecutedOnMappedDrive, setActionExecutedOnMappedDrive
-
Methods inherited from class org.alfresco.utility.dsl.DSLProtocol
and, buildSiteDocumentLibraryPath, buildUserHomePath, closeJmxConnection, getCurrentSpace, getCurrentUser, getLastContentModel, getLastResource, getLastResourceWithoutPrefix, getProtocolName, isProtocolEnabled, setCurrentSpace, setLastContentModel, setLastResource, then, usingAdmin, usingUser, waitSeconds, when
-
-
-
-
Field Detail
-
tasProperties
@Autowired public org.alfresco.utility.TasProperties tasProperties
-
webDavNetworkDrive
@Autowired protected WebDavNetworkDrive webDavNetworkDrive
-
STEP_PREFIX
public static java.lang.String STEP_PREFIX
-
RESPONSE_HEADER_CONTENT_TYPE
public static java.lang.String RESPONSE_HEADER_CONTENT_TYPE
-
RESPONSE_HEADER_CONTENT_DISPOSITION
public static java.lang.String RESPONSE_HEADER_CONTENT_DISPOSITION
-
status
public int status
-
-
Method Detail
-
authenticateUser
public WebDavWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel) throws java.lang.Exception
- Specified by:
authenticateUserin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient()
-
disconnect
public WebDavWrapper disconnect() throws java.lang.Exception
- Specified by:
disconnectin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
getFiles
public java.util.List<org.alfresco.utility.model.FileModel> getFiles() throws java.lang.Exception- Specified by:
getFilesin interfaceorg.alfresco.utility.dsl.DSLFile<WebDavWrapper>- Throws:
java.lang.Exception
-
buildPath
public java.lang.String buildPath(java.lang.String parent, java.lang.String... paths)- Overrides:
buildPathin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
-
createFolder
public WebDavWrapper createFolder(org.alfresco.utility.model.FolderModel folderModel) throws java.lang.Exception
- Specified by:
createFolderin interfaceorg.alfresco.utility.dsl.DSLFolder<WebDavWrapper>- Throws:
java.lang.Exception
-
getFolders
public java.util.List<org.alfresco.utility.model.FolderModel> getFolders() throws java.lang.Exception- Specified by:
getFoldersin interfaceorg.alfresco.utility.dsl.DSLFolder<WebDavWrapper>- Throws:
java.lang.Exception
-
getPrefixSpace
public java.lang.String getPrefixSpace()
- Specified by:
getPrefixSpacein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
-
getProtocolJMXConfigurationStatus
protected java.lang.String getProtocolJMXConfigurationStatus() throws java.lang.Exception- Specified by:
getProtocolJMXConfigurationStatusin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
usingSite
public WebDavWrapper usingSite(java.lang.String siteId) throws org.alfresco.utility.exception.TestStepException
- Specified by:
usingSitein interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
usingSitein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
org.alfresco.utility.exception.TestStepException
-
usingSite
public WebDavWrapper usingSite(org.alfresco.utility.model.SiteModel siteModel) throws java.lang.Exception
- Specified by:
usingSitein interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
usingSitein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
usingUserHome
public WebDavWrapper usingUserHome(java.lang.String username) throws java.lang.Exception
- Specified by:
usingUserHomein interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
usingUserHomein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
usingUserHome
public WebDavWrapper usingUserHome() throws java.lang.Exception
- Specified by:
usingUserHomein interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
usingUserHomein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
usingRoot
public WebDavWrapper usingRoot() throws java.lang.Exception
- Specified by:
usingRootin interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Overrides:
usingRootin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
getRootPath
public java.lang.String getRootPath() throws org.alfresco.utility.exception.TestConfigurationException- Specified by:
getRootPathin interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
getRootPathin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getSitesPath
public java.lang.String getSitesPath() throws org.alfresco.utility.exception.TestConfigurationException- Specified by:
getSitesPathin interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
getSitesPathin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getUserHomesPath
public java.lang.String getUserHomesPath() throws org.alfresco.utility.exception.TestConfigurationException- Specified by:
getUserHomesPathin interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
getUserHomesPathin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getDataDictionaryPath
public java.lang.String getDataDictionaryPath() throws org.alfresco.utility.exception.TestConfigurationException- Specified by:
getDataDictionaryPathin interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
getDataDictionaryPathin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
usingResource
public WebDavWrapper usingResource(org.alfresco.utility.model.ContentModel model) throws java.lang.Exception
- Specified by:
usingResourcein interfaceorg.alfresco.utility.dsl.DSL<WebDavWrapper>- Specified by:
usingResourcein classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>- Throws:
java.lang.Exception
-
rename
public WebDavWrapper rename(java.lang.String newName) throws java.lang.Exception
- Specified by:
renamein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>- Throws:
java.lang.Exception
-
update
public WebDavWrapper update(java.lang.String content) throws java.lang.Exception
- Specified by:
updatein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>- Throws:
java.lang.Exception
-
delete
public WebDavWrapper delete() throws java.lang.Exception
- Specified by:
deletein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>- Throws:
java.lang.Exception
-
copyTo
public WebDavWrapper copyTo(org.alfresco.utility.model.ContentModel destinationModel) throws java.lang.Exception
- Specified by:
copyToin interfaceorg.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>- Throws:
java.lang.Exception
-
uploadFile
public WebDavWrapper uploadFile(java.io.File fileToUpload) throws java.lang.Exception
Upload a local file to webdav location- Parameters:
fileToUpload- a local file stored on the disk- Returns:
- Throws:
java.lang.Exception
-
moveTo
public WebDavWrapper moveTo(org.alfresco.utility.model.ContentModel destinationModel) throws java.lang.Exception
- Specified by:
moveToin interfaceorg.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>- Throws:
java.lang.Exception
-
overwriteIfExists
public WebDavWrapper overwriteIfExists()
-
doNotOverwriteIfExists
public WebDavWrapper doNotOverwriteIfExists()
-
createFile
public WebDavWrapper createFile(org.alfresco.utility.model.FileModel fileModel) throws java.lang.Exception
- Specified by:
createFilein interfaceorg.alfresco.utility.dsl.DSLFile<WebDavWrapper>- Throws:
java.lang.Exception
-
assertThat
public WebDavAssertion assertThat()
Assertion DSL. Call this method to see available assertions availableWebDavAssertion- Overrides:
assertThatin classorg.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
-
withJMX
public JmxUtil withJMX()
- Returns:
- JMX DSL for this wrapper
-
withWebDavUtil
public WebDavUtil withWebDavUtil()
-
download
public WebDavWrapper download() throws java.lang.Exception
Download the last file resource in target folder. File is deleted after execution.- Returns:
- Throws:
java.lang.Exception
-
getResponseHeaderValue
public java.lang.String getResponseHeaderValue(java.lang.String headerName) throws java.lang.ExceptionGet the response header value for a certain header.- Parameters:
headerName-- Returns:
- Throws:
java.lang.Exception
-
lock
public WebDavWrapper lock() throws java.lang.Exception
Lock file- Returns:
- Throws:
java.lang.Exception
-
unlock
public WebDavWrapper unlock() throws java.lang.Exception
Unlock file- Returns:
- Throws:
java.lang.Exception
-
usingNetworkDrive
public WebDavWrapper usingNetworkDrive() throws java.lang.Exception
- Specified by:
usingNetworkDrivein classorg.alfresco.utility.dsl.DSLProtocolWithNetworkDrive<WebDavWrapper>- Throws:
java.lang.Exception
-
unmountNetworkDrive
public WebDavWrapper unmountNetworkDrive() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-