Class ProjectResourceURIResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.AbstractURIResolver
org.ametys.cms.transformation.ResourceURIResolver
org.ametys.web.editor.ResourceURIResolver
org.ametys.plugins.workspaces.documents.ProjectResourceURIResolver
- All Implemented Interfaces:
URIResolver,PluginAware,Contextualizable,LogEnabled,Serviceable
- Direct Known Subclasses:
WebdavProjectResourceURIResolver
URIResolver for type "project-resource". These links point to a file from the resources of a project.
-
Field Summary
Fields inherited from class org.ametys.web.editor.ResourceURIResolver
_webPrefixHandlerFields inherited from class org.ametys.cms.transformation.ResourceURIResolver
_context, _prefixHandler, _resolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Project_getProject(AmetysObject resource) Retrieves parent projectprotected String_getSiteName(Resource resource) Get the site name from resourceGet an URI label.getType()Returns the type of links handled by thisURIResolver.protected StringgetUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal) Get the URI prefixvoidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.web.editor.ResourceURIResolver
getRealPrefix, getResourcePath, serviceMethods inherited from class org.ametys.cms.transformation.ResourceURIResolver
_resolve, checkLink, contextualize, resolveImageAsBase64Methods inherited from class org.ametys.cms.transformation.AbstractURIResolver
resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
ProjectResourceURIResolver
public ProjectResourceURIResolver()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
getType
Description copied from interface:URIResolverReturns the type of links handled by thisURIResolver.- Specified by:
getTypein interfaceURIResolver- Overrides:
getTypein classResourceURIResolver- Returns:
- the type of links handled by this
URIResolver.
-
getLabel
Description copied from interface:URIResolverGet an URI label.- Specified by:
getLabelin interfaceURIResolver- Overrides:
getLabelin classResourceURIResolver- Parameters:
uri- the uri which label to get.- Returns:
- the label.
-
getUriPrefix
protected String getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal) Description copied from class:ResourceURIResolverGet the URI prefix- Overrides:
getUriPrefixin classResourceURIResolver- Parameters:
object- The objectdownload- true if the pointed resource is to be downloaded.absolute- true to get an internal URI.internal- true if the url must be absolute- Returns:
- the URI prefix
-
_getSiteName
Description copied from class:ResourceURIResolverGet the site name from resource- Overrides:
_getSiteNamein classResourceURIResolver- Parameters:
resource- the resource- Returns:
- the site name
-
_getProject
Retrieves parent project- Parameters:
resource- The resource which belongs to a project- Returns:
- The parent project
-