All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.day.cq.dam.core.process.SyncContentProcess Maven / Gradle / Ivy

package com.day.cq.dam.core.process;

import com.day.cq.commons.jcr.JcrConstants;
import com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess;
import com.day.cq.workflow.PayloadMap;
import com.day.cq.workflow.WorkflowException;
import com.day.cq.workflow.WorkflowSession;
import com.day.cq.workflow.exec.WorkItem;
import com.day.cq.workflow.metadata.MetaDataMap;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferencePolicy;
import org.apache.felix.scr.annotations.Service;

/**
 * @deprecated   Since 6.3, this is sync mechanism is not used anymore.
 *               This implementation will be removed in future releases.
 *
 * The SyncContentProcess snycs the content below /content/dam in
 * two selectable modes.
 * 

* Expects its Payload to point to a nt:folder *

* Arguments: *

* * * * * * * * * * * * * * * * * *
PrefixDescriptionExample
mode:one of the follwoing: *
    *
  • cleanup *
  • sync *
* The mode cleanup removes the {@link javax.jcr.Node Nodes} in * /content/dam structure that hava no counterpart in the /var structure The * mode sync starts for any {@value JcrConstants#NT_FILE} in the branch a * {@link com.day.cq.workflow.exec.Workflow Workflow} with the * {@link com.day.cq.workflow.model.WorkflowModel WorkflowModel} as given by the * wfModelId argument and the {@value JcrConstants#NT_FILE}'s path as * payload
mode:sync
wfModelId:Idendifier of a WorkflowModel. This Workflow will be started on Assets * added by this Process in mode sync.
* In mode clean this argument is ignored
wfModelId:/etc/wokflow/models/syncmodell
* * @see AbstractAssetWorkflowProcess */ @Component(metatype = false) @Service @Property(name = "process.label", value = "Synchronize Content") @Deprecated public class SyncContentProcess extends AbstractAssetWorkflowProcess { @Reference(policy = ReferencePolicy.STATIC) private PayloadMap payloadMap; /** * The available arguments to this process implementation. */ public enum Arguments { PROCESS_ARGS("PROCESS_ARGS"), MODE("mode"), WF_MODEL_ID("wfModelId"); private String argumentName; Arguments(String argumentName) { this.argumentName = argumentName; } public String getArgumentName() { return this.argumentName; } public String getArgumentPrefix() { return this.argumentName + ":"; } } /** * The available modes of the {@link Arguments#MODE mode argument}. */ public enum Modes { sync, cleanup; } @Deprecated public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData) throws WorkflowException { throw new UnsupportedOperationException("Since 6.3 this sync mechanism is not used anymore."); } // ------------< helpers >-------------------------------------------------- @Deprecated protected void startWorkflow(String assetPath, String workflowId, WorkflowSession wfSession) { throw new UnsupportedOperationException("Since 6.3 this sync mechanism is not used anymore."); } @Deprecated public String[] buildArguments(MetaDataMap metaData) { throw new UnsupportedOperationException("Since 6.3 this sync mechanism is not used anymore."); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy