Examples of SimpleError


Examples of net.sourceforge.stripes.validation.SimpleError

              }
              TicketNote note = tckt.createNote(getSession(), attachment.getInputStream(), incCapturedCount(), attachment.getFileName());
              if (getCapturedPage1().length()==0) setCapturedPage1(note.id());
              attachment.delete();
            } else {
              ValidationError error = new SimpleError(attachment.getFileName()+ " is not a valid file." );
              getContext().getValidationErrors().add("items" , error);
            }
          }
          } // next
        disconnect();
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

      } else {
        setBillNoteId(null);
      }
    } catch (Exception e) {
      Log.out.error("EditBillNote.validateBillNoteVsEmployee() "+e.getClass().getName()+" "+e.getMessage());
      errors.add("employee", new SimpleError(e.getClass().getName()+" "+e.getMessage()));
    } finally { close(); }
  }
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

                             oRe.getEmail(), oRe.getNickName(), sSubject, sBody);
        disconnect();
          addDataLine("id",oMsg.id());
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getMessage()));
      } finally {
        close();
      }
    }
      return AjaxResponseResolution();
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

                Client.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
            Cache.deleteEntry(getSessionAttribute("customer_account_docid")+"accsuppliers");
            Cache.deleteEntry(getSessionAttribute("customer_account_docid")+"clients");
          } else if (sClss.equals("TaxPayer")) {
            connect();
            for (d=0; d<aDocs.length; d++) {
              try {
                TaxPayer.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
            Cache.deleteEntry(getSessionAttribute("customer_account_docid")+"acctaxpayers");
            Cache.deleteEntry(getSessionAttribute("customer_account_docid")+"taxpayers");
          } else if (sClss.equals("Invoice")) {
            connect();
            for (d=0; d<aDocs.length; d++) {
              try {
                Invoice.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
          } else if (sClss.equals("Ticket")) {
            connect();
            for (d=0; d<aDocs.length; d++) {
              try {
                Ticket.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
          } else if (sClss.equals("BillNote")) {
            connect();
            for (d=0; d<aDocs.length; d++) {
              try {
                BillNote.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
          } else {
            Class oClss = Class.forName("com.zesped.model."+sClss);
            BaseModelObject oObj = (BaseModelObject) oClss.newInstance();
            connect();
            for (d=0; d<aDocs.length; d++) {
              try {
                oObj.delete(getSession(),aDocs[d]);
                addDataLine("docid", aDocs[d]);
                commit();
              } catch (Exception xcpt) {
                rollback();
                addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
                Log.out.error("DeleteDocuments.delete("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
                Log.out.error(Log.stackTrace(xcpt), xcpt);
              }
            }
            disconnect();
          }
        } catch (ClassCastException cce) {
          addError("type", new SimpleError ("Class cast exception "+sClss));
          Log.out.error("DeleteDocuments.delete() ClassCastException "+cce.getMessage()+" document "+aDocs[d]);
        } catch (ClassNotFoundException cnfe) {
          addError("type", new SimpleError ("Class not found "+sClss));
          Log.out.error("DeleteDocuments.delete() ClassNotFoundException "+cnfe.getMessage()+" document "+aDocs[d]);
        } catch (InstantiationException inse) {
          addError("type", new SimpleError ("Instantiation exception "+sClss));
          Log.out.error("DeleteDocuments.delete() InstantiationException "+inse.getMessage()+" document "+aDocs[d]);
        } catch (IllegalAccessException ilae) {
          addError("type", new SimpleError ("Illegal access exception "+sClss));
          Log.out.error("DeleteDocuments.delete() IllegalAccessException "+ilae.getMessage()+" document "+aDocs[d]);
        } catch (IllegalStateException ilst) {
          addError("type", new SimpleError ("Illegal state exception "+sClss));
          Log.out.error("DeleteDocuments.delete() IllegalStateException "+ilst.getMessage()+" document "+aDocs[d]);
        } catch (StorageException stox) {
          addError("document", new SimpleError ("Storage exception"));
          Log.out.error("DeleteDocuments.delete() StorageException "+stox.getMessage()+" document "+aDocs[d]);
        } catch (DmsException dmse) {
          addError("document", new SimpleError ("DMS exception"));
          Log.out.error("DeleteDocuments.delete() DmsException "+dmse.getMessage()+" document "+aDocs[d]);
        } catch (Exception xcpt) {
          addError("document", new SimpleError (xcpt.getClass().getName()));
          Log.out.error("DeleteDocuments.delete()"+xcpt.getClass().getName()+" "+xcpt.getMessage()+" document "+aDocs[d]);
        } finally {
          close();         
        }
      }
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

          addError(new LocalizableError("com.zesped.action.SaveAccountingAccount.code.valueDuplicated"));
      } catch (ElementNotFoundException enfe) { }
      disconnect();
    } catch (Exception xcpt) {
      Log.out.error(xcpt.getMessage(), xcpt);
      addError(new SimpleError(xcpt.getMessage()));
    } finally {
      close();
    }
  }
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

          addDataLine("uuid",oAacc.getUuid());
          addDataLine("code",oAacc.getCode());
          addDataLine("description",oAacc.getDescription());
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getMessage()));
      } finally {
        close();
      }
    }
      return AjaxResponseResolution();
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

          Message.delete(getSession(), sId);
        disconnect();
          addDataLine("id",sId);
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getMessage()));
      } finally {
        close();
      }
    }
      return AjaxResponseResolution();
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

      new CreditBurner(getSessionAttribute("user_uuid"),
               getSessionAttribute("customer_account_docid"),
               sService, sFlavor).start();
    } catch (Exception e) {
      Log.out.error("AttachDeposit.attach() "+e.getClass().getName()+" "+e.getMessage(), e);
      addError(new SimpleError(e.getMessage()));
    } finally { close(); }
    Log.out.debug("End AttachDeposit.attach()");
    return AjaxResponseResolution();
 
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

      oSes.disconnect();
      oSes.close();
      oSes = null;
      if (null==oAacc) {
        Log.out.error("No accounting account with uuid "+sUuid+" was found");
        conversionErrors.add(new SimpleError("No accounting account with uuid "+sUuid+" was found"));
      }
      return oAacc;
    } catch (Exception exc) {
      Log.out.error(exc.getClass().getName()+" AccountingAccount.convert("+sUuid+") "+exc.getMessage());
      conversionErrors.add(new SimpleError(exc.getMessage()));
      return null;
    }
  }
View Full Code Here

Examples of net.sourceforge.stripes.validation.SimpleError

      oSes.disconnect();
      oSes.close();
      oSes = null;
    } catch (ElementNotFoundException enf) {
      Log.out.error("No product with id "+sProductId+" was found");
      conversionErrors.add(new SimpleError("No product with id "+sProductId+" was found"));     
    } catch (Exception exc) {
      Log.out.error(exc.getClass().getName()+" Products.convert("+sProductId+") "+exc.getMessage());
      conversionErrors.add(new SimpleError(exc.getMessage()));
    } finally {
      if (oSes!=null) {
        if (oSes.isConnected()) oSes.disconnect();
        if (oSes.isOpen()) oSes.close();
      }
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.