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 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
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy
QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeCreateNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName) Deprecated.Called before a new node is created.createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String thumbnailName) Deprecated.Creates a new thumbnail for the given node and content property.createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String thumbnailName, ThumbnailParentAssociationDetails assocDetails) Deprecated.getCopyCallback(QName classRef, CopyDetails copyDetails) Deprecated.See init - eg. registers "do nothing" copy behaviour for "cm:thumbnailModification" aspectgetFailedThumbnails(NodeRef sourceNode) Deprecated.This method returns aMapoffailed thumbnailsfor the specified source node.getThumbnailByName(NodeRef node, QName contentProperty, String thumbnailName) Deprecated.Gets the thumbnail for a given content property with a given name.getThumbnailNode(ChildAssociationRef thumbnailRef) Deprecated.This method returns the NodeRef for the thumbnail, using the ChildAssociationRef that links the sourceNode to its associated Thumbnail node.Deprecated.Gets the thumbnail registrygetThumbnails(NodeRef node, QName contentProperty, String mimetype, TransformationOptions options) Deprecated.Gets a list of thumbnail nodes for a given content property that match the provided mimetype and transformation options.booleanDeprecated.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(ChildAssociationRef childAssoc) Deprecated.Called when a new node has been created.voidonDeleteNode(ChildAssociationRef childAssocRef, boolean isNodeArchived) Deprecated.Called after a node is deleted.voidsetBehaviourFilter(BehaviourFilter behaviourFilter) Deprecated.Set the behaviour filter.voidsetNodeService(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(NodeRef thumbnail, TransformationOptions transformationOptions) Deprecated.Updates the content of a thumbnail.
-
Constructor Details
-
ThumbnailServiceImpl
public ThumbnailServiceImpl()Deprecated.
-
-
Method Details
-
setBehaviourFilter
Deprecated.Set the behaviour filter.- Parameters:
behaviourFilter- BehaviourFilter
-
setRenditionService
Deprecated.Set the rendition service.- Parameters:
renditionService- RenditionService
-
setNodeService
Deprecated.Set the node service- Parameters:
nodeService- node service
-
setThumbnailRegistry
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
Deprecated.Set the policy component to listen for various events- Since:
- 3.5.0
-
setTransactionService
Deprecated. -
setRuleService
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(NodeRef parentRef, QName assocTypeQName, QName assocQName, 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
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
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
Deprecated.Description copied from interface:ThumbnailServiceGets the thumbnail registry- Specified by:
getThumbnailRegistryin interfaceThumbnailService- Returns:
ThumbnailRegistrythumbnail registry- See Also:
-
createThumbnail
public NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, 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:
-
createThumbnail
public NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, 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:
-
getThumbnailNode
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
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:
-
getThumbnailByName
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:
-
getThumbnails
public List<NodeRef> getThumbnails(NodeRef node, QName contentProperty, 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:
-
getFailedThumbnails
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
Deprecated.See init - eg. registers "do nothing" copy behaviour for "cm:thumbnailModification" aspect- Returns:
- Returns
DoNothingCopyBehaviourCallback
-