Package org.jallinone.documents.java

Examples of org.jallinone.documents.java.DocumentPK


   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    SheetAttachedDocVO vo = (SheetAttachedDocVO)persistentObject;
    new DocumentController(
      null,
      new DocumentPK(vo.getCompanyCodeSys01ITM26(),vo.getProgressiveDoc14ITM26()),
      vo.getCompanyCodeSys01ITM26(),
      null
    );
  }
View Full Code Here


   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    ActAttachedDocVO vo = (ActAttachedDocVO)persistentObject;
    new DocumentController(
      null,
      new DocumentPK(vo.getCompanyCodeSys01SCH08(),vo.getProgressiveDoc14SCH08()),
      vo.getCompanyCodeSys01SCH08(),
      null
    );
  }
View Full Code Here

   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    ItemAttachedDocVO vo = (ItemAttachedDocVO)persistentObject;
    new DocumentController(
      null,
      new DocumentPK(vo.getCompanyCodeSys01ITM05(),vo.getProgressiveDoc14ITM05()),
      vo.getCompanyCodeSys01ITM05(),
      null
    );
  }
View Full Code Here

    return "loadDocument";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    DocumentPK pk = (DocumentPK)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_DOCUMENT);

      LoadDocumentLinks bean = (LoadDocumentLinks)JAIOBeanFactory.getInstance().getBean(LoadDocumentLinks.class);
View Full Code Here


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    try {
      GridParams gridParams = (GridParams)inputPar;
      DocumentPK pk = (DocumentPK)gridParams.getOtherGridParams().get(ApplicationConsts.DOCUMENT_PK);

      LoadDocumentLinks bean = (LoadDocumentLinks)JAIOBeanFactory.getInstance().getBean(LoadDocumentLinks.class);
      Response answer = bean.loadDocumentVersions(pk,gridParams,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
View Full Code Here

    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

   * @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

      // check if v.o. contains also a new document version...
      if (newVO.getDocument()!=null) {
        // insert the new document version...
        Response res = insertDocumentLinkBean.insertDocumentVersion(
            new DocumentPK(newVO.getCompanyCodeSys01DOC14(),newVO.getProgressiveDOC14()),
            newVO.getDocument(),
            username,
            docPath
        );
        if (res.isError()) {
View Full Code Here

        throw new Exception(res.getErrorMessage());
      }

      // insert the new document version...
      res = insertDocumentLinkBean.insertDocumentVersion(
          new DocumentPK(vo.getCompanyCodeSys01DOC14(),vo.getProgressiveDOC14()),
          vo.getDocument(),
          username,
          docPath
      );
      if (res.isError()) {
View Full Code Here

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

      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);
        if (res.isError())
          throw new Exception(res.getErrorMessage());
        versions = new ArrayList(((VOListResponse)res).getRows());

        // for each document version: delete record in DOC15 and delete file from file system...
        res = deleteDocumentVersions(versions,serverLanguageId,username,docPath);
        if (res.isError()) {
          throw new Exception(res.getErrorMessage());
        }

        // phisically delete document links from DOC17...
        stmt.execute("delete from DOC17_DOCUMENT_LINKS where "+
            "COMPANY_CODE_SYS01='"+pk.getCompanyCodeSys01DOC14()+"' and "+
            "PROGRESSIVE_DOC14="+pk.getProgressiveDOC14());

        // phisically delete the record in DOC14...
        stmt.execute(
            "delete from DOC14_DOCUMENTS where "+
            "COMPANY_CODE_SYS01='"+pk.getCompanyCodeSys01DOC14()+"' and "+
            "PROGRESSIVE="+pk.getProgressiveDOC14()
        );

      }

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

TOP

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

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.