Package org.ametys.web.editor
Class ResourceURIResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.AbstractURIResolver
org.ametys.cms.transformation.ResourceURIResolver
org.ametys.web.editor.ResourceURIResolver
- All Implemented Interfaces:
URIResolver
,Contextualizable
,LogEnabled
,Serviceable
- Direct Known Subclasses:
ProjectResourceURIResolver
,Resource2FlipbookUriResolver
URIResolver
for type "explorer". These links point to a file from the resources explorer.
-
Field Summary
Fields inherited from class org.ametys.cms.transformation.ResourceURIResolver
_context, _prefixHandler, _resolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getSiteName
(Resource resource) Get the site name from resourceprotected String
getRealPrefix
(Resource resource, String prefix) Get the real prefixprotected String
getResourcePath
(Resource resource) Get the resource pathprotected String
getUriPrefix
(AmetysObject object, boolean download, boolean absolute, boolean internal) Get the URI prefixvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.transformation.ResourceURIResolver
_resolve, checkLink, contextualize, getLabel, getMimeType, getType, resolveImageAsBase64
Methods inherited from class org.ametys.cms.transformation.AbstractURIResolver
resolve, resolveBoundedImage, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImage, resolveImageAsBase64
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_webPrefixHandler
The URI prefix handler
-
-
Constructor Details
-
ResourceURIResolver
public ResourceURIResolver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classResourceURIResolver
- Throws:
ServiceException
-
getUriPrefix
protected String getUriPrefix(AmetysObject object, boolean download, boolean absolute, boolean internal) Description copied from class:ResourceURIResolver
Get the URI prefix- Overrides:
getUriPrefix
in 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
-
getResourcePath
Description copied from class:ResourceURIResolver
Get the resource path- Overrides:
getResourcePath
in classResourceURIResolver
- Parameters:
resource
- the resource- Returns:
- the path
-
getRealPrefix
Description copied from class:ResourceURIResolver
Get the real prefix- Overrides:
getRealPrefix
in classResourceURIResolver
- Parameters:
resource
- the resourceprefix
- the initial prefix- Returns:
- the real prefix
-
_getSiteName
Get the site name from resource- Parameters:
resource
- the resource- Returns:
- the site name
-