Class 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 Detail

      • tasProperties

        @Autowired
        public org.alfresco.utility.TasProperties tasProperties
      • 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
    • Constructor Detail

      • WebDavWrapper

        public WebDavWrapper()
    • Method Detail

      • authenticateUser

        public WebDavWrapper authenticateUser​(org.alfresco.utility.model.UserModel userModel)
                                       throws java.lang.Exception
        Specified by:
        authenticateUser in class org.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:
        disconnect in class org.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:
        getFiles in interface org.alfresco.utility.dsl.DSLFile<WebDavWrapper>
        Throws:
        java.lang.Exception
      • buildPath

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

        public WebDavWrapper createFolder​(org.alfresco.utility.model.FolderModel folderModel)
                                   throws java.lang.Exception
        Specified by:
        createFolder in interface org.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:
        getFolders in interface org.alfresco.utility.dsl.DSLFolder<WebDavWrapper>
        Throws:
        java.lang.Exception
      • getPrefixSpace

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

        protected java.lang.String getProtocolJMXConfigurationStatus()
                                                              throws java.lang.Exception
        Specified by:
        getProtocolJMXConfigurationStatus in class org.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:
        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 java.lang.Exception
        Specified by:
        usingSite in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
        Specified by:
        usingSite in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
        Throws:
        java.lang.Exception
      • usingUserHome

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

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

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

        public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.Exception
        Specified by:
        usingResource in interface org.alfresco.utility.dsl.DSL<WebDavWrapper>
        Specified by:
        usingResource in class org.alfresco.utility.dsl.DSLProtocol<WebDavWrapper>
        Throws:
        java.lang.Exception
      • rename

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

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

        public WebDavWrapper delete()
                             throws java.lang.Exception
        Specified by:
        delete in interface org.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:
        copyTo in interface org.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:
        moveTo in interface org.alfresco.utility.dsl.DSLContentModelAction<WebDavWrapper>
        Throws:
        java.lang.Exception
      • doNotOverwriteIfExists

        public WebDavWrapper doNotOverwriteIfExists()
      • createFile

        public WebDavWrapper createFile​(org.alfresco.utility.model.FileModel fileModel)
                                 throws java.lang.Exception
        Specified by:
        createFile in interface org.alfresco.utility.dsl.DSLFile<WebDavWrapper>
        Throws:
        java.lang.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 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.Exception
        Get 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:
        usingNetworkDrive in class org.alfresco.utility.dsl.DSLProtocolWithNetworkDrive<WebDavWrapper>
        Throws:
        java.lang.Exception
      • unmountNetworkDrive

        public WebDavWrapper unmountNetworkDrive()
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception