Examples of CollectionDao


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

        FolderBean.BEAN_REF).getValue(
        FacesContext.getCurrentInstance());
   
    TreeNode treeNode = this.treeModel.getNode();
    String identifier = treeNode.getIdentifier();
    CollectionDao collectionDao = CollectionDao.createInstance();
    Collection collection = collectionDao.retrieve(identifier);
    List allViewFolders = new ArrayList();
    List elem = populateAllViewFolders(collection,
        allViewFolders);
    ListDataModel ldm = new ListDataModel();
    ldm.setWrappedData(elem);
View Full Code Here

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

    public void setSelectedCollection(ViewCollection selectedCollection1) {
        this.selectedCollection = selectedCollection1;
    }
   
    public String update() {
        CollectionDao collectionDao = CollectionDao.createInstance();
        try {
            collectionDao.update(this.selectedCollection.getCollection());
        } catch (ObjectLockedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ObjectExistsException e) {
            // TODO Auto-generated catch block
View Full Code Here

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

    }
   
    public String open() {
        this.selectedCollection = (ViewCollection) this.collections.getRowData();
        //Refresh the value
        CollectionDao collectionDao = CollectionDao.createInstance();
        Collection collection = collectionDao.retrieve(this.selectedCollection.getId());
        this.selectedCollection = new ViewCollection(collection);
       
        return "workspace_collection_edition";
    }
View Full Code Here

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

            }
        }
        return "";
    }
    public String paste() throws ObjectLockedException, ObjectExistsException {
        CollectionDao collectionDao = CollectionDao.createInstance();
        Collection destinationCollection = this.selectedCollection.getCollection();
        if (this.selectedCollections != null) {
            if (this.cutRequested && this.copyRequested) {
                throw new IllegalStateException("The object cannot request cut and copy operations all at once.");
            }
            if (this.cutRequested) {
                for (Iterator it = this.selectedCollections.iterator(); it.hasNext(); ){
                    ViewCollection viewCollection = (ViewCollection) it.next();
                    Collection cutCollection = viewCollection.getCollection();
                    collectionDao.cutTo(cutCollection, destinationCollection);
                    this.cutRequested = false;
                }               
            } else if (this.copyRequested) {
                for (Iterator it = this.selectedCollections.iterator(); it.hasNext(); ){
                    ViewCollection viewCollection = (ViewCollection) it.next();
                    Collection copiedCollection = viewCollection.getCollection();
                    collectionDao.copyTo(copiedCollection, destinationCollection);
                    this.copyRequested = false;
               
            } else {
                //All false: nothing to do
            }
View Full Code Here

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
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.