コード例 #1
0
  @Override
  @CoreSecured({CORE_CUSTOMER_ORGANIZATION_ACCESS})
  @Action(
      value = "details",
      results = {@Result(name = "success", location = "/org/details.jsp")})
  public String execute() throws ServiceException {
    if (org == null) {
      Org o = orgService.getById(getServiceContext(), getOrgId());

      org = o.getAsMap();

      org.put("parentOrgName", o.getParentOrgName());
    }
    if (reset) {
      contactDataGridState.getFilters().clear();
      orgPartDataGridState.getFilters().clear();
    }

    orgPartScope = scopeService.getScopeWithOrgParts(getServiceContext());

    contactByOrgItemProvider.setOrgId(getOrgId());

    orgPartItemProvider.setOrgId(getOrgId());
    orgPartItemProvider.setScopeId(getServiceContext().getScopeId());

    viewDef = configService.getViewDefinition(getServiceContext(), ViewDefTypeCode.ORG);
    contactsViewDef =
        configService.getViewDefinition(getServiceContext(), ViewDefTypeCode.CONTACT_DATAGRID);
    orgPartViewDef =
        configService.getViewDefinition(getServiceContext(), ViewDefTypeCode.ORG_PART_DATAGRID);

    return SUCCESS;
  }
コード例 #2
0
  private String routeToTask(String taskName) {
    Set<Org> orgs = new HashSet<>();
    orgs.add(orgService.getById(getServiceContext(), getOrgId()));
    Task task = orgTaskFlow.getTask(taskName);
    TaskFlowState state = new TaskFlowState();
    state.setTasks(Lists.newArrayList(task));
    orgTaskFlowData.setTaskFlowState(state);
    orgTaskFlowData.setOrgs(orgs);

    return SUCCESS;
  }