Package org.entando.entando.aps.system.services.widgettype

Examples of org.entando.entando.aps.system.services.widgettype.WidgetType


      cacheManager.putInCache(JacmsSystemConstants.CONTENT_AUTH_INFO_CACHE_PREFIX + contentId, authInfo);
      this.setUserOnSession("admin");
      Widget widget = new Widget();
            IWidgetTypeManager widgetTypeMan =
              (IWidgetTypeManager) this.getService(SystemConstants.WIDGET_TYPE_MANAGER);
            WidgetType WidgetType = widgetTypeMan.getWidgetType("content_feedback_viewer");
            widget.setType(WidgetType);
            ApsProperties prop = new ApsProperties();
            prop.put("contentId", contentId);
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_ACTIVE, "true");
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_MODERATED, "false");
View Full Code Here


      cacheManager.putInCache(JacmsSystemConstants.CONTENT_AUTH_INFO_CACHE_PREFIX + contentId, authInfo);
      this.setUserOnSession("admin");
      Widget showlet = new Widget();
            IWidgetTypeManager showletTypeMan =
              (IWidgetTypeManager) this.getService(SystemConstants.WIDGET_TYPE_MANAGER);
            WidgetType WidgetType = showletTypeMan.getWidgetType("content_feedback_viewer");
            showlet.setType(WidgetType);
            ApsProperties prop = new ApsProperties();
            prop.put("contentId", contentId);
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_ACTIVE, "true");
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_MODERATED, "false");
View Full Code Here

      this.setUserOnSession("admin");
      this._contentManager.loadContent(contentId, true);
      Widget showlet = new Widget();
            IWidgetTypeManager showletTypeMan =
              (IWidgetTypeManager) this.getService(SystemConstants.WIDGET_TYPE_MANAGER);
            WidgetType WidgetType = showletTypeMan.getWidgetType("content_feedback_viewer");
            showlet.setType(WidgetType);
            ApsProperties prop = new ApsProperties();
            prop.put("contentId", contentId);
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_ACTIVE, "true");
            prop.put(ContentFeedbackWidgetAction.WIDGET_PARAM_COMMENT_MODERATED, "false");
View Full Code Here

        Widget[] showlets = targetPage.getWidgets();
        if (showlets.length>=frameId) {
          Widget targetShowlet = targetPage.getWidgets()[frameId];
          if (null != targetShowlet) {
            reqCtx.addExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET, targetShowlet);
            WidgetType WidgetType = targetShowlet.getType();
            if (WidgetType.isLogic()) {
              WidgetType = WidgetType.getParentType();
            }
            String pluginCode = WidgetType.getPluginCode();
            boolean isPluginShowlet = (null != pluginCode && pluginCode.trim().length()>0);
            StringBuffer jspPath = new StringBuffer("/WEB-INF/");
            if (isPluginShowlet) {
              jspPath.append("plugins/").append(pluginCode.trim()).append("/");
            }
            jspPath.append(ExecWidgetTag.WIDGET_LOCATION).append(WidgetType.getCode()).append(".jsp");

            this.pageContext.include(jspPath.toString());
          }
        }
      }
View Full Code Here

        if (frames[i].isLocked()) continue;
        JSONObject frame = (JSONObject) positions.get(String.valueOf(i));
        if (null == frame) continue;
        Object showletCode = frame.get("code");
        if (null == showletCode) continue;
        WidgetType type = showletTypeManager.getWidgetType(showletCode.toString());
        if (null == type) continue;
        Widget showlet = null;
        if (showletCode.equals(voidShowletCode) || allowedShowlets.contains(showletCode) || this.isViewerType(type)) {
          showlet = new Widget();
          showlet.setType(type);
View Full Code Here

      conn = this.getConnection();
      stat = conn.prepareStatement(GET_CONFIGURED_SHOWLET_CODE);
      res = stat.executeQuery();
      while (res.next()) {
        String currentCode = res.getString(1);
        WidgetType currentConfiguredShowlet = this.getWidgetTypeManager().getWidgetType(currentCode);
        if (null == currentConfiguredShowlet) {
          ApsSystemUtils.getLogger().info(JpmyportalplusSystemConstants.MYPORTALPLUS_CONFIG_ITEM + ": deleting unknown showlet '"+currentCode+"' from the configuration bean");
          this.purgeConfigurationFromInvalidShowlets(conn, currentCode);
        } else {
          if (!allowedShowletCodes.contains(currentCode) && !currentCode.equals(voidShowletCode)) {
View Full Code Here

    Set<String> codes = new HashSet<String>();
    if (null == allowedShowlets) {
      return codes;
    }
    for (int i = 0; i < allowedShowlets.size(); i++) {
      WidgetType type = allowedShowlets.get(i);
      if (null != type) {
        codes.add(type.getCode());
      }
    }
    return codes;
  }
View Full Code Here

   * @return a new object with the given code and configuration
   * @throws ApsSystemException if the given code is unknown or faulting XML configuration
   */
  private Widget createShowletFromRecord(String widgetcode, String config) throws ApsSystemException {
    Widget newShowlet = new Widget();
    WidgetType inheritedType = this.getWidgetTypeManager().getWidgetType(widgetcode);
    newShowlet.setType(inheritedType);
    ApsProperties properties = null;
    newShowlet.setConfig(properties);
    return newShowlet;
  }
View Full Code Here

    if (null == propertyValue || !propertyValue.equals("swappable")) {
      return super.getPropertyValue(masterObject, propertyValue);
    }
    Object value = null;
    try {
      WidgetType type = (WidgetType) masterObject;
      IMyPortalConfigManager myPortalConfigManager = (IMyPortalConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.MYPORTAL_CONFIG_MANAGER, this.pageContext);
      if (this.isCustomizable(myPortalConfigManager, type)) {
        Set<String> swappables = myPortalConfigManager.getConfig().getAllowedShowlets();
        boolean swappable = (null != swappables && swappables.contains(type.getCode()));
        value = (swappable) ? new Integer(1) : new Integer(0);
      } else {
        value = new Integer(-1);
      }
    } catch (Throwable t) {
View Full Code Here

                    }
                }
            }
            for (int i = 0; i < allowedShowlets.size(); i++) {
                String code = allowedShowlets.get(i);
                WidgetType type = customizableShowlets.get(code);
                WidgetCheckInfo info = new WidgetCheckInfo(type, false, currentLang);
                checkInfos.add(info);
            }
            BeanComparator comparator = new BeanComparator("title");
            Collections.sort(checkInfos, comparator);
View Full Code Here

TOP

Related Classes of org.entando.entando.aps.system.services.widgettype.WidgetType

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.