Package com.centraview.file

Examples of com.centraview.file.CvFileFacade.addFile()


        ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBody.getBytes());

        try {
          CvFileFacade fileFacade = new CvFileFacade();
          newFileID = fileFacade.addFile(individualID, attachmentFolderID, fileVO, inputStream, dataSource);
        } catch (CvFileException cfe) {
          // I guess do nothing
        }

        if (newFileID > 0) {
View Full Code Here


        flvo.setOwner(userid);
        flvo.setAuthorId(userid);
        flvo.setFileSize((float) ff.getFileSize());

        CvFolderVO homeFolder = cvfile.getHomeFolder(userid, dataSource);
        int fileId = cvfile.addFile(userid, homeFolder.getFolderId(), flvo, im, dataSource);
        ArrayList fileList = new ArrayList();
        fileList.add(new DDNameValue(fileId+"#"+fileName,fileName));

        String[] files = fileform.getFileList();
        if(files != null){
View Full Code Here

              }
            }
            ByteArrayInputStream inputStream = new ByteArrayInputStream(documentContent.toString()
                .getBytes());
            // Add the File to the Files Module so that we can download it...
            int fileId = cvf.addFile(individualID, homeFld.getFolderId(), flvo, inputStream,
                dataSource);
            Message[2] = String.valueOf(fileId);
          } catch (Exception e) {
            logger.error("[execute] Exception thrown.", e);
          }
View Full Code Here

        ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBody.getBytes());

        try {
          CvFileFacade fileFacade = new CvFileFacade();
          newFileID = fileFacade.addFile(individualID, attachmentFolderID, fileVO, inputStream, dataSource);
        }catch(CvFileException cfe){
          // I guess do nothing
        }

        if (newFileID > 0) {
View Full Code Here

              // this is not good, and we should never reach this point, because I
              // have added some fail-proof default content for filename above
              return -1;
            }

            int newFileID = fileFacade.addFile(ownerID, attachmentFolderID, attachment, part.getInputStream(), this.dataSource);

            if (newFileID > 0) {
              cvdal.clearParameters();
              cvdal.setInt(1, messageID);
              cvdal.setString(2, attachment.getTitle());
View Full Code Here

              // this is not good, and we should never reach this point, because I
              // have added some fail-proof default content for filename above
              return -1;
            }

            int newFileID = fileFacade.addFile(ownerID, attachmentFolderID, attachment, part.getInputStream(), this.dataSource);

            if (newFileID > 0) {
              //According to rfc. Some email client will not add the less than and greather than in the content-ID
              //We will replace lessthen and greaterthen with blank
              contentID = contentID.replaceAll("<","");
View Full Code Here

        flvo.setOwner(userid);
        flvo.setAuthorId(userid);
        flvo.setFileSize((float) ff.getFileSize());

        CvFolderVO homeFolder = cvfile.getHomeFolder(userid, dataSource);
        int xxx = cvfile.addFile(userid, homeFolder.getFolderId(), flvo, im, dataSource);
        //int xxx = cvfile.addEmailAttachment(userid, flvo, im, dataSource);

        HashMap hm = (HashMap) session.getAttribute("AttachfileList");

        if (hm == null)
View Full Code Here

            flvo.setOwner(userid);
            flvo.setAuthorId(userid);
            flvo.setFileSize((float) ff.getFileSize());

            CvFolderVO homeFolder = cvfile.getHomeFolder(userid, dataSource);
            int xxx = cvfile.addFile(userid, homeFolder.getFolderId(), flvo, im, dataSource);
            flvo = cvfile.getFile(userid, xxx, dataSource);

            HashMap hm = (HashMap) session.getAttribute("AttachfileList");

            if (hm == null)
View Full Code Here

          //flvo.setAuthor(indvID);
          flvo.setPhysical(CvFileVO.FP_PHYSICAL);

          StringBufferInputStream stringInputStream = new StringBufferInputStream(importInputStream.toString());
          int fileId = cvf.addFile(indvID, homeFld.getFolderId(), flvo, stringInputStream, this.dataSource);
          messageList.put("fileID",fileId + "");
        } catch (Exception e) {
          logger.error("[Exception] ListEJB.getImportList: ", e);
        }
      }
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.