Package net.sf.archimede.jsf.view

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


        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

        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

        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

    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

        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

        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

            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

        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

            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

Related Classes of net.sf.archimede.jsf.view.ViewCollection

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.