Package org.voltdb.compiler.VoltProjectBuilder

Examples of org.voltdb.compiler.VoltProjectBuilder.GroupInfo


        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("HELLOWORLD", "DIALECT");

        GroupInfo gi = new GroupInfo("foo", true, false, true, true, false, false);
        builder.addGroups(new GroupInfo[] { gi } );

        // create 20 users, only the first one has an interesting user/pass
        UserInfo[] ui = new UserInfo[15];
        ui[0] = new UserInfo("ry@nlikesthe", "y@nkees", new String[] { "foo" } );
View Full Code Here


        project.addDefaultSchema();
        project.addDefaultPartitioning();
        project.addDefaultProcedures();

        project.setSecurityEnabled(true);
        GroupInfo groups[] = new GroupInfo[] {
                new GroupInfo("foo", false, false, false, false, false, false),
                new GroupInfo("blah", false, false, false, false, false, false)
        };
        project.addGroups(groups);
        UserInfo users[] = new UserInfo[] {
                new UserInfo("john", "hugg", new String[] {"foo"}),
                new UserInfo("ryan", "betts", new String[] {"foo", "bar"}),
View Full Code Here

                new UserInfo("userWithoutDefaultProcPerm", "password", new String[] {"groupWiThoutDefaultProcPerm"}),
                new UserInfo("userWithDefaultProcReadPerm", "password", new String[] {"groupWiThDefaultProcReadPerm"})
        };
        project.addUsers(users);

        GroupInfo groups[] = new GroupInfo[] {
                new GroupInfo("Group1", false, false, false, false, false, false),
                new GroupInfo("Group2", true, false, false, false, false, false),
                new GroupInfo("Group3", true, false, false, false, false, false),
                new GroupInfo("GroupWithDefaultUserPerm", true, false, false, false, false, true),
                new GroupInfo("GroupWithAllProcPerm", false, false, false, false, false, true),
                new GroupInfo("GroupWithDefaultProcPerm", false, false, false, true, false, false),
                new GroupInfo("GroupWithoutDefaultProcPerm", false, false, false, false, false, false),
                new GroupInfo("GroupWithDefaultProcReadPerm", false, false, false, false, true, false)
        };
        project.addGroups(groups);
        project.setSecurityEnabled(true);

        // export disabled in community
View Full Code Here

        String pathToCatalog = Configuration.getPathToCatalogForTest("updateclasses.jar");
        String pathToDeployment = Configuration.getPathToCatalogForTest("updateclasses.xml");
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("-- Don't care");
        builder.setUseDDLSchema(true);
        GroupInfo groups[] = new GroupInfo[] {
            new GroupInfo("adhoc", true, false, false, false, false, false),
            new GroupInfo("sysproc", false, false, true, false, false, false)
        };
        UserInfo users[] = new UserInfo[] {
            new UserInfo("adhocuser", "adhocuser", new String[] {"adhoc"}),
            new UserInfo("sysuser", "sysuser", new String[] {"sysproc"})
        };
View Full Code Here

    public void testAddGroup() throws IOException {
        String original = compile("base", BASEPROCS);
        Catalog catOriginal = catalogForJar(original);

        GroupInfo gi[] = new GroupInfo[1];
        gi[0] = new GroupInfo("group1", true, true, true, true, true, true);
        String updated = compileWithGroups(false, null, gi, null, "base", BASEPROCS);
        Catalog catUpdated = catalogForJar(updated);

        verifyDiff(catOriginal, catUpdated);
    }
View Full Code Here

    public void testAddGroupAndUser() throws IOException {
        String original = compile("base", BASEPROCS);
        Catalog catOriginal = catalogForJar(original);

        GroupInfo gi[] = new GroupInfo[1];
        gi[0] = new GroupInfo("group1", true, true, true, true, true, false);

        UserInfo ui[] = new UserInfo[1];
        ui[0] = new UserInfo("user1", "password", new String[] {"group1"});

        String updated = compileWithGroups(false, null, gi, ui, "base", BASEPROCS);
View Full Code Here

        verifyDiff(catOriginal, catUpdated);
    }

    public void testModifyUser() throws IOException {
        GroupInfo gi[] = new GroupInfo[1];
        gi[0] = new GroupInfo("group1", true, true, true, true, false, false);

        UserInfo ui[] = new UserInfo[1];
        ui[0] = new UserInfo("user1", "password", new String[] {"group1"});

        String original = compileWithGroups(false, null, gi, ui, "base", BASEPROCS);
        Catalog catOriginal = catalogForJar(original);

        GroupInfo gi2[] = new GroupInfo[1];
        gi2[0] = new GroupInfo("group2", true, true, true, true, true, true);
        // change a user.
        ui[0] = new UserInfo("user1", "drowssap", new String[] {"group2"});
        String updated = compileWithGroups(false, null, gi2, ui, "base", BASEPROCS);
        Catalog catUpdated = catalogForJar(updated);
View Full Code Here

        verifyDiff(catOriginal, catUpdated);
    }

    public void testDeleteUser() throws IOException {
        GroupInfo gi[] = new GroupInfo[1];
        gi[0] = new GroupInfo("group1", true, true, true, true, false, false);

        UserInfo ui[] = new UserInfo[1];
        ui[0] = new UserInfo("user1", "password", new String[] {"group1"});

        String original = compileWithGroups(false, null, gi, ui, "base", BASEPROCS);
View Full Code Here

        verifyDiff(catOriginal, catUpdated);
    }

    public void testDeleteGroupAndUser() throws IOException {
        GroupInfo gi[] = new GroupInfo[1];
        gi[0] = new GroupInfo("group1", true, true, true, true, false, false);

        UserInfo ui[] = new UserInfo[1];
        ui[0] = new UserInfo("user1", "password", new String[] {"group1"});

        String original = compileWithGroups(false, null, gi, ui, "base", BASEPROCS);
View Full Code Here

        verifyDiff(catOriginal, catUpdated);
    }

    public void testChangeUsersAssignedGroups() throws IOException {
        GroupInfo gi[] = new GroupInfo[2];
        gi[0] = new GroupInfo("group1", true, true, true, true, false, false);
        gi[1] = new GroupInfo("group2", true, true, true, true, false, true);

        UserInfo ui[] = new UserInfo[2];
        ui[0] = new UserInfo("user1", "password", new String[] {"group1"});
        ui[1] = new UserInfo("user2", "password", new String[] {"group2"});
View Full Code Here

TOP

Related Classes of org.voltdb.compiler.VoltProjectBuilder.GroupInfo

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.