Examples of DetailDocumentVO


Examples of org.jallinone.documents.java.DetailDocumentVO

    return "insertDocument";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    DetailDocumentVO vo = (DetailDocumentVO)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_DOCUMENT);
      String docPath = (String)((JAIOUserSessionParameters)userSessionPars).getAppParams().get(ApplicationConsts.DOC_PATH);
View Full Code Here

Examples of org.jallinone.documents.java.DetailDocumentVO

    return "updateDocument";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    DetailDocumentVO oldVO = (DetailDocumentVO)((ValueObject[])inputPar)[0];
    DetailDocumentVO newVO = (DetailDocumentVO)((ValueObject[])inputPar)[1];
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_DOCUMENT);
      String docPath = (String)((JAIOUserSessionParameters)userSessionPars).getAppParams().get(ApplicationConsts.DOC_PATH);
View Full Code Here

Examples of org.jallinone.documents.java.DetailDocumentVO

   * Method called by the Form panel to insert new data.
   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    DetailDocumentVO vo = (DetailDocumentVO)newPersistentObject;
    vo.setCompanyCodeSys01DOC14(companyCodeSys01DOC16);
    vo.setProgressiveHie01DOC17(progressiveHie01DOC17);
    if (vo.getDocument()==null) {
      return new ErrorResponse("you must attach a file");
    }

    Response res = ClientUtils.getData("insertDocument",vo);
    if (!res.isError()) {
      vo = (DetailDocumentVO)((VOResponse)res).getVo();
      vo.setDocument(null);
      frame.getControlDocSize().setText("");
      pk = new DocumentPK(vo.getCompanyCodeSys01DOC14(),vo.getProgressiveDOC14());
      if (parentFrame!=null) {
        parentFrame.getGrid().reloadCurrentBlockOfData();
      }

      frame.getLinksgrid().getOtherGridParams().put(
View Full Code Here

Examples of org.jallinone.documents.java.DetailDocumentVO

   * @param oldPersistentObject original value object, previous to the changes
   * @param persistentObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response updateRecord(ValueObject oldPersistentObject,ValueObject persistentObject) throws Exception {
    DetailDocumentVO vo = (DetailDocumentVO)persistentObject;
    Response res = ClientUtils.getData("updateDocument",new ValueObject[]{oldPersistentObject,persistentObject});
    if (!res.isError()) {
      vo = (DetailDocumentVO)((VOResponse)res).getVo();
      vo.setDocument(null);
      frame.getVgrid().reloadData();
      frame.getPropPanel().reloadData(frame);
      if (parentFrame!=null) {
        parentFrame.getGrid().reloadCurrentBlockOfData();
      }
View Full Code Here

Examples of org.jallinone.documents.java.DetailDocumentVO

   * @param persistentObject value object to delete
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response deleteRecord(ValueObject persistentObject) throws Exception {
    ArrayList pks = new ArrayList();
    DetailDocumentVO vo = (DetailDocumentVO)persistentObject;
    DocumentPK pk = new DocumentPK(vo.getCompanyCodeSys01DOC14(),vo.getProgressiveDOC14());
    pks.add(pk);
    Response res = ClientUtils.getData("deleteDocuments",pks);
    if (!res.isError()) {
      if (parentFrame!=null) {
        parentFrame.getGrid().reloadCurrentBlockOfData();
View Full Code Here

Examples of org.jallinone.documents.java.DetailDocumentVO

    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;

      // retrieve document file name...
      DetailDocumentVO docVO = bean.loadDocument(
          new DocumentPK(vo.getCompanyCodeSys01DOC15(),vo.getProgressiveDoc14DOC15()),
          serverLanguageId,username,new ArrayList()
      );


      // read file from file system...
      String appPath = docPath;
      appPath = appPath.replace('\\','/');
      if (!appPath.endsWith("/"))
        appPath += "/";
      if (!new File(appPath).isAbsolute()) {
        // relative path (to "WEB-INF/classes/" folder)
        appPath = this.getClass().getResource("/").getPath().replaceAll("%20"," ")+appPath;
      }
      String relativePath = FileUtils.getFilePath(appPath,"DOC14",vo.getCreateDateDOC15());
      File file = new File(appPath+"DOC"+vo.getProgressiveDoc14DOC15()+"_"+vo.getVersionDOC15()); // retro-compatibility...
      if (!file.exists())
        file = new File(appPath+relativePath+"DOC"+vo.getProgressiveDoc14DOC15()+"_"+vo.getVersionDOC15());
      FileInputStream fis = new FileInputStream(file);
      byte[] doc = new byte[(int)file.length()];
      fis.read(doc);
      fis.close();

      // store in application session the document...
      String docId = System.currentTimeMillis()+"_"+docVO.getFilenameDOC14().toLowerCase();
      Document document = new Document();
      document.setDoc(doc);
      document.setDocId(docId);
      return document;
    }
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.