Package org.alfresco.repo.thumbnail
Class ThumbnailServiceImpl
- java.lang.Object
-
- org.alfresco.repo.thumbnail.ThumbnailServiceImpl
-
- All Implemented Interfaces:
NodeServicePolicies.BeforeCreateNodePolicy,NodeServicePolicies.OnCreateNodePolicy,NodeServicePolicies.OnDeleteNodePolicy,ClassPolicy,Policy,ThumbnailService
@Deprecated public class ThumbnailServiceImpl extends java.lang.Object implements ThumbnailService, NodeServicePolicies.BeforeCreateNodePolicy, NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnDeleteNodePolicy
Deprecated.The thumbnails code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.- Author:
- Roy Wetherall, Neil McErlean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy
QNAME
-
-
Constructor Summary
Constructors Constructor Description ThumbnailServiceImpl()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbeforeCreateNode(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)Deprecated.Called before a new node is created.org.alfresco.service.cmr.repository.NodeRefcreateThumbnail(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions transformationOptions, java.lang.String thumbnailName)Deprecated.Creates a new thumbnail for the given node and content property.org.alfresco.service.cmr.repository.NodeRefcreateThumbnail(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions transformationOptions, java.lang.String thumbnailName, ThumbnailParentAssociationDetails assocDetails)Deprecated.CopyBehaviourCallbackgetCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)Deprecated.See init - eg.java.util.Map<java.lang.String,FailedThumbnailInfo>getFailedThumbnails(org.alfresco.service.cmr.repository.NodeRef sourceNode)Deprecated.This method returns aMapoffailed thumbnailsfor the specified source node.org.alfresco.service.cmr.repository.NodeRefgetThumbnailByName(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String thumbnailName)Deprecated.Gets the thumbnail for a given content property with a given name.org.alfresco.service.cmr.repository.NodeRefgetThumbnailNode(org.alfresco.service.cmr.repository.ChildAssociationRef thumbnailRef)Deprecated.This method returns the NodeRef for the thumbnail, using the ChildAssociationRef that links the sourceNode to its associated Thumbnail node.ThumbnailRegistrygetThumbnailRegistry()Deprecated.Gets the thumbnail registryjava.util.List<org.alfresco.service.cmr.repository.NodeRef>getThumbnails(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions options)Deprecated.Gets a list of thumbnail nodes for a given content property that match the provided mimetype and transformation options.booleangetThumbnailsEnabled()Deprecated.This method indicates whether thumbnail creation via this service has been globally enabled or disabled.voidinit()Deprecated.Registers to listen for events of interest.voidonCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssoc)Deprecated.Called when a new node has been created.voidonDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, boolean isNodeArchived)Deprecated.Called after a node is deleted.voidsetBehaviourFilter(BehaviourFilter behaviourFilter)Deprecated.Set the behaviour filter.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Deprecated.Set the node servicevoidsetPolicyComponent(PolicyComponent policyComponent)Deprecated.Set the policy component to listen for various eventsvoidsetRenditionService(RenditionService renditionService)Deprecated.Set the rendition service.voidsetRuleService(RuleService ruleService)Deprecated.voidsetThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)Deprecated.Set thumbnail registryvoidsetThumbnailsEnabled(boolean thumbnailsEnabled)Deprecated.This method enables or disables the creation of all thumbnails by this service.voidsetTransactionService(TransactionService transactionService)Deprecated.voidupdateThumbnail(org.alfresco.service.cmr.repository.NodeRef thumbnail, TransformationOptions transformationOptions)Deprecated.Updates the content of a thumbnail.
-
-
-
Method Detail
-
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
Deprecated.Set the behaviour filter.- Parameters:
behaviourFilter- BehaviourFilter
-
setRenditionService
public void setRenditionService(RenditionService renditionService)
Deprecated.Set the rendition service.- Parameters:
renditionService- RenditionService
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Deprecated.Set the node service- Parameters:
nodeService- node service
-
setThumbnailRegistry
public void setThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)
Deprecated.Set thumbnail registry- Parameters:
thumbnailRegistry- thumbnail registry
-
setThumbnailsEnabled
public void setThumbnailsEnabled(boolean thumbnailsEnabled)
Deprecated.Description copied from interface:ThumbnailServiceThis method enables or disables the creation of all thumbnails by this service.- Specified by:
setThumbnailsEnabledin interfaceThumbnailService- Parameters:
thumbnailsEnabled-trueto enable all thumbnail creation (the default setting), orfalseto disable.
-
getThumbnailsEnabled
public boolean getThumbnailsEnabled()
Deprecated.Description copied from interface:ThumbnailServiceThis method indicates whether thumbnail creation via this service has been globally enabled or disabled.- Specified by:
getThumbnailsEnabledin interfaceThumbnailService
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
Deprecated.Set the policy component to listen for various events- Since:
- 3.5.0
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
Deprecated.
-
setRuleService
public void setRuleService(RuleService ruleService)
Deprecated.- Parameters:
ruleService- rule service
-
init
public void init()
Deprecated.Registers to listen for events of interest.- Since:
- 3.5.0
-
beforeCreateNode
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)Deprecated.Description copied from interface:NodeServicePolicies.BeforeCreateNodePolicyCalled before a new node is created.- Specified by:
beforeCreateNodein interfaceNodeServicePolicies.BeforeCreateNodePolicy- Parameters:
parentRef- the parent node referenceassocTypeQName- the association type qualified nameassocQName- the association qualified namenodeTypeQName- the node type qualified name
-
onCreateNode
public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssoc)
Deprecated.Description copied from interface:NodeServicePolicies.OnCreateNodePolicyCalled when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssoc- the created child association reference
-
onDeleteNode
public void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, boolean isNodeArchived)Deprecated.Description copied from interface:NodeServicePolicies.OnDeleteNodePolicyCalled after a node is deleted. The reference given is for an association which has been deleted and cannot be used to retrieve node or associaton information from any of the services.- Specified by:
onDeleteNodein interfaceNodeServicePolicies.OnDeleteNodePolicy- Parameters:
childAssocRef- the primary parent-child association of the deleted nodeisNodeArchived- indicates whether the node has been archived rather than purged
-
getThumbnailRegistry
public ThumbnailRegistry getThumbnailRegistry()
Deprecated.Description copied from interface:ThumbnailServiceGets the thumbnail registry- Specified by:
getThumbnailRegistryin interfaceThumbnailService- Returns:
ThumbnailRegistrythumbnail registry- See Also:
ThumbnailService.getThumbnailRegistry()
-
createThumbnail
public org.alfresco.service.cmr.repository.NodeRef createThumbnail(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions transformationOptions, java.lang.String thumbnailName)Deprecated.Description copied from interface:ThumbnailServiceCreates a new thumbnail for the given node and content property. The mimetype and transformation options are used to determine the content transformer that will be best suited to create the thumbnail. The thumbnail name is optional, but is usually set to provide an easy way to identify a particular 'type' of thumbnail. Once created the source node will have the 'rn:renditioned' aspect applied and an association to the thumbnail node (of type 'rn:rendition') will be created. The returned node reference is to the 'rn:rendition' content node that contains the thumbnail content in the standard 'cm:content' property.- Specified by:
createThumbnailin interfaceThumbnailService- Parameters:
node- 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)- Returns:
- NodeRef node reference to the newly created thumbnail
- See Also:
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)
-
createThumbnail
public org.alfresco.service.cmr.repository.NodeRef createThumbnail(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions transformationOptions, java.lang.String thumbnailName, ThumbnailParentAssociationDetails assocDetails)Deprecated.- Specified by:
createThumbnailin interfaceThumbnailService- Parameters:
node- 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 details- Returns:
- NodeRef node reference to the newly created thumbnail
- See Also:
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, org.alfresco.service.cmr.thumbnail.ThumbnailParentAssociationDetails)
-
getThumbnailNode
public org.alfresco.service.cmr.repository.NodeRef getThumbnailNode(org.alfresco.service.cmr.repository.ChildAssociationRef thumbnailRef)
Deprecated.This method returns the NodeRef for the thumbnail, using the ChildAssociationRef that links the sourceNode to its associated Thumbnail node.- Parameters:
thumbnailRef- the ChildAssociationRef containing the child NodeRef.- Returns:
- the NodeRef of the thumbnail itself.
-
updateThumbnail
public void updateThumbnail(org.alfresco.service.cmr.repository.NodeRef thumbnail, TransformationOptions transformationOptions)Deprecated.Description copied from interface:ThumbnailServiceUpdates the content of a thumbnail. The original thumbnail content is updated from the source content using the transformation options provided. The mimetype and name of the thumbnail remain unchanged. To change the name or mimetype of an updated thumbnail it should be deleted and recreated. An error is raised if the original content no longer exists.- Specified by:
updateThumbnailin interfaceThumbnailService- Parameters:
thumbnail- the thumbnail nodetransformationOptions- the transformation options used when updating the thumbnail- See Also:
ThumbnailService.updateThumbnail(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.TransformationOptions)
-
getThumbnailByName
public org.alfresco.service.cmr.repository.NodeRef getThumbnailByName(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String thumbnailName)Deprecated.Description copied from interface:ThumbnailServiceGets the thumbnail for a given content property with a given name. Returns null if no thumbnail with that name for that content property is found.- Specified by:
getThumbnailByNamein interfaceThumbnailService- Parameters:
node- node referencecontentProperty- content property namethumbnailName- thumbnail name- Returns:
- NodeRef the thumbnail node reference, null if not found
- See Also:
ThumbnailService.getThumbnailByName(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String)
-
getThumbnails
public java.util.List<org.alfresco.service.cmr.repository.NodeRef> getThumbnails(org.alfresco.service.cmr.repository.NodeRef node, org.alfresco.service.namespace.QName contentProperty, java.lang.String mimetype, TransformationOptions options)Deprecated.Description copied from interface:ThumbnailServiceGets a list of thumbnail nodes for a given content property that match the provided mimetype and transformation options. Both mimetype and transformation options are optional parameters. If only one or other is specified the only the other is considered during. If neither are provided all thumbnails for that content property are returned. If no matches are found then an empty list is returned.- Specified by:
getThumbnailsin interfaceThumbnailService- Parameters:
node- node referencecontentProperty- content property namemimetype- mimetypeoptions- transformation options- Returns:
- list of matching thumbnail node references, empty if no matches found
- See Also:
ThumbnailService.getThumbnails(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)
-
getFailedThumbnails
public java.util.Map<java.lang.String,FailedThumbnailInfo> getFailedThumbnails(org.alfresco.service.cmr.repository.NodeRef sourceNode)
Deprecated.Description copied from interface:ThumbnailServiceThis method returns aMapoffailed thumbnailsfor the specified source node. The map is keyed bythumbnail definition nameand the values are thefailed thumbnails.- Specified by:
getFailedThumbnailsin interfaceThumbnailService- Parameters:
sourceNode- the node whose thumbnails are to be checked.- Returns:
- a Map of failed thumbnails, if any. If there are no such failures, an empty Map will be returned.
-
getCopyCallback
public CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
Deprecated.See init - eg. registers "do nothing" copy behaviour for "cm:thumbnailModification" aspect- Returns:
- Returns
DoNothingCopyBehaviourCallback
-
-