Package org.exoplatform.portal.config.UserACL

Examples of org.exoplatform.portal.config.UserACL.Permission


        uiPopup.setUIComponent(uiMembershipSelector);
        uiMembershipSelector.setId("PermissionSelector");
        uiMembershipSelector.getChild(UITree.class).setId("TreePermissionSelector");
        uiMembershipSelector.getChild(UIBreadcumbs.class).setId("BreadcumbsPermissionSelector");

        permission_ = new Permission();
    }
View Full Code Here


    public UIPermissionSelector setValue(String exp) {
        // TODO: Tung.Pham modified
        // ---------------------
        // permission_.setPermissionExpression(exp);
        permission_ = new Permission();
        permission_.setPermissionExpression(exp);
        // ---------------------
        return this;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private boolean existsPermission(List<?> list, Permission permission) {
        for (Object ele : list) {
            Permission per = (Permission) ele;
            if (per.getExpression().equals(permission.getExpression())) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        }
        UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
        List<Object> values = uiIterator.getPageList().getAll();
        String[] expPermissions = new String[values.size()];
        for (int i = 0; i < values.size(); i++) {
            Permission permission = (Permission) values.get(i);
            expPermissions[i] = permission.getExpression();
        }
        return expPermissions;
    }
View Full Code Here

                break;
            }
            if (exp.trim().length() < 1) {
                continue;
            }
            Permission permission = new Permission();
            permission.setPermissionExpression(exp);
            if (existsPermission(list, permission)) {
                continue;
            }
            list.add(permission);
        }
View Full Code Here

    public void removePermission(String exp) throws Exception {
        List<Object> list = new ArrayList<Object>();
        UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
        list.addAll(uiIterator.getPageList().getAll());
        for (Object ele : list) {
            Permission permission = (Permission) ele;
            if (permission.getExpression().equals(exp)) {
                list.remove(ele);
                break;
            }
        }
        uiIterator.setPageList(new SerializablePageList(Permission.class, list, 10));
View Full Code Here

    @SuppressWarnings("unchecked")
    public void setMembership(String groupId, String membershipType) throws Exception {
        if (groupId.trim().length() < 1 || membershipType.trim().length() < 1) {
            return;
        }
        Permission permission = new Permission();
        permission.setExpression(membershipType + ":" + groupId);
        permission.setGroupId(groupId);
        permission.setMembership(membershipType);
        List<Object> list = new ArrayList<Object>();
        UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
        list.addAll(uiIterator.getPageList().getAll());
        if (existsPermission(list, permission)) {
            return;
View Full Code Here

      uiPopup.setUIComponent(uiMembershipSelector);
      uiMembershipSelector.setId("PermissionSelector");
      uiMembershipSelector.getChild(UITree.class).setId("TreePermissionSelector");
      uiMembershipSelector.getChild(UIBreadcumbs.class).setId("BreadcumbsPermissionSelector");

      permission_ = new Permission();
   }
View Full Code Here

   public UIPermissionSelector setValue(String exp)
   {
      //TODO: Tung.Pham modified
      //---------------------
      //permission_.setPermissionExpression(exp);
      permission_ = new Permission();
      permission_.setPermissionExpression(exp);
      //---------------------
      return this;
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   private boolean existsPermission(List<?> list, Permission permission) throws Exception
   {
      for (Object ele : list)
      {
         Permission per = (Permission)ele;
         if (per.getExpression().equals(permission.getExpression()))
         {
            return true;
         }
      }
      return false;
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.UserACL.Permission

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.