Package com.dotmarketing.portlets.workflows.model

Examples of com.dotmarketing.portlets.workflows.model.WorkflowScheme


        return list;
    }

    @Override
    public WorkflowScheme findSchemeByName(String schemaName) throws DotDataException {
        WorkflowScheme scheme = null;
        try {
            final DotConnect db = new DotConnect();
            db.setSQL(sql.SELECT_SCHEME_NAME);
            db.addParam((schemaName != null ? schemaName.trim() : ""));
            List<WorkflowScheme> list = this.convertListToObjects(db.loadObjectResults(), WorkflowScheme.class);
View Full Code Here


       
        // update scheme mod date
        WorkflowActionClass clazz = findActionClass(param.getActionClassId());
        WorkflowAction action = findAction(clazz.getActionId());
        WorkflowStep step = findStep(action.getStepId());
        WorkflowScheme scheme = findScheme(step.getSchemeId());
        saveScheme(scheme);
    }
View Full Code Here

        }
      }
    }

    try {
      WorkflowScheme scheme = APILocator.getWorkflowAPI().findSchemeForStruct(struct);
      if(scheme.isMandatory() && !UtilMethods.isSet(scheme.getEntryActionId())){
        allowImport = false;
      }
    } catch (DotDataException e) {
      Logger.error(this, e.getMessage());
    }
View Full Code Here

    List<Object> headers = new ArrayList<Object>();
    Map<String, Field> fieldsMapping = new HashMap<String, Field>();
    Structure st = null;
    if(!"_all".equals(structureInode)){
        st = StructureCache.getStructureByInode(structureInode);
        WorkflowScheme wfScheme = APILocator.getWorkflowAPI().findSchemeForStruct(st);
        lastSearchMap.put("structure", st);
        luceneQuery.append("+structureName:" + st.getVelocityVarName() + " ");
    }
    else {
        for(int i=0;i<fields.size();i++){
            String x = fields.get(i);
            if("_all".equals(x)){
                String next =  fields.get(i+1);
                next = next.replaceAll("\\*", "");
                while(next.contains("  ")){
                  next = next.replace("  ", " ");
                }
                String y[] = next.split(" ");
                for(int j=0;j<y.length;j++){
                  y[j] = y[j].replaceAll(specialCharsToEscape, "\\\\$1");
                    luceneQuery.append("title:" + y[j] + "* ");
                }
                break;
            }
        }
        luceneQuery.append("-structureName:Host ");
        luceneQuery.append("-structureType:3 ");
    }

    WorkflowScheme wfScheme = APILocator.getWorkflowAPI().findSchemeForStruct(st);

    // Stores (database name,type description) pairs to catch certain field types.
    List<Field> targetFields = new ArrayList<Field>();
    if(st!=null){
        targetFields = FieldsCache.getFieldsByStructureInode(st.getInode());
View Full Code Here

    boolean schemeMandatory = (request.getParameter("schemeMandatory") != null);
    String schemeEntryAction = request.getParameter("schemeEntryAction");
    if(!UtilMethods.isSet(schemeEntryAction)){
      schemeEntryAction=null;
    }
    WorkflowScheme newScheme = new WorkflowScheme();

    try {

      WorkflowScheme origScheme = APILocator.getWorkflowAPI().findScheme(schemeId);
      BeanUtils.copyProperties(newScheme, origScheme);
    } catch (Exception e) {
      Logger.debug(this.getClass(), "Unable to find scheme" + schemeId);
    }
View Full Code Here

      return;
    }
    WorkflowAPI wapi = APILocator.getWorkflowAPI();

    try {
      WorkflowScheme scheme = wapi.findScheme(schemeId);
      List<WorkflowStep> steps =  wapi.findSteps(scheme);
     
     
            response.getWriter().write(stepsToJson(steps));
View Full Code Here

        IdentifierDateJob.triggerJobImmediately(structure, _getUser(req))
      }
     
      structureForm.setUrlMapPattern(structure.getUrlMapPattern());

      WorkflowScheme scheme = APILocator.getWorkflowAPI().findSchemeForStruct(structure);

      String schemeId = req.getParameter("workflowScheme");

      if (scheme != null && UtilMethods.isSet(schemeId) && !schemeId.equals(scheme.getId())) {
        scheme = APILocator.getWorkflowAPI().findScheme(schemeId);
        APILocator.getWorkflowAPI().saveSchemeForStruct(structure, scheme);
      }

      // if the structure is a widget we need to add the base fields.
View Full Code Here

   
  }

  public WorkflowScheme getScheme(String key) {

    WorkflowScheme scheme = null;
    try {
      scheme = (WorkflowScheme) cache.get(key, getPrimaryGroup());
    } catch (DotCacheException e) {
      Logger.debug(this, "Cache Entry not found", e);
    }
View Full Code Here

  private int getCountContentletsReferencingStep(WorkflowStep step) throws DotDataException{
    return wfac.getCountContentletsReferencingStep(step);
  }
 
  public void reorderStep(WorkflowStep step, int order) throws DotDataException, AlreadyExistException {
    WorkflowScheme scheme = findScheme(step.getSchemeId());
    List<WorkflowStep> steps = null;

    try {
      steps = findSteps(scheme);
    } catch (Exception e) {
View Full Code Here

    return wfac.retrieveLastStepAction(taskId);
  }

  public WorkflowAction findEntryAction(Contentlet contentlet, User userthrows DotDataException, DotSecurityException {

    WorkflowScheme scheme = findSchemeForStruct(contentlet.getStructure());
    WorkflowStep entryStep = null;
    List<WorkflowStep> wfSteps = findSteps(scheme);

    for(WorkflowStep wfStep : wfSteps){
      if(!UtilMethods.isSet(entryStep))
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.workflows.model.WorkflowScheme

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.