Package com.agiletec.aps.util

Examples of com.agiletec.aps.util.ApsProperties


  public int doStartTag() throws JspException {
    ServletRequest request = this.pageContext.getRequest();
    try {
      RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
      Widget widget = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
            ApsProperties showletConfig = widget.getConfig();
            String modelId = this.extractModelId(showletConfig, reqCtx);
      if (null != modelId) {
        String var = this.getVar();
        if (null == var || "".equals(var)) {
          this.pageContext.getOut().print(modelId);
View Full Code Here


    }
  }
   
  protected void addLabelGroups(String key, String defaultValue) throws ApsSystemException {
    try {
      ApsProperties properties = new ApsProperties();
      Lang defaultLang = super.getLangManager().getDefaultLang();
      properties.put(defaultLang.getCode(), defaultValue);
      this.getI18nManager().addLabelGroup(key, properties);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addLabelGroups");
      throw new RuntimeException("Error adding label groups - key '" + key + "'", t);
    }
View Full Code Here

    }
  }

  protected void addLabelGroups(String key, String defaultValue) throws ApsSystemException {
    try {
      ApsProperties properties = new ApsProperties();
      Lang defaultLang = super.getLangManager().getDefaultLang();
      properties.put(defaultLang.getCode(), defaultValue);
      this.getI18nManager().addLabelGroup(key, properties);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addLabelGroups");
      throw new RuntimeException("Error adding label groups - key '" + key + "'", t);
    }
View Full Code Here

    String typeCode = null;
    RequestContext reqCtx = (RequestContext) this.getRequest().getAttribute(RequestContext.REQCTX);
    if (reqCtx != null) {
      Widget showlet = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
      if (showlet != null) {
        ApsProperties config = showlet.getConfig();
        if (null != config) {
          String showletTypeCode = config.getProperty(JpUserRegSystemConstants.TYPECODE_SHOWLET_PARAM);
          if (showletTypeCode!=null && showletTypeCode.trim().length()>0) {
            typeCode = showletTypeCode.trim();
          }
        }
      }
View Full Code Here

  @Override
  public String init() {
    String result = super.init();
    try {
      if (result.equals(SUCCESS)) {
        ApsProperties config = this.getWidget().getConfig();
        String typeCode = config.getProperty(JpwebdynamicformSystemConstants.TYPECODE_WIDGET_PARAM);
        this.setTypeCode(typeCode);
        String protectionType = config.getProperty(JpwebdynamicformSystemConstants.FORM_PROTECTION_TYPE_WIDGET_PARAM);
        this.setFormProtectionType(protectionType);
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "init");
      return FAILURE;
View Full Code Here

    try {
      if (null != this.getTitle() && this.getTitle().trim().length() > 0) {
        reqCtx.addExtraParam(SystemConstants.EXTRAPAR_EXTRA_PAGE_TITLES, this.getTitle());
      } else if (null != this.getLabelKey() && this.getLabelKey().trim().length() > 0) {
        II18nManager i18nManager = (II18nManager) ApsWebApplicationUtils.getBean(SystemConstants.I18N_MANAGER, this.pageContext);
        ApsProperties titles = i18nManager.getLabelGroups().get(this.getLabelKey());
        if (null != titles) {
          reqCtx.addExtraParam(SystemConstants.EXTRAPAR_EXTRA_PAGE_TITLES, titles);
        } else {
          reqCtx.addExtraParam(SystemConstants.EXTRAPAR_EXTRA_PAGE_TITLES, this.getLabelKey());
        }
View Full Code Here

  protected int getMaxElementForItem(int maxItems, ServletRequest request) {
    if (maxItems == 0) {
      RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
      if (reqCtx != null) {
        Widget showlet = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
        ApsProperties config = showlet.getConfig();
        String stringMax = (String) config.get("maxElemForItem");
        if (stringMax != null && stringMax.length() > 0) {
          maxItems = Integer.parseInt(stringMax);
        }
      }
    }
View Full Code Here

        }
        try {
            tagCloudRoot = new Category();
            tagCloudRoot.setCode(this.getTagCloudCategoryRoot());
            Category root = this.getCategoryManager().getRoot();
            ApsProperties titles = new ApsProperties();
            Set<Object> langCodes = root.getTitles().keySet();
            Iterator<Object> iter = langCodes.iterator();
            while (iter.hasNext()) {
                Object langCode = (Object) iter.next();
                titles.put(langCode, "Tag Cloud Root");
            }
            tagCloudRoot.setTitles(titles);
            tagCloudRoot.setParent(root);
            tagCloudRoot.setParentCode(root.getCode());
            this.getCategoryManager().addCategory(tagCloudRoot);
View Full Code Here

    String paramValue = null;
    RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
    if (reqCtx!=null) {
      Widget widget = (com.agiletec.aps.system.services.page.Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
      if (widget!=null) {
        ApsProperties config = widget.getConfig();
        if (null != config) {
          String showletParam = config.getProperty(paramName);
          if (showletParam!=null && showletParam.trim().length()>0) {
            paramValue = showletParam.trim();
          }
        }
      }
View Full Code Here

    }
  }

  protected void addLabelGroups(String key, String defaultValue) throws ApsSystemException {
    try {
      ApsProperties properties = new ApsProperties();
      Lang defaultLang = super.getLangManager().getDefaultLang();
      properties.put(defaultLang.getCode(), defaultValue);
      this.getI18nManager().addLabelGroup(key, properties);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "addLabelGroups");
      throw new RuntimeException("Error adding label groups - key '" + key + "'", t);
    }
View Full Code Here

TOP

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

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.