Package es.ipsa.atril.doc.user

Examples of es.ipsa.atril.doc.user.Dms.newDocument()


  public String incomingDeposits(AtrilSession oSes) {
    for (Document d : getDocument().children())
      if (d.type().name().equals("IncomingDeposits"))
        return d.id();
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType("IncomingDeposits"), getDocument());
    oDoc.save("");
    oSes.commit();
    return oDoc.id();
  }
 
View Full Code Here


    Log.out.debug("Begin TaxPayer.create("+sBusinessName+","+sTaxId+","+sEmail+String.valueOf(bRequiresActivation)+","+sVolumesMountBase+")");
   
    long lEnd, lStart = new Date().getTime();
   
    TaxPayer oPayer = new TaxPayer();
    oPayer.setDocument(oDms.newDocument(oDms.getDocumentType("TaxPayer"), oAcc.taxpayers(oSes).getDocument()));
    oPayer.put("customer_acount", oAcc.getString("account_id"));
    oPayer.put("creation_date", new Date());
    oPayer.put("active", bRequiresActivation ? "-1" : "1");
    oPayer.put("business_name", sBusinessName);
    oPayer.put("tax_id", sTaxId);
View Full Code Here

    oSes.commit();

    Log.out.debug("PROFILING: Save TaxPayer "+String.valueOf((lEnd=new Date().getTime())-lStart)+" ms");
    lStart = lEnd;
   
    Document oInvoices = oDms.newDocument(oDms.getDocumentType("Invoices"), oPayer.getDocument());
    oInvoices.save("");
    oIdx.indexDocument(oInvoices);

    Document oBillNotes = oDms.newDocument(oDms.getDocumentType("BillNotes"), oPayer.getDocument());
    oBillNotes.save("");
View Full Code Here

   
    Document oInvoices = oDms.newDocument(oDms.getDocumentType("Invoices"), oPayer.getDocument());
    oInvoices.save("");
    oIdx.indexDocument(oInvoices);

    Document oBillNotes = oDms.newDocument(oDms.getDocumentType("BillNotes"), oPayer.getDocument());
    oBillNotes.save("");
    oIdx.indexDocument(oBillNotes);

    Document oEmployees = oDms.newDocument(oDms.getDocumentType("Employees"), oPayer.getDocument());
    oEmployees.save("");
View Full Code Here

    Document oBillNotes = oDms.newDocument(oDms.getDocumentType("BillNotes"), oPayer.getDocument());
    oBillNotes.save("");
    oIdx.indexDocument(oBillNotes);

    Document oEmployees = oDms.newDocument(oDms.getDocumentType("Employees"), oPayer.getDocument());
    oEmployees.save("");
    oIdx.indexDocument(oEmployees);

    Log.out.debug("PROFILING: Create TaxPayer child documents "+String.valueOf((lEnd=new Date().getTime())-lStart)+" ms");
    lStart = lEnd;
View Full Code Here

  public static Message inquire(AtrilSession oSes, String sSenderDisplayName, String sSenderEmail, String sSenderUuid, String sSubject, String sBody)
    throws RuntimeException, NullPointerException, NotYetConnectedException, DmsException, NotEnoughRightsException, IOException, MessagingException {
      Log.out.debug("Begin Messages.inquire("+sSenderDisplayName+","+sSenderEmail+","+sSubject+")");
    Dms oDms = oSes.getDms();
    Message m = new Message();
    m.setDocument(oDms.newDocument(oDms.getDocumentType("Message"), top(oSes).getDocument()));
    m.put("thread_id", Gadgets.generateUUID());
    m.put("sent_date", new Date());
    m.put("sender_displayname", sSenderDisplayName);
    m.put("sender_email", sSenderEmail);
    if (sSenderUuid!=null) if (sSenderUuid.length()>0) m.put("sender_id", sSenderUuid);
View Full Code Here

                String sSubject, String sBody)
      throws RuntimeException, NullPointerException, NotYetConnectedException, DmsException, NotEnoughRightsException, IOException, MessagingException {
        Log.out.debug("Begin Messages.reply("+sThreadId+","+sSenderDisplayName+","+sSenderEmail+","+sSubject+")");
      Dms oDms = oSes.getDms();
      Message m = new Message();
      m.setDocument(oDms.newDocument(oDms.getDocumentType("Message"), top(oSes).getDocument()));
      m.put("thread_id", sThreadId);
      m.put("sent_date", new Date());
      m.put("sender_displayname", sSenderDisplayName);
      m.put("sender_email", sSenderEmail);
      if (sSenderUuid!=null)
View Full Code Here

    throws RuntimeException, NullPointerException, NotYetConnectedException, DmsException, NotEnoughRightsException, IOException, MessagingException, ElementNotFoundException {
    Log.out.debug("Begin Messages.notify("+sSenderDisplayName+","+sSenderEmail+","+sSenderUuid+","+sRecipientEmail+","+sRecipientUuid+","+sSubject+","+sDocId+")");
    if (sDocId==null) sDocId = "";
    Dms oDms = oSes.getDms();
    Message m = new Message();
    m.setDocument(oDms.newDocument(oDms.getDocumentType("Message"), top(oSes).getDocument()));
    m.put("thread_id", Gadgets.generateUUID());
    m.put("sent_date", new Date());
    m.put("sender_displayname", sSenderDisplayName);
    m.put("sender_email", sSenderEmail);
    if (sSenderUuid!=null) if (sSenderUuid.length()>0) m.put("sender_id", sSenderUuid);
View Full Code Here

  }

  protected void newDocument(AtrilSession oSes, Document oParent) {
    Dms oDms = oSes.getDms();
    DocumentType oDoct = oDms.getDocumentType(getTypeName());
    oDoc = oDms.newDocument(oDoct, oParent);
    setTypeName(oDoc.type().name());
    sId = oDoc.id();
    clear();
  } // newDocument
 
View Full Code Here

            oAacc.setDescription(getParam("accountingAccount.description"));
            oAacc.setActive(getParam("accountingAccount.active","1").equals("1"));
        } else {
            Dms oDms = getSession().getDms();
            TaxPayer oTxpr = new TaxPayer(getSession().getDms(), getParam("taxPayer"));
            Document oDoca = oDms.newDocument(oDms.getDocumentType("AccountingAccount"), oTxpr.accounts(getSession()).getDocument());
            oDoca.save("");           
            oAacc = new AccountingAccount(oDoca);
            oAacc.setCode(getParam("accountingAccount.code"));
            oAacc.setDescription(getParam("accountingAccount.description"));
            oAacc.setActive(getParam("accountingAccount.active","1").equals("1"));
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.