public class ProjectResourceURIResolver extends ResourceURIResolver implements PluginAware
URIResolver
for type "project-resource". Modifier and Type | Field and Description |
---|---|
protected String |
_pluginName
plugin name
|
_webPrefixHandler
_context, _prefixHandler, _resolver
Constructor and Description |
---|
ProjectResourceURIResolver() |
Modifier and Type | Method and Description |
---|---|
protected Project |
_getProject(Resource resource)
Retrieves parent project
|
I18nizableText |
getLabel(String uri)
Get an URI label.
|
String |
getType()
Returns the type of links handled by this
URIResolver . |
protected String |
getUriPrefix(AmetysObject object,
boolean download,
boolean absolute,
boolean internal)
Get the URI prefix
|
void |
setPluginInfo(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. |
_getSiteName, contextualize, getRealPrefix, getResourcePath, service
_resolve, checkLink, resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64, resolveImageAsBase64
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected String _pluginName
public ProjectResourceURIResolver()
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic String getType()
URIResolver
URIResolver
.getType
in interface URIResolver
getType
in class ResourceURIResolver
URIResolver
.protected String getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal)
ResourceURIResolver
getUriPrefix
in class ResourceURIResolver
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 absolutepublic I18nizableText getLabel(String uri)
URIResolver
getLabel
in interface URIResolver
getLabel
in class ResourceURIResolver
uri
- the uri which label to get.protected Project _getProject(Resource resource)
resource
- The resource which belongs to a project