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 Details

    • tasProperties

      @Autowired public org.alfresco.utility.TasProperties tasProperties
    • webDavNetworkDrive

      @Autowired protected WebDavNetworkDrive webDavNetworkDrive
    • STEP_PREFIX

      public static String STEP_PREFIX
    • RESPONSE_HEADER_CONTENT_TYPE

      public static String RESPONSE_HEADER_CONTENT_TYPE
    • RESPONSE_HEADER_CONTENT_DISPOSITION

      public static String RESPONSE_HEADER_CONTENT_DISPOSITION
    • status

      public int status
  • Constructor Details

    • WebDavWrapper

      public WebDavWrapper()
  • Method Details

    • authenticateUser

      public WebDavWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel) throws Exception
      Specified by:
      authenticateUser in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • getHttpClient

      public org.apache.commons.httpclient.HttpClient getHttpClient()
    • disconnect

      public WebDavWrapper disconnect() throws Exception
      Specified by:
      disconnect in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • getFiles

      public List<org.alfresco.utility.model.FileModel> getFiles() throws Exception
      Specified by:
      getFiles in interface org.alfresco.utility.dsl.DSLFile<WebDavWrapper>
      Throws:
      Exception
    • buildPath

      public String buildPath(String parent, String... paths)
      Overrides:
      buildPath in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
    • createFolder

      public WebDavWrapper createFolder(org.alfresco.utility.model.FolderModel folderModel) throws Exception
      Specified by:
      createFolder in interface org.alfresco.utility.dsl.DSLFolder<WebDavWrapper>
      Throws:
      Exception
    • getFolders

      public List<org.alfresco.utility.model.FolderModel> getFolders() throws Exception
      Specified by:
      getFolders in interface org.alfresco.utility.dsl.DSLFolder<WebDavWrapper>
      Throws:
      Exception
    • getPrefixSpace

      public String getPrefixSpace()
      Specified by:
      getPrefixSpace in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
    • getProtocolJMXConfigurationStatus

      protected String getProtocolJMXConfigurationStatus() throws Exception
      Specified by:
      getProtocolJMXConfigurationStatus in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • usingSite

      public WebDavWrapper usingSite(String siteId) throws org.alfresco.utility.exception.TestStepException
      Specified by:
      usingSite in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      usingSite in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      org.alfresco.utility.exception.TestStepException
    • usingSite

      public WebDavWrapper usingSite(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Specified by:
      usingSite in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      usingSite in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • usingUserHome

      public WebDavWrapper usingUserHome(String username) throws Exception
      Specified by:
      usingUserHome in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      usingUserHome in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • usingUserHome

      public WebDavWrapper usingUserHome() throws Exception
      Specified by:
      usingUserHome in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      usingUserHome in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • usingRoot

      public WebDavWrapper usingRoot() throws Exception
      Specified by:
      usingRoot in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Overrides:
      usingRoot in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • getRootPath

      public String getRootPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getRootPath in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      getRootPath in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getSitesPath

      public String getSitesPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getSitesPath in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      getSitesPath in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getUserHomesPath

      public String getUserHomesPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getUserHomesPath in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      getUserHomesPath in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getDataDictionaryPath

      public String getDataDictionaryPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getDataDictionaryPath in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      getDataDictionaryPath in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • usingResource

      public WebDavWrapper usingResource(org.alfresco.utility.model.ContentModel model) throws Exception
      Specified by:
      usingResource in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
      Specified by:
      usingResource in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
      Throws:
      Exception
    • rename

      public WebDavWrapper rename(String newName) throws Exception
      Specified by:
      rename in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
      Throws:
      Exception
    • update

      public WebDavWrapper update(String content) throws Exception
      Specified by:
      update in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
      Throws:
      Exception
    • delete

      public WebDavWrapper delete() throws Exception
      Specified by:
      delete in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
      Throws:
      Exception
    • copyTo

      public WebDavWrapper copyTo(org.alfresco.utility.model.ContentModel destinationModel) throws Exception
      Specified by:
      copyTo in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
      Throws:
      Exception
    • uploadFile

      public WebDavWrapper uploadFile(File fileToUpload) throws Exception
      Upload a local file to webdav location
      Parameters:
      fileToUpload - a local file stored on the disk
      Returns:
      Throws:
      Exception
    • moveTo

      public WebDavWrapper moveTo(org.alfresco.utility.model.ContentModel destinationModel) throws Exception
      Specified by:
      moveTo in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
      Throws:
      Exception
    • overwriteIfExists

      public WebDavWrapper overwriteIfExists()
    • doNotOverwriteIfExists

      public WebDavWrapper doNotOverwriteIfExists()
    • createFile

      public WebDavWrapper createFile(org.alfresco.utility.model.FileModel fileModel) throws Exception
      Specified by:
      createFile in interface org.alfresco.utility.dsl.DSLFile<WebDavWrapper>
      Throws:
      Exception
    • assertThat

      public WebDavAssertion assertThat()
      Assertion DSL. Call this method to see available assertions available WebDavAssertion
      Overrides:
      assertThat in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
    • withJMX

      public JmxUtil withJMX()
      Returns:
      JMX DSL for this wrapper
    • withWebDavUtil

      public WebDavUtil withWebDavUtil()
    • download

      public WebDavWrapper download() throws Exception
      Download the last file resource in target folder. File is deleted after execution.
      Returns:
      Throws:
      Exception
    • getResponseHeaderValue

      public String getResponseHeaderValue(String headerName) throws Exception
      Get the response header value for a certain header.
      Parameters:
      headerName -
      Returns:
      Throws:
      Exception
    • lock

      public WebDavWrapper lock() throws Exception
      Lock file
      Returns:
      Throws:
      Exception
    • unlock

      public WebDavWrapper unlock() throws Exception
      Unlock file
      Returns:
      Throws:
      Exception
    • usingNetworkDrive

      public WebDavWrapper usingNetworkDrive() throws Exception
      Specified by:
      usingNetworkDrive in class org.alfresco.utility.dsl.DSLProtocolWithNetworkDrive<WebDavWrapper>
      Throws:
      Exception
    • unmountNetworkDrive

      public WebDavWrapper unmountNetworkDrive() throws Exception
      Throws:
      Exception