Package xregistry.impl

Examples of xregistry.impl.XregistryImpl


public class UserAndGroupTest extends AbstractXregistryTestCase {

   
    public void testAddUser() throws Exception{
        GlobalContext globalContext = new GlobalContext(true);
        XregistryImpl registry = new XregistryImpl(globalContext);
       
        String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        registry.createGroup(user, "group1", "group1");
        registry.createGroup(user, "group2", "group1");
        registry.createUser(user, "user1", "User1");
        registry.createUser(user, "user2", "User1");
        registry.createUser(user, "user3", "User1");
       
        registry.addUsertoGroup(user, "group1", "user1");
        registry.addUsertoGroup(user, "group1", "user2");
        registry.addUsertoGroup(user, "group2", "user3");
//       
        //registry.addAGroupToGroup(user, "group1", "group2");
       
        String[] data = registry.listGroups(user);
        TestUtils.testCantainment(data, "group1");
        TestUtils.testCantainment(data, "group2");
       
        data = registry.listGroupsGivenAUser(user, "user1");
        TestUtils.testCantainment(data, "group1");
       
//        data = registry.listUsersGivenAGroup(user, "group1");
//        TestUtils.testCantainment(data, "user1");
//        TestUtils.testCantainment(data, "user2");
//       
//       
//        registry.removeUserFromGroup(user, "group1", "user1");
//        data = registry.listUsersGivenAGroup(user, "group1");
//        TestUtils.testCantainment(data, "user2");
       
       
        registry.deleteGroup(user, "group1");
        data = registry.listGroups(user);
        TestUtils.printList(data);
       
        registry.deleteGroup(user, "group2");
        registry.deleteUser(user, "user1");
        registry.deleteUser(user, "user2");
        registry.deleteUser(user, "user3");
       
       
       
//        String groupName = "extreme";
//       
View Full Code Here


public class AddRemoveFilesTest extends TestCase{
   
    public void testAddRemoveAllDesc() throws Exception{
        GlobalContext globalContext = new GlobalContext(false);
        XregistryImpl mySqlRegistry = new XregistryImpl(globalContext);
//       
        //String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        String user = "/O=LEAD Project/OU=Indiana University Extreme Lab/OU=linbox1.extreme.indiana.edu/OU=extreme.indiana.edu/CN=sshirasu/Email=sshirasu@cs.indiana.edu";
       
        List<DocData> list = mySqlRegistry.findServiceDesc(Utils.canonicalizeDN(user), "");
        for(DocData dataitem:list){
            System.out.println(dataitem.name);
        }
       
       
View Full Code Here

TOP

Related Classes of xregistry.impl.XregistryImpl

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.