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

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

/*
 * Copyright 1997-2008 Day Management AG
 * Barfuesserplatz 6, 4001 Basel, Switzerland
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Day Management AG, ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Day.
 */
package com.day.cq.dam.core.process;

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 sync mechanism is not used anymore.
 *               This implementation will be removed in future releases.
 *
 * The SyncVarProcess syncs the content below /var/dam with
 * /content/dam in two diffrent modes.
 * 

* Process is only executed if started with a mode argument, the payload exists * and is currently not involved in a {@link com.day.cq.workflow.exec.Workflow * Workflow} *

* Arguments: *

* * * * * * * * * * * * *
PrefixDescriptionExample
mode:one of the follwoing: *
    *
  • cleanup *
  • sync *
* The mode cleanup removes the Items deleted from the content structure. *
* The mode sync additionally adds the newly generated files to the var * structure.
mode:sync
* @see AbstractAssetWorkflowProcess */ @Component(metatype = false) @Service @Property(name = "process.label", value = "Synchronize /var/dam") @Deprecated public class SyncVarProcess 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"); 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."); } @Deprecated public void execute(WorkItem workItem, WorkflowSession workflowSession) throws Exception { // noop } @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