public class SimpleThumbnailer extends TransactionListenerAdapter implements ContentServicePolicies.OnContentUpdatePolicy, org.springframework.beans.factory.InitializingBean
Policy.Arg
QNAME
Constructor and Description |
---|
SimpleThumbnailer() |
Modifier and Type | Method and Description |
---|---|
void |
afterCommit()
Invoked after transaction commit.
|
void |
afterPropertiesSet()
Registers the policy behaviour methods.
|
void |
onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent)
When content changes, thumbnails are (re)generated.
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the node service.
|
void |
setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component.
|
void |
setThumbnailService(ThumbnailService thumbnailService)
Sets the thumbnail service.
|
void |
setTransactionService(TransactionService transactionService)
Sets the transaction service.
|
afterRollback, beforeCommit, beforeCompletion, flush
public void setPolicyComponent(PolicyComponent policyComponent)
policyComponent
- used for registrationspublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the node servicepublic void setTransactionService(TransactionService transactionService)
transactionService
- the transaction servicepublic void setThumbnailService(ThumbnailService thumbnailService)
thumbnailService
- the thumbnail servicepublic void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean newContent)
onContentUpdate
in interface ContentServicePolicies.OnContentUpdatePolicy
nodeRef
- the node refnewContent
- is the content new?public void afterCommit()
TransactionListenerAdapter
Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.
afterCommit
in interface org.alfresco.util.transaction.TransactionListener
afterCommit
in class TransactionListenerAdapter
Copyright © 2005–2017 Alfresco Software. All rights reserved.