Package com.dotmarketing.portlets.workflows.actionlet

Examples of com.dotmarketing.portlets.workflows.actionlet.WorkFlowActionlet


    WorkflowAPI wapi = APILocator.getWorkflowAPI();

    try {
      String actionClassId = request.getParameter("actionClassId");
      WorkflowActionClass wac = wapi.findActionClass(actionClassId);
      WorkFlowActionlet actionlet = wapi.findActionlet(wac.getClazz());
      List<WorkflowActionletParameter> params = actionlet.getParameters();
      Map<String, WorkflowActionClassParameter> enteredParams = wapi.findParamsForActionClass(wac);
      List<WorkflowActionClassParameter> newParams = new ArrayList<WorkflowActionClassParameter>();     
      String userIds = null;
      for (WorkflowActionletParameter expectedParam : params) {       
        WorkflowActionClassParameter enteredParam = enteredParams.get(expectedParam.getKey());
View Full Code Here


          StringTokenizer st = new StringTokenizer(customActionlets, ",");
          while (st.hasMoreTokens()) {
            String clazz = st.nextToken();
            try {
              WorkFlowActionlet actionlet = (WorkFlowActionlet) Class.forName(clazz.trim()).newInstance();
              actionletList.add(actionlet);
            } catch (Exception e) {
              Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
            }
          }

          // get the included (shipped with) actionlet classes
          for (Class<WorkFlowActionlet> z : actionletClasses) {
            try {
              actionletList.add(z.newInstance());
            } catch (InstantiationException e) {
              Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
            } catch (IllegalAccessException e) {
              Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
            }
          }

          Collections.sort(actionletList, new ActionletComparator());
          actionletMap = new LinkedHashMap<String, WorkFlowActionlet>();
          for(WorkFlowActionlet actionlet : actionletList){

            try {
              actionletMap.put(actionlet.getClass().getCanonicalName(),actionlet.getClass().newInstance());
              if ( !actionletClasses.contains( actionlet.getClass() ) ) {
                actionletClasses.add( actionlet.getClass() );
              }
            } catch (InstantiationException e) {
              Logger.error(WorkflowAPIImpl.class,e.getMessage(),e);
            } catch (IllegalAccessException e) {
              Logger.error(WorkflowAPIImpl.class,e.getMessage(),e);
View Full Code Here


    List<WorkflowActionClass> actionClasses = processor.getActionClasses();
    if(actionClasses != null){
      for(WorkflowActionClass actionClass : actionClasses){
        WorkFlowActionlet actionlet= actionClass.getActionlet();
        //Validate the actionlet exists and the OSGI is installed and running.
        if(UtilMethods.isSet(actionlet)){
          Map<String,WorkflowActionClassParameter> params = findParamsForActionClass(actionClass);
          actionlet.executePreAction(processor, params);
          //if we should stop processing further actionlets
          if(actionlet.stopProcessing()){
            break;
          }
        }else {
          throw new DotWorkflowException("Actionlet: " + actionClass.getName() + " is null. Check if the Plugin is installed and running.");
        }
View Full Code Here

      }

      List<WorkflowActionClass> actionClasses = processor.getActionClasses();
      if(actionClasses != null){
        for(WorkflowActionClass actionClass : actionClasses){
          WorkFlowActionlet actionlet= actionClass.getActionlet();
          Map<String,WorkflowActionClassParameter> params = findParamsForActionClass(actionClass);
          actionlet.executeAction(processor, params);

          //if we should stop processing further actionlets
          if(actionlet.stopProcessing()){
            break;
          }
        }
      }
View Full Code Here

    refreshWorkFlowActionletMap();
    return workFlowActionletClass.getCanonicalName();
  }

  public void removeActionlet(String workFlowActionletName) {
    WorkFlowActionlet actionlet = actionletMap.get(workFlowActionletName);
    actionletClasses.remove(actionlet.getClass());
    refreshWorkFlowActionletMap();
  }
View Full Code Here

TOP

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

Copyright © 2018 www.massapicom. 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.