Examples of Groups


Examples of cn.com.annotations.Groups

//            };
//        }
        this.title = (Title) this.clazz.getAnnotation(Title.class);
        this.template = (Template) this.clazz.getAnnotation(Template.class);

        Groups groupsAnnotation = (Groups) this.clazz.getAnnotation(Groups.class);
        if (groupsAnnotation != null) {
            // 保存显示定义的组
            groups.addAll(Arrays.asList(groupsAnnotation.groups()));
        }
        // 保存默认组
        groups.add(getDefaultGroup());

        // 设定当前组
View Full Code Here

Examples of com.cloudera.lib.service.Groups

        if (!path.value().equals("/")) {
          throw new UnsupportedOperationException(
            MessageFormat.format("Invalid path for {0}={1}, must be '/'",
                                 GetOpParam.NAME, GetOpParam.Values.INSTRUMENTATION));
        }
        Groups groups = HoopServer.get().get(Groups.class);
        List<String> userGroups = groups.getGroups(user.getName());
        if (!userGroups.contains(HoopServer.get().getAdminGroup())) {
          throw new AccessControlException("User not in Hoop admin group");
        }
        Instrumentation instrumentation = HoopServer.get().get(Instrumentation.class);
        Map snapshot = instrumentation.getSnapshot();
View Full Code Here

Examples of com.cloudera.lib.service.Groups

    String dir = getTestDir().getAbsolutePath();
    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    Groups groups = server.get(Groups.class);
    List<String> g = groups.getGroups(System.getProperty("user.name"));
    server.destroy();
    return g.get(0);
  }
View Full Code Here

Examples of com.cloudera.lib.service.Groups

                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    String group = groups.getGroups(user).get(0);
    acl.validate(user, "root", "bar," + group);
    server.destroy();
  }
View Full Code Here

Examples of com.cloudera.lib.service.Groups

                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    acl.validate(user, "root", "nobody");
    server.destroy();
  }
View Full Code Here

Examples of com.cloudera.lib.service.Groups

                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    acl.validate(user, "root", null);
    server.destroy();
  }
View Full Code Here

Examples of com.cloudera.lib.service.Groups

    String dir = getTestDir().getAbsolutePath();
    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    Groups groups = server.get(Groups.class);
    Assert.assertNotNull(groups);
    List<String> g = groups.getGroups(System.getProperty("user.name"));
    Assert.assertNotSame(g.size(), 0);
    server.destroy();
  }
View Full Code Here

Examples of com.esri.gpt.framework.security.principal.Groups

* @throws SQLException if a database communication exception occurs
*/
private void removeUserFromGroups(User user)
  throws CredentialPolicyException, IdentityException, NamingException, SQLException {
  try {
    Groups grps = user.getGroups();
    for(Group g : grps.values()){
      removeUserFromGroup(user, g.getDistinguishedName());
    }
 
  } finally {
  }
View Full Code Here

Examples of com.narirelays.ems.persistence.orm.Groups

    if(name==null||name=="")
    {
      result.setFailed(GROUP_NAME_IS_NULL);
      return result;
    }
    Groups group = new Groups();
    try{
      BeanUtils.populate(group, properties);
      group.setId(MyUUIDGen.getUUID());
      groupsDAO.merge(group);
      result.setSucceed(group.getId());
    }
    catch(Exception e)
    {
      e.printStackTrace();
      result.setFailed();
View Full Code Here

Examples of com.narirelays.ems.persistence.orm.Groups

    if(id==null)
    {
      result.setFailed(GROUP_ID_IS_NULL);
      return result;
    }
    Groups group = groupsDAO.findById(id);
    if(group==null)
    {
      result.setFailed(GROUP_NOT_EXIST);
      return result;
    }
    try{
      BeanUtils.populate(group, properties);
      group.setId(id);
      groupsDAO.merge(group);
      result.setSucceed();
    }
    catch(Exception e)
    {
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.