Package com.dotmarketing.portlets.workflows.actionlet

Source Code of com.dotmarketing.portlets.workflows.actionlet.CheckoutContentActionlet

package com.dotmarketing.portlets.workflows.actionlet;

import java.util.List;
import java.util.Map;

import com.dotmarketing.business.APILocator;
import com.dotmarketing.portlets.workflows.model.WorkflowActionClassParameter;
import com.dotmarketing.portlets.workflows.model.WorkflowActionFailureException;
import com.dotmarketing.portlets.workflows.model.WorkflowActionletParameter;
import com.dotmarketing.portlets.workflows.model.WorkflowProcessor;
import com.dotmarketing.portlets.workflows.model.WorkflowStep;
import com.dotmarketing.util.Logger;

public class CheckoutContentActionlet extends WorkFlowActionlet {



  /**
   *
   */
  private static final long serialVersionUID = 1L;

  public String getName() {
    return "Lock content";
  }

  public String getHowTo() {

    return "This actionlet will checkout and lock the content.";
  }

  public void executeAction(WorkflowProcessor processor,Map<String,WorkflowActionClassParameter>  params) throws WorkflowActionFailureException {
    try {

      APILocator.getContentletAPI().lock(processor.getContentlet(), processor.getUser(), true);
    } catch (Exception e) {
      Logger.error(this.getClass(),e.getMessage(),e);
      throw new  WorkflowActionFailureException(e.getMessage());
   
    }

  }

  public WorkflowStep getNextStep() {

    return null;
  }

  @Override
  public  List<WorkflowActionletParameter> getParameters() {

    return null;
  }
}
TOP

Related Classes of com.dotmarketing.portlets.workflows.actionlet.CheckoutContentActionlet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.