Package com.agiletec.aps.util

Examples of com.agiletec.aps.util.SelectItem


      Map<String, String> senders = this.getMailManager().getMailConfig().getSenders();
      List<SelectItem> items = new ArrayList<SelectItem>(senders.size());
      Iterator<String> iter = senders.keySet().iterator();
      while (iter.hasNext()) {
        String string = (String) iter.next();
        SelectItem item = new SelectItem(string, senders.get(string));
        items.add(item);
      }
      return items;
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getMailSenders");
View Full Code Here


 
  public List<SelectItem> getFormProtectionTypeSelectItems() {
    List<SelectItem> items = new ArrayList<SelectItem>();
    for (int i = 0; i < JpwebdynamicformSystemConstants.FORM_PROTECTION_TYPES.length; i++) {
      String key = JpwebdynamicformSystemConstants.FORM_PROTECTION_TYPES[i];
      items.add(new SelectItem(key, this.getText("label.formProtectionType." + key)));
    }
    return items;
  }
View Full Code Here

  //@Override
  @AfterReturning(pointcut = "execution(* com.agiletec.plugins.jacms.apsadmin.content.IntroNewContentAction.getAvalaibleStatus())", returning = "items")
  public void getAvalaibleStatus(Object items) {
    System.out.println("getAvalaibleStatus " + this);
    //List<SelectItem> items = new ArrayList<SelectItem>(1);
    SelectItem item = new SelectItem(Content.STATUS_DRAFT, "name.contentStatus." + Content.STATUS_DRAFT);
    ((List<SelectItem>)items).clear();
    ((List<SelectItem>)items).add(item);
  }
