Interface WebDavService

  • All Known Implementing Classes:
    WebDavServiceImpl

    public interface WebDavService
    Defines the operations available for a WebDAV server.
    Since:
    3.1.4
    Author:
    joseross
    • Method Detail

      • list

        List<WebDavItem> list​(String siteId,
                              String profileId,
                              String path,
                              String type)
                       throws WebDavException,
                              SiteNotFoundException,
                              org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
        Lists resources in the specified path.
        Parameters:
        siteId - the id of the site
        profileId - the id of the profile
        path - the relative path to list
        type - mime type used for filtering
        Returns:
        list of resources found
        Throws:
        WebDavException - if there is an error connecting to the server or listing the resources
        SiteNotFoundException - if the site is not found
        org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found
      • upload

        WebDavItem upload​(String siteId,
                          String profileId,
                          String path,
                          String filename,
                          InputStream content)
                   throws WebDavException,
                          SiteNotFoundException,
                          org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
        Uploads a file in the specified path.
        Parameters:
        siteId - the id of the site
        profileId - the id of the profile
        path - the relative path to upload the file
        filename - the name of the file to upload
        content - stream providing the content of the file
        Returns:
        the uploaded item
        Throws:
        WebDavException - if there is an error connecting to the server or uploading the file
        SiteNotFoundException - if the site is not found
        org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found