Class ProjectResourceURIResolver
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- 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
public class ProjectResourceURIResolver extends ResourceURIResolver implements PluginAware
URIResolverfor type "project-resource".
These links point to a file from the resources of a project.
-
-
Field Summary
Fields Modifier and Type Field Description protected String_pluginNameplugin name-
Fields inherited from class org.ametys.web.editor.ResourceURIResolver
_webPrefixHandler
-
Fields inherited from class org.ametys.cms.transformation.ResourceURIResolver
_context, _prefixHandler, _resolver
-
-
Constructor Summary
Constructors Constructor Description ProjectResourceURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Project_getProject(AmetysObject resource)Retrieves parent projectI18nizableTextgetLabel(String uri)Get an URI label.StringgetType()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
_getSiteName, contextualize, getRealPrefix, getResourcePath, service
-
Methods inherited from class org.ametys.cms.transformation.ResourceURIResolver
_resolve, checkLink, resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64, resolveImageAsBase64
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_pluginName
protected String _pluginName
plugin name
-
-
Constructor Detail
-
ProjectResourceURIResolver
public ProjectResourceURIResolver()
-
-
Method Detail
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
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
public String 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.
-
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
-
getLabel
public I18nizableText getLabel(String uri)
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.
-
_getProject
protected Project _getProject(AmetysObject resource)
Retrieves parent project- Parameters:
resource- The resource which belongs to a project- Returns:
- The parent project
-
-