Package net.sf.archimede.model.collection

Examples of net.sf.archimede.model.collection.CollectionDao


            User user = new UserImpl();
            user.setUsername("user");
            user.setPassword("user");
            UserDao.createInstance().save(user);
           
            CollectionDao collectionDao = CollectionDao.createInstance();
            Collection rootCollection = new CollectionImpl();
            rootCollection.setName(CollectionDao.ROOT_COLLECTION);
            rootCollection.setDescription("Access point");
            //Read
            {
                List readUsers = new ArrayList();
                readUsers.add(anonymous);
                readUsers.add(admin);
                rootCollection.setReadUsers(readUsers);
            }
            {
                List writeUsers = new ArrayList();
                writeUsers.add(admin);
                rootCollection.setWriteUsers(writeUsers);
            }
            {
                List removeUsers = new ArrayList();
                removeUsers.add(admin);
                rootCollection.setRemoveUsers(removeUsers);
            }
            {
                List ownerUsers = new ArrayList();
                ownerUsers.add(admin);
                rootCollection.setOwnerUsers(ownerUsers);
            }
           
            collectionDao.save(rootCollection);
           
            dbUtil.commitTransaction();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

TOP

Related Classes of net.sf.archimede.model.collection.CollectionDao

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.