public class ThumbnailServiceImpl extends Object implements ThumbnailService, NodeServicePolicies.BeforeCreateNodePolicy, NodeServicePolicies.OnCreateNodePolicy
Policy.ArgQNAMEQNAME| Constructor and Description |
|---|
ThumbnailServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addThumbnailModificationData(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String thumbnailName)
Updates the parent of the supplied
NodeRef to ensure that it has the "cm:thumbnailModification" aspect
and sets the last modification data for it. |
void |
beforeCreateNode(org.alfresco.service.cmr.repository.NodeRef parentRef,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
org.alfresco.service.namespace.QName nodeTypeQName)
Called before a new node is created.
|
org.alfresco.service.cmr.repository.NodeRef |
createThumbnail(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String mimetype,
TransformationOptions transformationOptions,
String thumbnailName)
Creates a new thumbnail for the given node and content property.
|
org.alfresco.service.cmr.repository.NodeRef |
createThumbnail(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String mimetype,
TransformationOptions transformationOptions,
String thumbnailName,
ThumbnailParentAssociationDetails assocDetails) |
Map<String,FailedThumbnailInfo> |
getFailedThumbnails(org.alfresco.service.cmr.repository.NodeRef sourceNode)
This method returns a
Map of failed thumbnails for the specified source node. |
org.alfresco.service.cmr.repository.NodeRef |
getThumbnailByName(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String thumbnailName)
Gets the thumbnail for a given content property with a given name.
|
org.alfresco.service.cmr.repository.NodeRef |
getThumbnailNode(org.alfresco.service.cmr.repository.ChildAssociationRef thumbnailRef)
This method returns the NodeRef for the thumbnail, using the ChildAssociationRef
that links the sourceNode to its associated Thumbnail node.
|
ThumbnailRegistry |
getThumbnailRegistry()
Gets the thumbnail registry
|
List<org.alfresco.service.cmr.repository.NodeRef> |
getThumbnails(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String mimetype,
TransformationOptions options)
Gets a list of thumbnail nodes for a given content property that match the provided mimetype and
transformation options.
|
boolean |
getThumbnailsEnabled()
This method indicates whether thumbnail creation via this service has been globally enabled or disabled.
|
void |
init()
Registers to listen for events of interest.
|
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssoc)
Called when a new node has been created.
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter)
Set the behaviour filter.
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
void |
setPolicyComponent(PolicyComponent policyComponent)
Set the policy component to listen for various events
|
void |
setRenditionService(RenditionService renditionService)
Set the rendition service.
|
void |
setRuleService(RuleService ruleService) |
void |
setThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)
Set thumbnail registry
|
void |
setThumbnailsEnabled(boolean thumbnailsEnabled)
This method enables or disables the creation of all thumbnails by this service.
|
void |
setTransactionService(TransactionService transactionService) |
void |
updateThumbnail(org.alfresco.service.cmr.repository.NodeRef thumbnail,
TransformationOptions transformationOptions)
Updates the content of a thumbnail.
|
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
behaviourFilter - public void setRenditionService(RenditionService renditionService)
renditionService - public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - node servicepublic void setThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)
thumbnailRegistry - thumbnail registrypublic void setThumbnailsEnabled(boolean thumbnailsEnabled)
ThumbnailServicesetThumbnailsEnabled in interface ThumbnailServicethumbnailsEnabled - true to enable all thumbnail creation (the default setting), or false to disable.public boolean getThumbnailsEnabled()
ThumbnailServicegetThumbnailsEnabled in interface ThumbnailServicepublic void setPolicyComponent(PolicyComponent policyComponent)
public void setTransactionService(TransactionService transactionService)
public void setRuleService(RuleService ruleService)
ruleService - rule servicepublic void init()
public void beforeCreateNode(org.alfresco.service.cmr.repository.NodeRef parentRef,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
org.alfresco.service.namespace.QName nodeTypeQName)
NodeServicePolicies.BeforeCreateNodePolicybeforeCreateNode in interface NodeServicePolicies.BeforeCreateNodePolicyparentRef - the parent node referenceassocTypeQName - the association type qualified nameassocQName - the association qualified namenodeTypeQName - the node type qualified namepublic void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssoc)
NodeServicePolicies.OnCreateNodePolicyonCreateNode in interface NodeServicePolicies.OnCreateNodePolicychildAssoc - the created child association referencepublic ThumbnailRegistry getThumbnailRegistry()
ThumbnailServicegetThumbnailRegistry in interface ThumbnailServiceThumbnailRegistry thumbnail registryThumbnailService.getThumbnailRegistry()public org.alfresco.service.cmr.repository.NodeRef createThumbnail(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String mimetype,
TransformationOptions transformationOptions,
String thumbnailName)
ThumbnailServicecreateThumbnail in interface ThumbnailServicenode - the source content nodecontentProperty - the content propertymimetype - the thumbnail mimetypetransformationOptions - the thumbnail transformation optionsthumbnailName - the name of the thumbnail (optional, pass null for unnamed thumbnail)ThumbnailService.createThumbnail(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions, java.lang.String)public org.alfresco.service.cmr.repository.NodeRef createThumbnail(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String mimetype,
TransformationOptions transformationOptions,
String thumbnailName,
ThumbnailParentAssociationDetails assocDetails)
createThumbnail in interface ThumbnailServicenode - the source content nodecontentProperty - the content propertymimetype - the thumbnail mimetypetransformationOptions - the thumbnail transformation optionsthumbnailName - the name of the thumbnail (optional, pass null for unnamed thumbnail)assocDetails - the thumbnail parent association detailsThumbnailService.createThumbnail(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions, java.lang.String, org.alfresco.service.cmr.thumbnail.ThumbnailParentAssociationDetails)public org.alfresco.service.cmr.repository.NodeRef getThumbnailNode(org.alfresco.service.cmr.repository.ChildAssociationRef thumbnailRef)
thumbnailRef - the ChildAssociationRef containing the child NodeRef.public void updateThumbnail(org.alfresco.service.cmr.repository.NodeRef thumbnail,
TransformationOptions transformationOptions)
ThumbnailServiceupdateThumbnail in interface ThumbnailServicethumbnail - the thumbnail nodetransformationOptions - the transformation options used when updating the thumbnailThumbnailService.updateThumbnail(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.TransformationOptions)public org.alfresco.service.cmr.repository.NodeRef getThumbnailByName(org.alfresco.service.cmr.repository.NodeRef node,
org.alfresco.service.namespace.QName contentProperty,
String thumbnailName)
ThumbnailServicegetThumbnailByName in interface ThumbnailServicenode - node referencecontentProperty - content property namethumbnailName - thumbnail nameThumbnailService.getThumbnailByName(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String)public List<org.alfresco.service.cmr.repository.NodeRef> getThumbnails(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, String mimetype, TransformationOptions options)
ThumbnailServicegetThumbnails in interface ThumbnailServicenode - node referencecontentProperty - content property namemimetype - mimetypeoptions - transformation optionsThumbnailService.getThumbnails(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)public Map<String,FailedThumbnailInfo> getFailedThumbnails(org.alfresco.service.cmr.repository.NodeRef sourceNode)
ThumbnailServiceMap of failed thumbnails for the specified source node.
The map is keyed by thumbnail definition name
and the values are the failed thumbnails.getFailedThumbnails in interface ThumbnailServicesourceNode - the node whose thumbnails are to be checked.public void addThumbnailModificationData(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String thumbnailName)
Updates the parent of the supplied NodeRef to ensure that it has the "cm:thumbnailModification" aspect
and sets the last modification data for it.
nodeRef - A NodeRef representing a thumbnail to provide last modification data for.Copyright © 2005–2014 Alfresco Software. All rights reserved.