Class WebdavProjectResourceURIResolver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.documents.ProjectResourceURIResolver
org.ametys.plugins.workspaces.documents.WebdavProjectResourceURIResolver
- All Implemented Interfaces:
URIResolver
,LogEnabled
,PluginAware
,Contextualizable
,Serviceable
URIResolver
for webdav "project-resource". These links point to a file from the resources of a project through webdav
-
Field Summary
Modifier and TypeFieldDescriptionprotected AuthenticationTokenManager
The authentication token managerprotected CurrentUserProvider
Current User ProviderFields inherited from class org.ametys.plugins.workspaces.documents.ProjectResourceURIResolver
_context, _pluginName, _resolver, _webPrefixHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_resolve
(String uri, boolean download, boolean absolute, boolean internal, String prefix, String suffix) Creates a full uriprotected String
getPath
(AmetysObject resource) Get the path of aResource
or aResourceCollection
protected String
getRealPrefix
(Resource resource, String prefix) Get the real prefixgetType()
Returns the type of links handled by thisURIResolver
.protected String
getUriPrefix
(AmetysObject object, boolean download, boolean absolute, boolean internal) Get the URI prefixvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.workspaces.documents.ProjectResourceURIResolver
_getProject, checkLink, contextualize, getLabel, getResourcePath, resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64, resolveImageAsBase64, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_authenticationTokenManager
The authentication token manager -
_currentUserProvider
Current User Provider
-
-
Constructor Details
-
WebdavProjectResourceURIResolver
public WebdavProjectResourceURIResolver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classProjectResourceURIResolver
- Throws:
ServiceException
-
getType
Description copied from interface:URIResolver
Returns the type of links handled by thisURIResolver
.- Specified by:
getType
in interfaceURIResolver
- Overrides:
getType
in classProjectResourceURIResolver
- Returns:
- the type of links handled by this
URIResolver
.
-
_resolve
protected String _resolve(String uri, boolean download, boolean absolute, boolean internal, String prefix, String suffix) Description copied from class:ProjectResourceURIResolver
Creates a full uri- Overrides:
_resolve
in classProjectResourceURIResolver
- Parameters:
uri
- the base uri, ie the resource iddownload
- true to create a forced download uriabsolute
- true to create an absolute uri (if internal is false)internal
- true to create an internal uriprefix
- Prefix on the urisuffix
- Suffix on the uri- Returns:
- The created uri
-
getUriPrefix
protected String getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal) Description copied from class:ProjectResourceURIResolver
Get the URI prefix- Overrides:
getUriPrefix
in classProjectResourceURIResolver
- Parameters:
object
- The objectdownload
- true if the pointed resource is to be downloaded.absolute
- true if the url must be absoluteinternal
- true to get an internal URI.- Returns:
- the URI prefix
-
getPath
Get the path of aResource
or aResourceCollection
- Parameters:
resource
- the resource to work with- Returns:
- the path
-
getRealPrefix
Description copied from class:ProjectResourceURIResolver
Get the real prefix- Overrides:
getRealPrefix
in classProjectResourceURIResolver
- Parameters:
resource
- the resourceprefix
- the initial prefix- Returns:
- the real prefix
-