View Full Code Here

    List<SelectItem> items;
    try {
      Content content = this.getContent();
      items = new ArrayList<SelectItem>(1);
      String statusDescrKey = "name.contentStatus." +content.getStatus();
      SelectItem item = null;
      if (statusDescrKey.equals(this.getText(statusDescrKey))) {
        String contentType = content.getTypeCode();
        Workflow workflow = this.getWorkflowManager().getWorkflow(contentType);
        if (null != workflow && null != workflow.getStep(content.getStatus())) {
          item = new SelectItem(content.getStatus(), workflow.getStep(content.getStatus()).getDescr());
        } else {
          item = new SelectItem(content.getStatus(), content.getStatus());
        }
      } else {
        item = new SelectItem(content.getStatus(), statusDescrKey);
      }
      items.add(item);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getAvalaibleStatus");
      throw new RuntimeException("Error in getAvalaibleStatus");
View Full Code Here

  public List<SelectItem> getAvalaibleStatus() {
    if (null != this.getContentType() && this.getContentType().trim().length() > 0) {
      return ((IContentWorkFlowActionHelper) this.getContentActionHelper()).getAvalaibleStatus(this.getCurrentUser(), this.getContentType());
    }
    List<SelectItem> items = new ArrayList<SelectItem>();
    items.add(new SelectItem(Content.STATUS_DRAFT, "name.contentStatus." + Content.STATUS_DRAFT));
    if (super.hasCurrentUserPermission(Permission.SUPERVISOR)) {
      items.add(new SelectItem(Content.STATUS_READY, "name.contentStatus." + Content.STATUS_READY));
    }
    return items;
  }
View Full Code Here

       
        @Override
  public List<SelectItem> getAllowedUserFilterTypes() throws ApsSystemException {
    List<SelectItem> types = new ArrayList<SelectItem>();
    try {
      types.add(new SelectItem(UserFilterOptionBean.KEY_FULLTEXT, this.getText("label.fulltext")));
      types.add(new SelectItem(UserFilterOptionBean.KEY_CATEGORY, this.getText("label.category")));
      String contentType = this.getWidget().getConfig().getProperty(IContentListWidgetHelper.WIDGET_PARAM_CONTENT_TYPE);
      Content prototype = this.getContentManager().createContentType(contentType);
      List<AttributeInterface> contentAttributes = prototype.getAttributeList();
      for (int i=0; i<contentAttributes.size(); i++) {
        AttributeInterface attribute = contentAttributes.get(i);
        if (attribute.isSearcheable()) {
                                    // Escludo filtro per tipo Coordinate
                                    if(!ContentListViewerWidgetAction.ATTRIBUTE_TYPE_COORD.equals(attribute.getType()))
          types.add(new SelectItem(UserFilterOptionBean.TYPE_ATTRIBUTE + "_" + attribute.getName(), this.getText("label.attribute", new String[]{attribute.getName()})));
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getAllowedUserFilterTypes");
      throw new ApsSystemException("Error extracting allowed user filter types", t);
View Full Code Here

       
        @Override
  public List<SelectItem> getAllowedFilterTypes() throws ApsSystemException {
    List<SelectItem> types = new ArrayList<SelectItem>();
    try {
      types.add(new SelectItem(IContentListFilterAction.METADATA_KEY_PREFIX + IContentManager.CONTENT_CREATION_DATE_FILTER_KEY, this.getText("label.creationDate")));
      types.add(new SelectItem(IContentListFilterAction.METADATA_KEY_PREFIX + IContentManager.CONTENT_MODIFY_DATE_FILTER_KEY, this.getText("label.lastModifyDate")));
      String contentType = this.getWidget().getConfig().getProperty(IContentListWidgetHelper.WIDGET_PARAM_CONTENT_TYPE);
      Content prototype = this.getContentManager().createContentType(contentType);
      List<AttributeInterface> contentAttributes = prototype.getAttributeList();
      for (int i=0; i<contentAttributes.size(); i++) {
        AttributeInterface attribute = contentAttributes.get(i);
        if (attribute.isSearcheable()) {
                                    // Escludo filtro per tipo Coordinate
                                    if(!ContentListViewerWidgetAction.ATTRIBUTE_TYPE_COORD.equals(attribute.getType()))
          types.add(new SelectItem(attribute.getName(), this.getText("label.attribute", new String[]{attribute.getName()})));
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getAllowedFilterTypes");
      throw new ApsSystemException("Error extracting allowed filter types", t);
View Full Code Here

  }
 
  @Override
  public List<SelectItem> getAvalaibleStatus() {
    List<SelectItem> items = new ArrayList<SelectItem>(1);
    SelectItem item = new SelectItem(Content.STATUS_DRAFT, "name.contentStatus." + Content.STATUS_DRAFT);
    items.add(item);
    return items;
  }
View Full Code Here

    String roleName = this.getWorkflowManager().getRole(contentTypeCode);
    if (!this.checkRole(roleName, user)) {
      return items;
    }
    Workflow workflow = this.getWorkflowManager().getWorkflow(contentTypeCode);
    items.add(new SelectItem(Content.STATUS_DRAFT, "name.contentStatus." + Content.STATUS_DRAFT));
    if (null != workflow) {
      Iterator<Step> stepsIter = workflow.getSteps().iterator();
      while (stepsIter.hasNext()) {
        Step step = stepsIter.next();
        if (this.checkRole(step.getRole(), user)) {
          items.add(new SelectItem(step.getCode(), step.getDescr()));
        }
      }
    }
    if (this.getAuthorizationManager().isAuthOnPermission(user, Permission.SUPERVISOR)) {
      items.add(new SelectItem(Content.STATUS_READY, "name.contentStatus." + Content.STATUS_READY));
    }
    return items;
  }
View Full Code Here

  }
 
  public List<SelectItem> getAllowedFilterTypes() throws ApsSystemException {
    List<SelectItem> types = new ArrayList<SelectItem>();
    try {
      types.add(new SelectItem(IContentListFilterAction.METADATA_KEY_PREFIX + IContentManager.CONTENT_CREATION_DATE_FILTER_KEY, this.getText("label.creationDate")));
      types.add(new SelectItem(IContentListFilterAction.METADATA_KEY_PREFIX + IContentManager.CONTENT_MODIFY_DATE_FILTER_KEY, this.getText("label.lastModifyDate")));
      //String contentType = this.getShowlet().getConfig().getProperty(IContentListWidgetHelper.WIDGET_PARAM_CONTENT_TYPE);
      Content prototype = this.getContentManager().createContentType(this.getContentType());
      List<AttributeInterface> contentAttributes = prototype.getAttributeList();
      for (int i=0; i<contentAttributes.size(); i++) {
        AttributeInterface attribute = contentAttributes.get(i);
        if (attribute.isSearcheable()) {
          types.add(new SelectItem(attribute.getName(), this.getText("label.attribute", new String[]{attribute.getName()})));
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getAllowedFilterTypes");
      throw new ApsSystemException("Error extracting allowed filter types", t);
View Full Code Here

TOP

Related Classes of com.agiletec.aps.util.SelectItem

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.