public class ThumbnailServiceImpl extends Object implements ThumbnailService
BIG_SIZE, EXO_THUMBNAIL, EXO_THUMBNAILS, EXO_THUMBNAILS_FOLDER, HIDDENABLE_NODETYPE, MEDIUM_SIZE, SMALL_SIZE, THUMBNAIL_LAST_MODIFIED| Constructor and Description |
|---|
ThumbnailServiceImpl(org.exoplatform.container.xml.InitParams initParams) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Add Thumbnail Plugin
|
void |
addThumbnailImage(javax.jcr.Node thumbnailNode,
BufferedImage image,
String propertyName)
Add a thumbnail image to node
|
javax.jcr.Node |
addThumbnailNode(javax.jcr.Node node)
Create thumbnail node
|
void |
copyThumbnailNode(javax.jcr.Node srcThumbnailNode,
javax.jcr.Node destNode)
Copy thumbnail node to destination node after moving or copy/paste.
|
void |
createSpecifiedThumbnail(javax.jcr.Node node,
BufferedImage image,
String propertyName)
Create a thumbnail for node with size specified
|
void |
createThumbnailImage(javax.jcr.Node node,
BufferedImage image,
String mimeType)
Create thumbnail for node with default size:
Small size, medium size, big size
|
List<javax.jcr.Node> |
getAllFileInNode(javax.jcr.Node node)
Return all nt:file node at current node
|
List<org.exoplatform.container.component.ComponentPlugin> |
getComponentPlugins()
Return a list of Thumbnail plugin
|
List<javax.jcr.Node> |
getFileNodesByType(javax.jcr.Node node,
String jcrMimeType)
Return the list of node in the current node with mimetype specified
|
List<javax.jcr.Node> |
getFlowImages(javax.jcr.Node node)
Return a list image in node
|
List<String> |
getMimeTypes()
Get mime types which allow to view
|
InputStream |
getThumbnailImage(javax.jcr.Node node,
String thumbnailType)
Return the data of thumbnail with specified type
|
javax.jcr.Node |
getThumbnailNode(javax.jcr.Node node)
Get thumbnail node
|
boolean |
isEnableThumbnail()
Return the status of node is enable thumbnail or not
|
void |
processRemoveThumbnail(javax.jcr.Node showingNode)
Process to remove thumbnail
|
void |
processThumbnailList(List<javax.jcr.Node> listNodes,
String type)
Process thumbnail with list nodes
|
void |
setEnableThumbnail(boolean isEnable)
To setup status of node is allow thumbnail or not
|
public List<javax.jcr.Node> getFlowImages(javax.jcr.Node node) throws Exception
getFlowImages in interface ThumbnailServicenode - Current nodeExceptionpublic List<javax.jcr.Node> getAllFileInNode(javax.jcr.Node node) throws javax.jcr.RepositoryException
getAllFileInNode in interface ThumbnailServicenode - Current nodejavax.jcr.RepositoryExceptionpublic List<javax.jcr.Node> getFileNodesByType(javax.jcr.Node node, String jcrMimeType) throws javax.jcr.RepositoryException
getFileNodesByType in interface ThumbnailServicenode - Current nodejcrMimeType - Mime type of node will be retrievejavax.jcr.RepositoryExceptionpublic boolean isEnableThumbnail()
isEnableThumbnail in interface ThumbnailServicepublic void setEnableThumbnail(boolean isEnable)
setEnableThumbnail in interface ThumbnailServicepublic InputStream getThumbnailImage(javax.jcr.Node node, String thumbnailType) throws Exception
getThumbnailImage in interface ThumbnailServicenode - Current node which will be added thumbnailthumbnailType - Type of thumbnail will be return (small, medium, big or specified if has)Exceptionpublic void addThumbnailImage(javax.jcr.Node thumbnailNode,
BufferedImage image,
String propertyName)
throws Exception
addThumbnailImage in interface ThumbnailServicethumbnailNode - Current node which will be added thumbnailimage - BufferedImage which contain the original imagepropertyName - Data will be set to this propertyExceptionpublic void createSpecifiedThumbnail(javax.jcr.Node node,
BufferedImage image,
String propertyName)
throws Exception
createSpecifiedThumbnail in interface ThumbnailServicenode - Current node which will be added thumbnailimage - BufferedImage which contain the original imagepropertyName - Data will be set to this propertyExceptionpublic void createThumbnailImage(javax.jcr.Node node,
BufferedImage image,
String mimeType)
throws Exception
createThumbnailImage in interface ThumbnailServicenode - Current node which will be added thumbnailimage - BufferedImage which contain the original imagemimeType - File typeExceptionpublic void processThumbnailList(List<javax.jcr.Node> listNodes, String type) throws Exception
processThumbnailList in interface ThumbnailServicelistNodes - List node which will be process to add thumbnailtype - Type of thumbnail imageExceptionpublic List<String> getMimeTypes()
getMimeTypes in interface ThumbnailServicepublic javax.jcr.Node addThumbnailNode(javax.jcr.Node node)
throws Exception
addThumbnailNode in interface ThumbnailServicenode - Current node which included thumbnailExceptionpublic javax.jcr.Node getThumbnailNode(javax.jcr.Node node)
throws Exception
getThumbnailNode in interface ThumbnailServiceExceptionpublic void processRemoveThumbnail(javax.jcr.Node showingNode)
throws Exception
processRemoveThumbnail in interface ThumbnailServiceshowingNode - Node contain the thumbnailExceptionpublic void copyThumbnailNode(javax.jcr.Node srcThumbnailNode,
javax.jcr.Node destNode)
throws Exception
copyThumbnailNode in interface ThumbnailServicesrcThumbnailNode - thumbnailNode of source nodedestNode - destination NodeExceptionpublic void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
ThumbnailServiceaddPlugin in interface ThumbnailServiceplugin - ComponentPluginpublic List<org.exoplatform.container.component.ComponentPlugin> getComponentPlugins()
ThumbnailServicegetComponentPlugins in interface ThumbnailServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.