Examples of XRole


Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

        new RoleRightsTab(this)};
  }

  public final String getTitle(XObject input) {
    if (input instanceof XRole) {
      XRole role = (XRole) input;
      String name = role.getName();
      if (name != null && !name.equals(""))
        return messages.role(name);
    }
    return constants.newRole();
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

    add(createPropertiesPanel());
  }

  public final boolean save(XObject input) {
    if (input instanceof XRole) {
      XRole role = (XRole) input;
      role.setName(name.getValue());
      role.setDescription(description.getValue());
    }
    return true;
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

    return s;
  }
 
  public void set(XObject input) {
    if (input instanceof XRole) {
      XRole role = (XRole) input;
      name.setValue(role.getName());
      description.setValue(translateDescription(role.getDescription()));
      if (role != null && role.getName() != null && (role.getName().equals("ADMIN") ||
        role.getName().equals("EDITOR") ||
        role.getName().equals("VIEWER") ||
        role.getName().equals("POWERUSER") ||
        role.getName().equals("OWNER") ||
        role.getName().equals("CREATOR") ||
        role.getName().equals("PUBLISHER"))) {
        name.setEnabled(false);
        description.setEnabled(false);
      } else {
        name.setEnabled(true);
        description.setEnabled(true);
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

    add(rightsTable);       
  }

  public final boolean save(XObject input) {
    if (input instanceof XRole) {
      XRole role = (XRole) input;
      for(TableItem item : rightsTable.getItems()) {
        boolean selected = false;
        String rightTag = item.getData(RIGHT_DATA);
        Object colVal = item.getValue(0);
        //bug in gxt???
        if(colVal instanceof Radio)
          selected = ((Radio)colVal).getValue();
        else if(colVal instanceof Boolean)
          selected = ((Boolean)colVal).booleanValue();
       
        if(selected)
          role.setPermission(rightTag);
      }     
    }
    return true;
  }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

  public void saveAs(String name, XObject input) {   
  }

  public void set(XObject input) {
    if (input instanceof XRole) {
      XRole role = (XRole) input;
      boolean isAdm = role != null && role.getName() != null && role.getName().equals("ADMIN");
      ((RadioTableColumn) rightsTable.getColumnModel().getColumn(0)).setEnabled(!isAdm);   
     
      String right = role.getPermission();
      if(right == null)
        right = "N";
      for(TableItem item : rightsTable.getItems()) {
        String tag = item.getData(RIGHT_DATA);
        boolean check = right.equals(tag);
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

    case ADD_GROUP_ITEM:
      input = new TreeNode(null, new XGroup());
      editor = grpEditor;
      break;
    case ADD_ROLE_ITEM:
      input = new TreeNode(null, new XRole());
      editor = roleEditor;
      break;
    case ADD_USER_ITEM:
      XUser user = ((Workbench) Registry.get(Workbench.ID)).getUser();
      String sessionId = user.getSessionId();
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

            impossibleMsg = messages.impossibleToDeleteGroup(group.getName());
          } else {
            confirmMsg = messages.deleteGroup(group.getName());
          }
        } else if (type.equals(XRole.TYPE)) {
          XRole role = (XRole) node.getXObject();
          if (role != null && role.getName() != null && (role.getName().equals("ADMIN") ||
            role.getName().equals("EDITOR") ||
            role.getName().equals("VIEWER") ||
            role.getName().equals("OWNER"))) {
            impossibleMsg = messages.impossibleToDeleteRole(role.getName());
          } else {
            confirmMsg = messages.deleteRole(role.getName());
          }
        }
       
        // confirm group deletion:
        if (confirmMsg != null) {
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.client.models.admin.XRole

  public XRole[] getRoles(String sessionId, XUser user) throws SessionExpiredException {
    AdministrationService adminService = ServiceProvider
        .getAdministrationService(getLoggedInUser(sessionId));
    List<XRole> xRoles = new ArrayList<XRole>();
    for(Role role : adminService.getRoles()) {
      XRole xRole = (XRole)XConverter.createX(role);
      xRoles.add(xRole);
    }
    return xRoles.toArray(new XRole[0]);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.