Package net.sf.archimede.jsf.view

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


                    data.close();
                }
            }
           
           
            this.selectedFolder = new ViewFolder(FolderDao.createInstance().retrieve(this.selectedFolder.getId()));

            this.file = null;
           
            FolderDao folderDao = FolderDao.createInstance();
            Folder folder = folderDao.retrieve(this.selectedFolder.getId());
            this.selectedFolder = new ViewFolder(folder);
           
            StoredFileBean storedFileBean = (StoredFileBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(StoredFileBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());    
            storedFileBean.setStoredFiles(this.selectedFolder.getStoredFilesModel());
        }
        return "";
View Full Code Here


        collectionBean.setSelectedCollection(new ViewCollection(collection));
       
        List collectionFolders = collection.getFolders();
        List collectionViewFolders = new ArrayList(collectionFolders.size());
        for (Iterator it = collectionFolders.iterator(); it.hasNext(); ) {
            collectionViewFolders.add(new ViewFolder((Folder) it.next()));
        }
       
        DataModel foldersDataModel = new ListDataModel();
        foldersDataModel.setWrappedData(collectionViewFolders);
        this.folders = foldersDataModel;
View Full Code Here

        facesContext.responseComplete();
    }
   
    public String seePermissions() {
        Folder folder = FolderDao.createInstance().retrieve(this.selectedFolder.getId());
        this.selectedFolder = new ViewFolder(folder);
       
        return "workspace_folder_edition_permissions";
    }
View Full Code Here

    public String open() {
        this.selectedFolder = (ViewFolder) this.folders.getRowData();
        //Refresh the value
        FolderDao folderDao = FolderDao.createInstance();
        Folder folder = folderDao.retrieve(this.selectedFolder.getId());
        this.selectedFolder = new ViewFolder(folder);
        this.metadataTreeModel = getMetadataTreeNode();
        this.versionsTreeModel = getVersionsTreeNode();
       
        return "workspace_folder_edition";
    }
View Full Code Here

        this.selectedFolder = (ViewFolder) this.folders.getRowData();
       
        //Get a fresh copy
        String selectFolderId = this.selectedFolder.getId();
        Folder folder = FolderDao.createInstance().retrieve(selectFolderId);
        this.selectedFolder = new ViewFolder(folder);
       
        List folderStoredFiles = folder.getStoredFiles();
        List folderViewStoredFiles = new ArrayList(folderStoredFiles.size());
        for (Iterator it = folderStoredFiles.iterator(); it.hasNext(); ) {
            folderViewStoredFiles.add(new ViewStoredFile((StoredFile) it.next()));
View Full Code Here

        this.copyRequested = false;
        this.cutRequested = true;
        this.selectedFolders = new HashSet();
        List foldersList = (List) this.folders.getWrappedData();
        for (Iterator it = foldersList.iterator(); it.hasNext(); ) {
            ViewFolder currentViewFolder = (ViewFolder) it.next();
            if (currentViewFolder.isSelected()) {
                this.selectedFolders.add(currentViewFolder);
            }
        }
        return "";
    }
View Full Code Here

        this.copyRequested = true;
        this.cutRequested = false;
        this.selectedFolders = new HashSet();
        List foldersList = (List) this.folders.getWrappedData();
        for (Iterator it = foldersList.iterator(); it.hasNext(); ) {
            ViewFolder currentViewFolder = (ViewFolder) it.next();
            if (currentViewFolder.isSelected()) {
                this.selectedFolders.add(currentViewFolder);
            }
        }
        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.selectedFolders.iterator(); it.hasNext(); ){
                    ViewFolder viewFolder = (ViewFolder) it.next();
                    Folder cutFolder = viewFolder.getFolder();
                    folderDao.cutTo(cutFolder, destinationCollection);
                    this.cutRequested = false;
                }               
            } else if (this.copyRequested) {
                for (Iterator it = this.selectedFolders.iterator(); it.hasNext(); ){
                    ViewFolder viewFolder = (ViewFolder) it.next();
                    Folder copiedFolder = viewFolder.getFolder();
                    folderDao.copyTo(copiedFolder, destinationCollection);
                    this.copyRequested = false;
               
            } else {
                //All false: nothing to do
View Full Code Here

        return "";
    }
    public String remove() throws ObjectLockedException, ObjectExistsException {
        List foldersList = (List) this.folders.getWrappedData();
        for (Iterator it = foldersList.iterator(); it.hasNext(); ) {
            ViewFolder currentViewFolder = (ViewFolder) it.next();
            if (currentViewFolder.isSelected()) {
                FolderDao.createInstance().remove(currentViewFolder.getFolder());
            }
        }
        CollectionBean collectionBean = (CollectionBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(CollectionBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());    
        Collection destinationCollection = collectionBean.getSelectedCollection();
        ViewCollection viewDestinationCollection = new ViewCollection(CollectionDao.createInstance().retrieve(destinationCollection.getId()));
View Full Code Here

        String username = visitBean.getCredentials().getUsername();
        User user = UserDao.createInstance().retrieve(username);
        List ownerFolders = FolderDao.createInstance().ownerList(user);
        List ownerViewFolders = new ArrayList(ownerFolders.size());
        for (Iterator it = ownerFolders.iterator(); it.hasNext(); ) {
            ownerViewFolders.add(new ViewFolder((Folder) it.next()));
        }
        this.folders = new ListDataModel();
        this.folders.setWrappedData(ownerViewFolders);
       
        return "workspace_folder_owner";
View Full Code Here

TOP

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

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.