Package org.jallinone.documents.java

Examples of org.jallinone.documents.java.DocumentVersionVO


    return "loadDocumentVersion";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    DocumentVersionVO vo = (DocumentVersionVO)inputPar;
    try {
      Documents bean = (Documents)JAIOBeanFactory.getInstance().getBean(Documents.class);
      String docPath = (String)((JAIOUserSessionParameters)userSessionPars).getAppParams().get(ApplicationConsts.DOC_PATH);
      Document document = bean.loadDocumentVersion(vo,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),docPath);
      context.setAttribute(document.getDocId(),document.getDoc());
View Full Code Here


      DocumentPK pk = null;
      stmt = conn.createStatement();
      Response res = null;
      ArrayList versions = null;
      DocumentVersionVO versionVO = null;
      for(int i=0;i<list.size();i++) {
        pk = (DocumentPK)list.get(i);

        // retrieve all document versions...
        res = bean.loadDocumentVersions(pk,new GridParams(),serverLanguageId,username);
View Full Code Here

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

      DocumentVersionVO vo = null;
      File file = null;
      for(int i=0;i<documentVersionVOs.size();i++) {
        // phisically delete the records in DOC15...
        vo = (DocumentVersionVO)documentVersionVOs.get(i);
        stmt.execute("delete from DOC15_DOCUMENT_VERSIONS where "+
            "COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01DOC15()+"' and "+
            "PROGRESSIVE_DOC14="+vo.getProgressiveDoc14DOC15()+" and "+
            "VERSION="+vo.getVersionDOC15());

        // delete 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;
        }
        file = new File(appPath+"DOC"+vo.getProgressiveDoc14DOC15()+"_"+vo.getVersionDOC15());
        file.delete();
      }

      return new VOResponse(new Boolean(true));
    }
View Full Code Here

TOP

Related Classes of org.jallinone.documents.java.DocumentVersionVO

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.