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

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


        Map<String, WidgetType> map = new HashMap<String, WidgetType>();
        UserDetails currentUser = (UserDetails) this.pageContext.getSession().getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
        try {
            List<WidgetType> list = pageUserConfigManager.getCustomizableWidgets(currentUser);
            for (int i = 0; i < list.size(); i++) {
                WidgetType type = list.get(i);
                map.put(type.getCode(), type);
            }
        } catch (Throwable t) {
            String message = "Error extracting customizable Showlets by user '" + currentUser.getUsername() + "'";
            ApsSystemUtils.logThrowable(t, this, "getCustomizableShowlets", message);
            throw new ApsSystemException(message, t);
View Full Code Here


  protected void addNewWidgetUpdateInfo(List<String> showletsToAdd, int framePos, boolean frameToFlow) {
    WidgetUpdateInfoBean infoBean = null;
    Widget showletToInsert = null;
    String typeCode = showletsToAdd.get(0);
    WidgetType type = this.getWidgetTypeManager().getWidgetType(typeCode);
    if (null != type) {
      showletsToAdd.remove(typeCode);
      showletToInsert = new Widget();
      showletToInsert.setType(type);
    }
View Full Code Here

  public PageUserConfigBean getUserConfig(UserDetails user) throws ApsSystemException {
    PageUserConfigBean pageUserBean = null;
    try {
      List<WidgetType> customizables = this.getMyPortalConfigManager().getCustomizableShowlets();
      for (int i = 0; i < customizables.size(); i++) {
        WidgetType type = customizables.get(i);
        String mainGroup = type.getMainGroup();
        if (null != mainGroup
            && !mainGroup.equals(Group.FREE_GROUP_NAME)
            && !this.getAuthorizationManager().isAuthOnGroup(user, mainGroup)) {
          this.getPageUserConfigDAO().removeUnauthorizedShowlet(user.getUsername(), type.getCode());
        }
      }
      pageUserBean = this.getPageUserConfigDAO().getUserConfig(user.getUsername());
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getUserConfig");
View Full Code Here

    List<WidgetType> customizableShowletsForUser = new ArrayList<WidgetType>();
    if (null == user) return customizableShowletsForUser;
    try {
      List<WidgetType> customizableShowlets = this.getMyPortalConfigManager().getCustomizableShowlets();
      for (int i = 0; i < customizableShowlets.size(); i++) {
        WidgetType type = customizableShowlets.get(i);
        String mainGroup = type.getMainGroup();
        if (null == mainGroup
            || mainGroup.equals(Group.FREE_GROUP_NAME)
            || this.getAuthorizationManager().isAuthOnGroup(user, mainGroup)) {
          customizableShowletsForUser.add(type);
        }
View Full Code Here

    }
    return SUCCESS;
  }
 
  private boolean isCustomizable() {
    WidgetType type = this.getWidgetTypeManager().getWidgetType(this.getWidgetTypeCode());
    if (null == type) return false;
    List<WidgetTypeParameter> typeParameters = type.getTypeParameters();
    if (!type.isUserType() && !type.isLogic() && (null != typeParameters && typeParameters.size() > 0)) return false;
    if (type.getCode().equals(this.getMyPortalConfigManager().getVoidShowletCode())) return false;
    return true;
  }
View Full Code Here

  @Override
  public String addWidget() {
    try {
      String widgetCode = this.getWidgetCode();
      WidgetType type = this.getWidgetTypeManager().getWidgetType(widgetCode);
      if (this.isWidgetAllowed(type)) {
        this.getWidgetTypeCodes().add(widgetCode);
      } else {
        this.addFieldError("showletCode", this.getText("Errors.jpmyportalConfig.WidgetType.notValid", new String[] { widgetCode }));
        return INPUT;
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.