Class WebDavServiceImpl
java.lang.Object
org.craftercms.studio.impl.v1.service.webdav.WebDavServiceImpl
- All Implemented Interfaces:
WebDavService
Deprecated.
Default implementation of
WebDavService
.- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Charset
Deprecated.Charset used to encode paths in URLs.static final String
Deprecated.protected SiteAwareConfigProfileLoader<org.craftercms.commons.config.profiles.webdav.WebDavProfile>
Deprecated.Instance ofSiteAwareConfigProfileLoader
used to load the configuration file.Deprecated.Properties to request to the server when listing resources.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getName
(com.github.sardine.DavResource resource) Deprecated.protected org.craftercms.commons.config.profiles.webdav.WebDavProfile
getProfile
(String site, String profileId) Deprecated.protected String
getUrl
(com.github.sardine.DavResource resource, String baseUrl, String deliveryUrl, String basePath) Deprecated.Deprecated.Lists resources in the specified path.void
setProfileLoader
(SiteAwareConfigProfileLoader<org.craftercms.commons.config.profiles.webdav.WebDavProfile> profileLoader) Deprecated.Deprecated.Uploads a file in the specified path.
-
Field Details
-
PROPERTY_DISPLAY_NAME
Deprecated.- See Also:
-
PROPERTY_CONTENT_TYPE
Deprecated.- See Also:
-
PROPERTY_RESOURCE_TYPE
Deprecated.- See Also:
-
FILTER_ALL_ITEMS
Deprecated.- See Also:
-
profileLoader
protected SiteAwareConfigProfileLoader<org.craftercms.commons.config.profiles.webdav.WebDavProfile> profileLoaderDeprecated.Instance ofSiteAwareConfigProfileLoader
used to load the configuration file. -
charset
Deprecated.Charset used to encode paths in URLs. -
properties
Deprecated.Properties to request to the server when listing resources.
-
-
Constructor Details
-
WebDavServiceImpl
public WebDavServiceImpl()Deprecated.
-
-
Method Details
-
setProfileLoader
public void setProfileLoader(SiteAwareConfigProfileLoader<org.craftercms.commons.config.profiles.webdav.WebDavProfile> profileLoader) Deprecated. -
getProfile
protected org.craftercms.commons.config.profiles.webdav.WebDavProfile getProfile(String site, String profileId) throws WebDavException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException Deprecated.- Throws:
WebDavException
org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
-
list
public List<WebDavItem> list(String site, String profileId, String path, String type) throws WebDavException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException Deprecated.Lists resources in the specified path.- Specified by:
list
in interfaceWebDavService
- Parameters:
site
- the name of the siteprofileId
- the id of the profilepath
- the relative path to listtype
- mime type used for filtering- Returns:
- list of resources found
- Throws:
WebDavException
- if there is an error connecting to the server or listing the resourcesorg.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
- if the profile is not found
-
getUrl
protected String getUrl(com.github.sardine.DavResource resource, String baseUrl, String deliveryUrl, String basePath) Deprecated. -
getName
Deprecated. -
upload
public String upload(String site, String profileId, String path, String filename, InputStream content) throws WebDavException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException Deprecated.Uploads a file in the specified path.- Specified by:
upload
in interfaceWebDavService
- Parameters:
site
- the name of the siteprofileId
- the id of the profilepath
- the relative path to upload the filefilename
- the name of the file to uploadcontent
- stream providing the content of the file- Returns:
- the full URL of the uploaded file
- Throws:
WebDavException
- if there is an error connecting to the server or uploading the fileorg.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
- if the profile is not found
-
WebDavServiceImpl