Package com.agiletec.plugins.jpmyportalplus.aps.system.services.config

Examples of com.agiletec.plugins.jpmyportalplus.aps.system.services.config.IMyPortalConfigManager


  @Override
  public boolean needsDecoration(Widget showlet, RequestContext reqCtx) {
    try {
      IPage page = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      IMyPortalConfigManager myportalConfigManager =
          (IMyPortalConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.MYPORTAL_CONFIG_MANAGER, reqCtx.getRequest());
      Set<String> allowedShowlet = myportalConfigManager.getConfig().getAllowedShowlets();
      MyPortalPageModel model = (MyPortalPageModel) page.getModel();
      Frame currentFrameObject = model.getFrameConfigs()[currentFrame];
      return (!currentFrameObject.isLocked() && allowedShowlet.contains(showlet.getType().getCode()));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "needsDecoration", "Error checking widget decorators");
View Full Code Here


      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);
      }
View Full Code Here

*/
public class CheckValidWidgetTag extends TagSupport {

  @Override
  public int doStartTag() throws JspException {
    IMyPortalConfigManager myPortalConfigManager = (IMyPortalConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.MYPORTAL_CONFIG_MANAGER, pageContext);
    HttpServletRequest req =  (HttpServletRequest) this.pageContext.getRequest();
    try {
      boolean check = false;
      RequestContext reqCtx = (RequestContext) req.getAttribute(RequestContext.REQCTX);
      Widget currentShowlet = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
      if (null != currentShowlet && null != currentShowlet.getType()) {
        String typeCode = currentShowlet.getType().getCode();
        Set<String> showletTypeCodes = myPortalConfigManager.getConfig().getAllowedShowlets();
        check = showletTypeCodes.contains(typeCode);
      }
      if (null != this.getVar()) {
        this.pageContext.setAttribute(this.getVar(), new Boolean(check));
      }
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpmyportalplus.aps.system.services.config.IMyPortalConfigManager

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.