Package net.sf.archimede.jsf.view

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


       
        this.selectedStoredFile = (ViewStoredFile) this.storedFiles.getRowData();
        //Refresh the value
        StoredFileDao storedFileDao = StoredFileDao.createInstance();
        StoredFile storedFile = storedFileDao.retrieve(this.selectedStoredFile.getId());
        this.selectedStoredFile = new ViewStoredFile(storedFile);
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();     
        
        //text/plain, vnd.ms-excel, application/x-download, ...
View Full Code Here


        return "";
    }
   
    public String seePermissions() {
        StoredFile storedFile = StoredFileDao.createInstance().retrieve(this.selectedStoredFile.getId());
        this.selectedStoredFile = new ViewStoredFile(storedFile);
       
        return "workspace_storedFile_edition_permissions";
    }
View Full Code Here

    public String open() {
        this.selectedStoredFile = (ViewStoredFile) this.storedFiles.getRowData();
        //Refresh the value
        StoredFileDao storedFileDao = StoredFileDao.createInstance();
        StoredFile storedFile = storedFileDao.retrieve(this.selectedStoredFile.getId());
        this.selectedStoredFile = new ViewStoredFile(storedFile);
       
        return "workspace_storedFile_edition";
    }
View Full Code Here

        this.copyRequested = false;
        this.cutRequested = true;
        this.selectedStoredFiles = new HashSet();
        List storedFilesList = (List) this.storedFiles.getWrappedData();
        for (Iterator it = storedFilesList.iterator(); it.hasNext(); ) {
            ViewStoredFile currentViewStoredFile = (ViewStoredFile) it.next();
            if (currentViewStoredFile.isSelected()) {
                this.selectedStoredFiles.add(currentViewStoredFile);
            }
        }
        return "";
    }
View Full Code Here

        this.copyRequested = true;
        this.cutRequested = false;
        this.selectedStoredFiles = new HashSet();
        List storedFilesList = (List) this.storedFiles.getWrappedData();
        for (Iterator it = storedFilesList.iterator(); it.hasNext(); ) {
            ViewStoredFile currentViewStoredFile = (ViewStoredFile) it.next();
            if (currentViewStoredFile.isSelected()) {
                this.selectedStoredFiles.add(currentViewStoredFile);
            }
        }
        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.selectedStoredFiles.iterator(); it.hasNext(); ){
                    ViewStoredFile viewStoredFile = (ViewStoredFile) it.next();
                    StoredFile cutStoredFile = viewStoredFile.getStoredFile();
                    storedFileDao.cutTo(cutStoredFile, destinationFolder);
                    this.cutRequested = false;
                }               
            } else if (this.copyRequested) {
                for (Iterator it = this.selectedStoredFiles.iterator(); it.hasNext(); ){
                    ViewStoredFile viewStoredFile = (ViewStoredFile) it.next();
                    StoredFile cutStoredFile = viewStoredFile.getStoredFile();
                    storedFileDao.copyTo(cutStoredFile, destinationFolder);
                    this.copyRequested = false;
               
            } else {
                //All false: nothing to do
View Full Code Here

        return "";
    }
    public String remove() throws ObjectLockedException, ObjectExistsException {
        List storedFilesList = (List) this.storedFiles.getWrappedData();
        for (Iterator it = storedFilesList.iterator(); it.hasNext(); ) {
            ViewStoredFile currentViewStoredFile = (ViewStoredFile) it.next();
            if (currentViewStoredFile.isSelected()) {
                StoredFileDao.createInstance().remove(currentViewStoredFile.getStoredFile());
            }
        }
        FolderBean folderBean = (FolderBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(FolderBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());    
        Folder destinationFolder = folderBean.getSelectedFolder();
        ViewFolder viewDestinationFolder = new ViewFolder(FolderDao.createInstance().retrieve(destinationFolder.getId()));
View Full Code Here

            StoredFile currentFile = (StoredFile) filesIt.next();
            CustomTreeNode tnbFile = new CustomTreeNode("file",
                currentFile.getName(), true);
            tnbFile.setIdentifier(currentFile.getId());
            tnbFile.setParent(this);
            tnbFile.setContent(new ViewStoredFile(currentFile));
            this.children.add(tnbFile);
          }

          return this.children;
        } else {
View Full Code Here

        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()));
        }
        DataModel storedFilesDataModel = new ListDataModel();
        storedFilesDataModel.setWrappedData(folderViewStoredFiles);
        StoredFileBean storedFileBean = (StoredFileBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(StoredFileBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());
        storedFileBean.setStoredFiles(storedFilesDataModel);
View Full Code Here

TOP

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

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.