As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public class RemotePublisher { private PolicyComponent policyComponent; private TransferService2 transferService; public void init() { policyComponent.bindClassBehaviour( TransferServicePolicies.OnEndInboundTransferPolicy.QNAME, TransferModel.TYPE_TRANSFER_RECORD, new JavaBehaviour(this, "onEndInboundTransferCommit", NotificationFrequency.TRANSACTION_COMMIT)); } public void onEndInboundTransferCommit(String transferId, Set<NodeRef> createdNodes, Set<NodeRef> updatedNodes, Set<NodeRef> deletedNodes) { Set<NodeRef> nodesToTransfer = new HashSet<NodeRef>(359); nodesToTransfer.addAll(createdNodes); nodesToTransfer.addAll(updatedNodes); nodesToTransfer.addAll(deletedNodes); TransferDefinition transferDef = new TransferDefinition(); transferDef.setNodes(nodesToTransfer); transferService.transferAsync("My Remote Target", transferDef); } }
policyComponent.bindClassBehaviour( TransferServicePolicies.OnEndInboundTransferPolicy.QNAME, TransferModel.TYPE_TRANSFER_RECORD, new JavaBehaviour(this, "onEndInboundTransferCommit", NotificationFrequency.TRANSACTION_COMMIT));
<bean id="myRemotePublisher" class="com.example.RemotePublisher" init-method="init"> <property name="policyComponent" ref="policyComponent" /> <property name="transferService" ref="transferService2" /> </bean>
<bean id="wqsmodule_publishingCrawlerConfigurer" class="org.alfresco.module.org_alfresco_module_wcmquickstart.publish.WqsNodeCrawlerConfigurerImpl" />