public class Resource2FlipbookUriResolver extends ResourceURIResolver implements PluginAware, Configurable
URIResolver
for type "resource-pdf2flash".Modifier and Type | Class and Description |
---|---|
private class |
Resource2FlipbookUriResolver.CacheThread |
Modifier and Type | Field and Description |
---|---|
protected String |
_pluginName
The plugin name.
|
protected ConvertResource2ImagesComponent |
_resourceComponent
The cache resource component.
|
protected String |
_type
The type.
|
_webPrefixHandler
_context, _prefixHandler, _resolver
Constructor and Description |
---|
Resource2FlipbookUriResolver() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration) |
protected String |
getResourcePath(Resource resource)
Get the resource path
|
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
|
String |
resolve(String uri,
boolean download,
boolean absolute,
boolean internal)
Resolves a link URI for rendering purposes.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser. |
String |
resolveBoundedImage(String uri,
int maxHeight,
int maxWidth,
boolean download,
boolean absolute,
boolean internal)
Resolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser. |
String |
resolveImage(String uri,
int height,
int width,
boolean download,
boolean absolute,
boolean internal)
Resolves a link URI for rendering image.
The output must be a properly encoded path, relative to the webapp context, accessible from a browser. |
void |
service(ServiceManager serviceManager) |
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
_resolve, checkLink, getLabel, resolveBoundedImageAsBase64, resolveImageAsBase64, resolveImageAsBase64
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected String _pluginName
protected ConvertResource2ImagesComponent _resourceComponent
public Resource2FlipbookUriResolver()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ResourceURIResolver
ServiceException
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 void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public String getType()
URIResolver
URIResolver
.getType
in interface URIResolver
getType
in class ResourceURIResolver
URIResolver
.protected String getResourcePath(Resource resource)
ResourceURIResolver
getResourcePath
in class ResourceURIResolver
resource
- the resourcepublic String resolve(String uri, boolean download, boolean absolute, boolean internal)
URIResolver
resolve
in interface URIResolver
resolve
in class ResourceURIResolver
uri
- the link URI.download
- true if the pointed resource is to be downloaded.absolute
- true if the url must be absoluteinternal
- true to get an internal URI.public String resolveImage(String uri, int height, int width, boolean download, boolean absolute, boolean internal)
URIResolver
resolveImage
in interface URIResolver
resolveImage
in class ResourceURIResolver
uri
- the link URI.height
- the height of the image.width
- the width of the imagedownload
- true if the pointed resource is to be downloaded.absolute
- true if the url must be absoluteinternal
- true to get an internal URI.public String resolveBoundedImage(String uri, int maxHeight, int maxWidth, boolean download, boolean absolute, boolean internal)
URIResolver
resolveBoundedImage
in interface URIResolver
resolveBoundedImage
in class ResourceURIResolver
uri
- the link URI.maxHeight
- the max heightmaxWidth
- the max widthdownload
- true if the pointed resource is to be downloaded.absolute
- true if the url must be absoluteinternal
- true to get an internal URI.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 absolute