Package com.agiletec.plugins.jpcontentworkflow.aps.system.services.workflow.model

Examples of com.agiletec.plugins.jpcontentworkflow.aps.system.services.workflow.model.WorkflowSearchFilter


    Collection<String> userGroupCodes = new ArrayList<String>();
    userGroupCodes.add(Group.FREE_GROUP_NAME);
    List<String> contentsId = this._contentSearcherManager.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(0, contentsId.size());
   
    WorkflowSearchFilter f1 = new WorkflowSearchFilter();
    f1.setTypeCode("ART");
    f1.addAllowedStep(Content.STATUS_READY);
    workflowFilters.add(f1);
    contentsId = this._contentSearcherManager.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(1, contentsId.size());
   
    WorkflowSearchFilter f2 = new WorkflowSearchFilter();
    f2.setTypeCode("RAH");
    f2.addAllowedStep(Content.STATUS_DRAFT);
    workflowFilters.add(f2);
    contentsId = this._contentSearcherManager.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(2, contentsId.size());
   
    WorkflowSearchFilter f3 = new WorkflowSearchFilter();
    f3.setTypeCode("EVN");
    f3.addAllowedStep(Content.STATUS_READY);
    workflowFilters.add(f3);
    contentsId = this._contentSearcherManager.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(2, contentsId.size());
  }
View Full Code Here


    Collection<String> userGroupCodes = new ArrayList<String>();
    userGroupCodes.add(Group.FREE_GROUP_NAME);
    List<String> contentsId = this._searcherDAO.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(0, contentsId.size());
   
    WorkflowSearchFilter f1 = new WorkflowSearchFilter();
    f1.setTypeCode("ART");
    f1.addAllowedStep(Content.STATUS_READY);
    workflowFilters.add(f1);
    contentsId = this._searcherDAO.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(1, contentsId.size());
   
    WorkflowSearchFilter f2 = new WorkflowSearchFilter();
    f2.setTypeCode("RAH");
    f2.addAllowedStep(Content.STATUS_DRAFT);
    workflowFilters.add(f2);
    contentsId = this._searcherDAO.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(2, contentsId.size());
   
    WorkflowSearchFilter f3 = new WorkflowSearchFilter();
    f3.setTypeCode("EVN");
    f3.addAllowedStep(Content.STATUS_READY);
    workflowFilters.add(f3);
    contentsId = this._searcherDAO.loadContentsId(workflowFilters, null, null, userGroupCodes);
    assertEquals(2, contentsId.size());
  }
View Full Code Here

      List<SmallContentType> contentTypes = this.getManagingContentTypes(user);
      boolean isSupervisor = this.getAuthorizationManager().isAuthOnPermission(user, Permission.SUPERVISOR);
      for (int i = 0; i < contentTypes.size(); i++) {
        SmallContentType type = contentTypes.get(i);
        Workflow workflow = this.getWorkflow(type.getCode());
        WorkflowSearchFilter filter = new WorkflowSearchFilter();
        filter.setTypeCode(type.getCode());
        List<String> allowedSteps = this.getAllowedStatus(user, isSupervisor, workflow);
        filter.setAllowedSteps(allowedSteps);
        filters.add(filter);
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getWorkflowSearchFilters");
      throw new ApsSystemException("Error extracting workflow search filters by user " + user, t);
View Full Code Here

          stat.setString(++index, categories[i]);
        }
      }
      if (null != workflowFilters) {
        for (int i = 0; i < workflowFilters.size(); i++) {
          WorkflowSearchFilter filter = workflowFilters.get(i);
          stat.setString(++index, filter.getTypeCode());
          for (int j = 0; j < filter.getAllowedSteps().size(); j++) {
            String step = filter.getAllowedSteps().get(j);
            stat.setString(++index, step);
          }
        }
      }
    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcontentworkflow.aps.system.services.workflow.model.WorkflowSearchFilter

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.