Examples of ViewCollection


Examples of net.sf.archimede.jsf.view.ViewCollection

    }
   
    public String retrieveBaseCollections() {
        Collection rootCollection = CollectionDao.createInstance().getRootCollection();
        if (rootCollection != null) {
            this.selectedCollection = new ViewCollection(rootCollection);
            List baseCollections = this.selectedCollection.getCollections();
            List baseViewCollections = new ArrayList(baseCollections.size());
            for (Iterator it = baseCollections.iterator(); it.hasNext(); ) {
                baseViewCollections.add(new ViewCollection((Collection) it.next()));
            }
            this.collections = new ListDataModel();
            this.collections.setWrappedData(baseViewCollections);
           
            List collectionFolders = rootCollection.getFolders();
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

        this.selectedCollection = (ViewCollection) this.collections.getRowData();
       
        //Get a fresh copy
        String selectCollectionId = this.selectedCollection.getId();
        Collection collection = CollectionDao.createInstance().retrieve(selectCollectionId);
        this.selectedCollection = new ViewCollection(collection);
       
        List collectionCollections = collection.getCollections();
        List collectionViewCollections = new ArrayList(collectionCollections.size());
        for (Iterator it = collectionCollections.iterator(); it.hasNext(); ) {
            collectionViewCollections.add(new ViewCollection((Collection) it.next()));
        }
        this.collections = new ListDataModel();
        this.collections.setWrappedData(collectionViewCollections);
       
       
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

        Collection collection = CollectionDao.createInstance().retrieve(selectCollectionId);
       
        List collectionCollections = collection.getCollections();
        List collectionViewCollections = new ArrayList(collectionCollections.size());
        for (Iterator it = collectionCollections.iterator(); it.hasNext(); ) {
            collectionViewCollections.add(new ViewCollection((Collection) it.next()));
        }
        this.collections = new ListDataModel();
        this.collections.setWrappedData(collectionViewCollections);
       
       
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

        return "";
    }
   
    public String seePermissions() {
        Collection collection = CollectionDao.createInstance().retrieve(this.selectedCollection.getId());
        this.selectedCollection = new ViewCollection(collection);
       
        return "workspace_collection_edition_permissions";
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

    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.jsf.view.ViewCollection

        this.copyRequested = false;
        this.cutRequested = true;
        this.selectedCollections = new HashSet();
        List collectionsList = (List) this.collections.getWrappedData();
        for (Iterator it = collectionsList.iterator(); it.hasNext(); ) {
            ViewCollection currentViewCollection = (ViewCollection) it.next();
            if (currentViewCollection.isSelected()) {
                this.selectedCollections.add(currentViewCollection);
            }
        }
        return "";
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

        this.copyRequested = true;
        this.cutRequested = false;
        this.selectedCollections = new HashSet();
        List collectionsList = (List) this.collections.getWrappedData();
        for (Iterator it = collectionsList.iterator(); it.hasNext(); ) {
            ViewCollection currentViewCollection = (ViewCollection) it.next();
            if (currentViewCollection.isSelected()) {
                this.selectedCollections.add(currentViewCollection);
            }
        }
        return "";
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

            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
            }
            this.selectedCollections = null;
            this.selectedCollection = new ViewCollection(CollectionDao.createInstance().retrieve(this.selectedCollection.getId()));
            this.collections = this.selectedCollection.getCollectionsModel();
        }
        return "";
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

        return "";
    }
    public String remove() throws ObjectLockedException, ObjectExistsException {
        List collectionsList = (List) this.collections.getWrappedData();
        for (Iterator it = collectionsList.iterator(); it.hasNext(); ) {
            ViewCollection currentViewCollection = (ViewCollection) it.next();
            if (currentViewCollection.isSelected()) {
                CollectionDao.createInstance().remove(currentViewCollection.getCollection());
            }
        }
        this.selectedCollection = new ViewCollection(CollectionDao.createInstance().retrieve(this.selectedCollection.getId()));
        this.collections = this.selectedCollection.getCollectionsModel();
        return "";
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ViewCollection

            collection.setName(this.newName);
            collection.setParent(this.selectedCollection.getCollection());
            CollectionDao.createInstance().save(collection);
            this.newName = null;
        }
        this.selectedCollection = new ViewCollection(CollectionDao.createInstance().retrieve(this.selectedCollection.getId()));
        this.collections = this.selectedCollection.getCollectionsModel();
       
        return "";
    }
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.