public class Attachment2FlipbookUriResolver extends AttachmentURIResolver implements PluginAware, Configurable
URIResolver
for type "attachment-content-pdf2flash".Modifier and Type | Class and Description |
---|---|
private class |
Attachment2FlipbookUriResolver.CacheThread |
Modifier and Type | Field and Description |
---|---|
protected ConvertContentAttachment2ImagesComponent |
_attachmentComponent
The ametys object resolver.
|
protected String |
_pluginName
The plugin name.
|
protected String |
_type
The type.
|
_webPrefixHandler
__PLUGIN_CONTENT_PATTERN, _context, _prefixHandler, _resolver
Constructor and Description |
---|
Attachment2FlipbookUriResolver() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration) |
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. |
contextualize
_resolveImage, checkLink, getLabel, resolveBoundedImageAsBase64, resolveCroppedImage, resolveCroppedImageAsBase64, resolveImageAsBase64, resolveImageAsBase64
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected String _pluginName
protected ConvertContentAttachment2ImagesComponent _attachmentComponent
public Attachment2FlipbookUriResolver()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AttachmentURIResolver
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 AttachmentURIResolver
URIResolver
.public String resolve(String uri, boolean download, boolean absolute, boolean internal)
URIResolver
resolve
in interface URIResolver
resolve
in class AttachmentURIResolver
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 AttachmentURIResolver
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 AttachmentURIResolver
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)
AttachmentURIResolver
getUriPrefix
in class AttachmentURIResolver
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