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
public class ResourceURIResolver extends ResourceURIResolver
URIResolver
for type "explorer".
These links point to a file from the resources explorer.
-
-
Field Summary
Fields Modifier and Type Field Description protected URIPrefixHandler
_webPrefixHandler
The URI prefix handler-
Fields inherited from class org.ametys.cms.transformation.ResourceURIResolver
_context, _prefixHandler, _resolver
-
-
Constructor Summary
Constructors Constructor Description ResourceURIResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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, 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 Detail
-
_webPrefixHandler
protected URIPrefixHandler _webPrefixHandler
The URI prefix handler
-
-
Constructor Detail
-
ResourceURIResolver
public ResourceURIResolver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- 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
protected String getResourcePath(Resource resource)
Description copied from class:ResourceURIResolver
Get the resource path- Overrides:
getResourcePath
in classResourceURIResolver
- Parameters:
resource
- the resource- Returns:
- the path
-
getRealPrefix
protected String getRealPrefix(Resource resource, String prefix)
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
protected String _getSiteName(Resource resource)
Get the site name from resource- Parameters:
resource
- the resource- Returns:
- the site name
-
-