Package net.sf.archimede.model.storedFile

Examples of net.sf.archimede.model.storedFile.StoredFileDao


        }
    }
   
    public void downloadFileAction(ActionEvent event) throws IOException {
       
        StoredFileDao fileDao = StoredFileDao.createInstance();
        StoredFile storedFile = (StoredFile) this.selectedFolder.getStoredFilesModel().getRowData();
        StoredFile file = fileDao.retrieve(storedFile.getId());
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();     
        
        //text/plain, vnd.ms-excel, application/x-download, ...
View Full Code Here


        return this.selectedFolder;
    }
   
    public void downloadFileAction(ActionEvent event) throws IOException {
       
        StoredFileDao fileDao = StoredFileDao.createInstance();
        StoredFile storedFile = (StoredFile) this.selectedFolder.getStoredFilesModel().getRowData();
        StoredFile file2download = fileDao.retrieve(storedFile.getId());
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();     
        
        //text/plain, vnd.ms-excel, application/x-download, ...
View Full Code Here

        return "workspace_content_collection";
    }
   
    public void downloadFileAction(ActionEvent event) throws IOException {
       
        StoredFileDao fileDao = StoredFileDao.createInstance();
        StoredFile storedFile = (StoredFile) this.selectedFolder.getStoredFilesModel().getRowData();
        StoredFile file2download = fileDao.retrieve(storedFile.getId());
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();     
        
        //text/plain, vnd.ms-excel, application/x-download, ...
View Full Code Here

   
    public void downloadFileAction(ActionEvent event) throws IOException {
       
        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();     
        
View Full Code Here

        out.flush();
        facesContext.responseComplete();
    }
   
    public String update() {
        StoredFileDao storedFileDao = StoredFileDao.createInstance();
        try {
            storedFileDao.update(this.selectedStoredFile.getStoredFile());
        } catch (ObjectLockedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ObjectExistsException e) {
            // TODO Auto-generated catch block
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

            }
        }
        return "";
    }
    public String paste() throws ObjectLockedException, ObjectExistsException {
        StoredFileDao storedFileDao = StoredFileDao.createInstance();
        FolderBean folderBean = (FolderBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(FolderBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());    
        Folder destinationFolder = folderBean.getSelectedFolder();
        if (this.selectedStoredFiles != 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.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

  public void downloadFileAction(ActionEvent event) throws IOException {

    TreeNode treeNode = this.treeModel.getNode();
    String identifier = treeNode.getIdentifier();

    StoredFileDao fileDao = StoredFileDao.createInstance();
    StoredFile file = fileDao.retrieve(identifier);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) facesContext
        .getExternalContext().getResponse();
View Full Code Here

        return "";
    }
   
    public void downloadFileAction(ActionEvent event) throws IOException {
       
        StoredFileDao fileDao = StoredFileDao.createInstance();
        StoredFile storedFile = (StoredFile) this.selectedFolder.getStoredFilesModel().getRowData();
        StoredFile file2download = fileDao.retrieve(storedFile.getId());
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();     
        
        //text/plain, vnd.ms-excel, application/x-download, ...
View Full Code Here

TOP

Related Classes of net.sf.archimede.model.storedFile.StoredFileDao

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.