|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.transfer.RepoTransferReceiverImpl
public class RepoTransferReceiverImpl
The Repo Transfer Receiver is the "Back-End" for transfer subsystem.
Provides the implementation of the transfer commands on the destination repository.
Provides callback handlers for Aliens and Transferred Aspects.
Calls transfer policies.
Co-ordinates locking and logging as the transfer progresses.
Nested Class Summary | |
---|---|
class |
RepoTransferReceiverImpl.AsyncCommitCommand
This embedded class is used to push requests for asynchronous commits onto a different thread |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Field Summary |
---|
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnMoveNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Constructor Summary | |
---|---|
RepoTransferReceiverImpl()
|
Method Summary | |
---|---|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef deletedNodeRef)
When an alien node is deleted the it may be the last alien invader |
void |
cancel(java.lang.String transferId)
Abort |
org.alfresco.repo.transfer.RepoTransferReceiverImpl.Lock |
checkLock(java.lang.String transferId)
|
void |
commit(java.lang.String transferId)
Commit |
void |
commitAsync(java.lang.String transferId)
Commit asynchronously |
void |
end(java.lang.String transferId)
Asks the receiver to end (and clean up) the specified transfer |
void |
generateRequsite(java.lang.String transferId,
java.io.OutputStream out)
Generate the requsite |
AlienProcessor |
getAlienProcessor()
|
DescriptorService |
getDescriptorService()
|
JobLockService |
getJobLockService()
|
long |
getLockRefreshTime()
|
int |
getLockRetryCount()
|
long |
getLockRetryWait()
|
long |
getLockTimeOut()
|
PolicyComponent |
getPolicyComponent()
|
TransferProgressMonitor |
getProgressMonitor()
|
RuleService |
getRuleService()
Get the rule service |
java.io.File |
getStagingFolder(java.lang.String transferId)
|
TransferProgress |
getStatus(java.lang.String transferId)
|
org.alfresco.service.cmr.repository.NodeRef |
getTempFolder(java.lang.String transferId)
|
java.io.InputStream |
getTransferReport(java.lang.String transferId)
get the transfer report for the specified transfer |
TransferVersionChecker |
getTransferVersionChecker()
|
TransferVersion |
getVersion()
Get the version that we are transfering to. |
void |
init()
|
void |
onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent)
|
CopyBehaviourCallback |
onCopyAlien(org.alfresco.service.namespace.QName classRef,
CopyDetails copyDetails)
When an alien node is copied, don't copy the alien aspect. |
CopyBehaviourCallback |
onCopyTransferred(org.alfresco.service.namespace.QName classRef,
CopyDetails copyDetails)
When a transferred node is copied, don't copy the transferred aspect. |
void |
onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
boolean isNewNode)
When a new node is created as a child of a Transferred or Alien node then the new node needs to be marked as an alien. |
void |
onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
When an alien node is moved it may un-invade its old location and invade a new location. |
void |
onRestoreNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
When a transferred node is restored it may be a new invader or it may no longer be an invader. |
void |
prepare(java.lang.String transferId)
Prepare |
void |
saveContent(java.lang.String transferId,
java.lang.String contentFileId,
java.io.InputStream contentStream)
Save a content item |
void |
saveSnapshot(java.lang.String transferId,
java.io.InputStream openStream)
Store the specified snapshot file into the transfer staging area. |
void |
setActionService(ActionService actionService)
|
void |
setAlienProcessor(AlienProcessor alienProcessor)
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter)
|
void |
setDescriptorService(DescriptorService descriptorService)
|
void |
setFileTransferRootNodeFileFileSystem(java.lang.String rootFileSystem)
set the root node for the file system receiver |
void |
setInboundTransferRecordsPath(java.lang.String inboundTransferRecordsPath)
|
void |
setJobLockService(JobLockService jobLockService)
|
void |
setLockRefreshTime(long lockRefreshTime)
|
void |
setLockRetryCount(int lockRetryCount)
|
void |
setLockRetryWait(long lockRetryWait)
|
void |
setLockTimeOut(long lockTimeOut)
|
void |
setManifestProcessorFactory(ManifestProcessorFactory manifestProcessorFactory)
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
|
void |
setPolicyComponent(PolicyComponent policyComponent)
|
void |
setProgressMonitor(TransferProgressMonitor progressMonitor)
|
void |
setRootStagingDirectory(java.lang.String rootStagingDirectory)
|
void |
setRuleService(RuleService ruleService)
Set the ruleService |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
|
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
|
void |
setTransactionService(TransactionService transactionService)
|
void |
setTransferLockFolderPath(java.lang.String transferLockFolderPath)
|
void |
setTransferTempFolderPath(java.lang.String transferTempFolderPath)
|
void |
setTransferVersionChecker(TransferVersionChecker transferVersionChecker)
|
java.lang.String |
start(java.lang.String fromRepositoryId,
boolean transferToSelf,
TransferVersion fromVersion)
Asks the receiver to setup a new transfer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepoTransferReceiverImpl()
Method Detail |
---|
public void init()
public java.io.File getStagingFolder(java.lang.String transferId)
getStagingFolder
in interface TransferReceiver
public org.alfresco.service.cmr.repository.NodeRef getTempFolder(java.lang.String transferId)
getTempFolder
in interface TransferReceiver
public java.lang.String start(java.lang.String fromRepositoryId, boolean transferToSelf, TransferVersion fromVersion)
TransferReceiver
start
in interface TransferReceiver
fromRepositoryId
- the repositoryId of the sending systemtransferToSelf
- are transfers to the same repository allowed?fromVersion
- the version sending
public void end(java.lang.String transferId)
TransferReceiver
end
in interface TransferReceiver
transferId
- The transfer to endpublic void cancel(java.lang.String transferId) throws TransferException
TransferReceiver
cancel
in interface TransferReceiver
TransferException
public void prepare(java.lang.String transferId) throws TransferException
TransferReceiver
prepare
in interface TransferReceiver
TransferException
public org.alfresco.repo.transfer.RepoTransferReceiverImpl.Lock checkLock(java.lang.String transferId) throws TransferException
TransferException
public void saveSnapshot(java.lang.String transferId, java.io.InputStream openStream) throws TransferException
TransferReceiver
saveSnapshot
in interface TransferReceiver
transferId
- The identifier of the transfer with which this snapshot is associatedopenStream
- The open stream that holds the snapshot file.
TransferException
- If an error occurs while saving the snapshot file.public void saveContent(java.lang.String transferId, java.lang.String contentFileId, java.io.InputStream contentStream) throws TransferException
TransferReceiver
saveContent
in interface TransferReceiver
TransferException
public void commitAsync(java.lang.String transferId)
TransferReceiver
commitAsync
in interface TransferReceiver
public void commit(java.lang.String transferId) throws TransferException
TransferReceiver
commit
in interface TransferReceiver
TransferException
public TransferProgress getStatus(java.lang.String transferId) throws TransferException
getStatus
in interface TransferReceiver
TransferException
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService
- the searchService to setpublic void setTransactionService(TransactionService transactionService)
transactionService
- the transactionService to setpublic void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setTransferLockFolderPath(java.lang.String transferLockFolderPath)
transferLockFolderPath
- the transferLockFolderPath to setpublic void setTransferTempFolderPath(java.lang.String transferTempFolderPath)
transferTempFolderPath
- the transferTempFolderPath to setpublic void setRootStagingDirectory(java.lang.String rootStagingDirectory)
rootStagingDirectory
- the rootTransferFolder to setpublic void setInboundTransferRecordsPath(java.lang.String inboundTransferRecordsPath)
inboundTransferRecordsPath
- the inboundTransferRecordsPath to setpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the nodeService to setpublic void setManifestProcessorFactory(ManifestProcessorFactory manifestProcessorFactory)
manifestProcessorFactory
- the manifestProcessorFactory to setpublic void setBehaviourFilter(BehaviourFilter behaviourFilter)
behaviourFilter
- the behaviourFilter to setpublic TransferProgressMonitor getProgressMonitor()
getProgressMonitor
in interface TransferReceiver
public void setProgressMonitor(TransferProgressMonitor progressMonitor)
progressMonitor
- the progressMonitor to setpublic void setActionService(ActionService actionService)
public void setRuleService(RuleService ruleService)
ruleService
- the ruleService to setpublic RuleService getRuleService()
public void generateRequsite(java.lang.String transferId, java.io.OutputStream out) throws TransferException
generateRequsite
in interface TransferReceiver
out
- an open stream to receive the requisite
TransferException
public java.io.InputStream getTransferReport(java.lang.String transferId)
TransferReceiver
getTransferReport
in interface TransferReceiver
public void setPolicyComponent(PolicyComponent policyComponent)
public PolicyComponent getPolicyComponent()
public void onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, boolean isNewNode)
Then the tree needs to be walked upwards to mark all parent transferred nodes as alien.
onCreateChildAssociation
in interface NodeServicePolicies.OnCreateChildAssociationPolicy
childAssocRef
- the child association that has been createdisNewNode
- true if the node is new or false if the node is being linked inpublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef deletedNodeRef)
Walk the tree checking the invasion status!
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
deletedNodeRef
- the node referencepublic void onRestoreNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Walk the tree checking the invasion status!
onRestoreNode
in interface NodeServicePolicies.OnRestoreNodePolicy
childAssocRef
- the newly created child association referencepublic void onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef, org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
onMoveNode
in interface NodeServicePolicies.OnMoveNodePolicy
oldChildAssocRef
- the child association reference prior to the movenewChildAssocRef
- the child association reference after the movepublic CopyBehaviourCallback onCopyTransferred(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
public CopyBehaviourCallback onCopyAlien(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
public void setDescriptorService(DescriptorService descriptorService)
public DescriptorService getDescriptorService()
public void setAlienProcessor(AlienProcessor alienProcessor)
public AlienProcessor getAlienProcessor()
public void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean newContent)
onContentUpdate
in interface ContentServicePolicies.OnContentUpdatePolicy
nodeRef
- the node referencepublic void setJobLockService(JobLockService jobLockService)
public JobLockService getJobLockService()
public void setLockRetryCount(int lockRetryCount)
public int getLockRetryCount()
public void setLockRetryWait(long lockRetryWait)
public long getLockRetryWait()
public void setLockTimeOut(long lockTimeOut)
public long getLockTimeOut()
public void setLockRefreshTime(long lockRefreshTime)
public long getLockRefreshTime()
public void setTransferVersionChecker(TransferVersionChecker transferVersionChecker)
public TransferVersionChecker getTransferVersionChecker()
public TransferVersion getVersion()
TransferReceiver
getVersion
in interface TransferReceiver
public void setFileTransferRootNodeFileFileSystem(java.lang.String rootFileSystem)
TransferReceiver
setFileTransferRootNodeFileFileSystem
in interface TransferReceiver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |