Examples of StubEntityFactory


Examples of org.apache.jetspeed.security.mapping.stubs.StubEntityFactory

        super.setUp();
        Collection<AttributeDef> attrDefs = new ArrayList<AttributeDef>()
        attrDefs.add(new AttributeDefImpl("fullname"));
        attrDefs.add(new AttributeDefImpl("company"));       
       
        StubEntityFactory stubFactory = new StubEntityFactory();
        stubFactory.setAttributeDefs(attrDefs);
       
        Entity user_jsmith=stubFactory.createEntity("jsmith", "user", new String[]{"John Smith","IBM"});
        Entity user_jdoe=stubFactory.createEntity("jdoe", "user", new String[]{"Jane Doe","Apple"});

        StubEntityDAO userDao = new StubEntityDAO();
        userDao.addEntity(user_jsmith);
        userDao.addEntity(user_jdoe);
       
        Entity role_manager=stubFactory.createEntity("manager", "role", new String[]{"Manager Role",""});
        Entity role_admin=stubFactory.createEntity("admin", "role", new String[]{"Admin Role",""});
        Entity role_random=stubFactory.createEntity("random", "role", new String[]{"Random Role",""});
        Entity role_yetAnother=stubFactory.createEntity("yetAnotherRole", "role", new String[]{"Yet Another Role",""});
       
        StubEntityDAO roleDao = new StubEntityDAO();
        userDao.addEntity(role_manager);
        userDao.addEntity(role_admin);
        userDao.addEntity(role_random);
        userDao.addEntity(role_yetAnother);

       
        Entity group_programmers=stubFactory.createEntity("programmers", "group", new String[]{"Group for Programmers",""});
        Entity group_board=stubFactory.createEntity("boardOfDirectors", "group", new String[]{"Group for the board of directors",""});
        Entity group_random=stubFactory.createEntity("randomGroup", "group", new String[]{"Random Group",""});
        Entity group_yetAnother=stubFactory.createEntity("yetAnotherGroup", "group", new String[]{"Yet Another Group",""});

        StubEntityDAO groupDao = new StubEntityDAO();
        userDao.addEntity(group_programmers);
        userDao.addEntity(group_board);
        userDao.addEntity(group_random);
View Full Code Here

Examples of org.apache.jetspeed.security.mapping.stubs.StubEntityFactory

        super.setUp();
        Collection<AttributeDef> attrDefs = new ArrayList<AttributeDef>()
        attrDefs.add(new AttributeDefImpl("fullname"));
        attrDefs.add(new AttributeDefImpl("company"));       
       
        StubEntityFactory stubFactory = new StubEntityFactory();
        stubFactory.setAttributeDefs(attrDefs);
       
        Entity user_jsmith=stubFactory.createEntity("jsmith", "user", new String[]{"John Smith","IBM"});
        Entity user_jdoe=stubFactory.createEntity("jdoe", "user", new String[]{"Jane Doe","Apple"});

        StubEntityDAO userDao = new StubEntityDAO();
        userDao.addEntity(user_jsmith);
        userDao.addEntity(user_jdoe);
       
        Entity role_manager=stubFactory.createEntity("manager", "role", new String[]{"Manager Role",""});
        Entity role_admin=stubFactory.createEntity("admin", "role", new String[]{"Admin Role",""});
        Entity role_random=stubFactory.createEntity("random", "role", new String[]{"Random Role",""});
        Entity role_yetAnother=stubFactory.createEntity("yetAnotherRole", "role", new String[]{"Yet Another Role",""});
       
        StubEntityDAO roleDao = new StubEntityDAO();
        userDao.addEntity(role_manager);
        userDao.addEntity(role_admin);
        userDao.addEntity(role_random);
        userDao.addEntity(role_yetAnother);

       
        Entity group_programmers=stubFactory.createEntity("programmers", "group", new String[]{"Group for Programmers",""});
        Entity group_board=stubFactory.createEntity("boardOfDirectors", "group", new String[]{"Group for the board of directors",""});
        Entity group_random=stubFactory.createEntity("randomGroup", "group", new String[]{"Random Group",""});
        Entity group_yetAnother=stubFactory.createEntity("yetAnotherGroup", "group", new String[]{"Yet Another Group",""});

        StubEntityDAO groupDao = new StubEntityDAO();
        userDao.addEntity(group_programmers);
        userDao.addEntity(group_board);
        userDao.addEntity(group_random);
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.