Examples of Dms


Examples of es.ipsa.atril.doc.user.Dms

      invc.save(oSes);
      DAO.log(oSes, invc.getDocument(), Invoice.class, "CREATE INVOICE", AtrilEvent.Level.INFO, "");
    }
    oSes.commit();
    try {
    Dms oDms = oSes.getDms();
    TaxPayer oTxp = new TaxPayer(oDms, sTaxPayer);
    try {
      oTxp.incPendingInvoicesCount(oSes,nInvoices);
    } catch(Exception e) {
      Log.out.error(e.getClass()+" "+e.getMessage(), e);
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

    if (!containsKey("account_uuid")) put("account_uuid", Gadgets.generateUUID());
    if (!containsKey("is_active")) put("is_active", "1");

    super.save(oSes);

    Dms oDms = oSes.getDms();
    List<Document> oLst = oDms.query("Ticket$account_uuid='" + getString("account_uuid") + "'");
    for (Document d : oLst) {
      Ticket oTck = new Ticket(oDms.getDocument(d.id()));
      oTck.put("accounting_code", getString("account_code"));
      oTck.put("accounting_desc", Gadgets.removeChars(getString("account_desc"),"\"\n`'"));
      oTck.save(oSes);
    }   
  }
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

  }

  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

Examples of es.ipsa.atril.doc.user.Dms

                String sSenderDisplayName, String sSenderEmail, String sSenderUuid,
                String sRecipientEmail, String sRecipientUuid,
                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

Examples of es.ipsa.atril.doc.user.Dms

                 String sRecipientEmail, String sRecipientUuid,
                 String sSubject, String sBody, String sDocId)
    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);
    m.put("recipient_email", sRecipientEmail);
    if (sRecipientUuid!=null) if (sRecipientUuid.length()>0) m.put("recipient_id", sRecipientUuid);
    m.put("message_subject", sSubject);
    m.put("message_body", sBody);
    m.put("is_archived", "0");
    if (sDocId.length()>0) {
      m.put("message_type", "incident");
      m.put("related_document", sDocId);
      m.save(oSes);
      sendEmail(sSubject, sSenderDisplayName, sSenderEmail,new String[] {sRecipientEmail},sBody,oDms.getDocument(sDocId).type().name(),sDocId);
    } else {
      m.put("message_type", "notification");
      m.save(oSes);
      sendEmail(sSubject, sSenderDisplayName, sSenderEmail,new String[] {sRecipientEmail},sBody,null,null);
    }
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

        sQry = "Message & (($sender_id='"+sUserUuid+"' | $recipient_id='"+sUserUuid+"') & $is_archived='1')";
        break;
      default:
        throw new IllegalArgumentException("Folder must be SENT, RECEIVED or ARCHIVED");
    }
    Dms oDms = oSes.getDms();
    Log.out.debug("Dms.query("+sQry+")");
    SortableList<Document> oLst = oDms.query(sQry);
    int nTotalMsgs = oLst.size();
    ArrayList<Message> aMsgs = new ArrayList<Message>(nTotalMsgs==0 ? 1 : nTotalMsgs);
    ArrayList<Message> aSubl = new ArrayList<Message>(iMaxMsgs==0 ? 1 : iMaxMsgs);
    if (!oLst.isEmpty())
      for (Document d : oLst)
        aMsgs.add(new Message(oDms.getDocument(d.id())));
    if (sSortBy!=null)
      if (sSortBy.length()>0)
        Collections.sort(aMsgs, new AttrComparator(sSortBy, bAscending));
    for (int m=iOffset; m-iOffset<=iMaxMsgs && m<nTotalMsgs; m++)
      aSubl.add(aMsgs.get(m));
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

  public Resolution buy() {
      Order order = new Order();
      try {
        connect();
        AtrilSession oSes = getSession();
        Dms oDms = oSes.getDms();
        CustomerAccount cacc = new CustomerAccount(oDms, getSessionAttribute("customer_account_docid"));
        order = cacc.createOrder(oSes);
        order.put("user_id", getSessionAttribute("user_docid"));
        order.put("credits_bought", selectedProduct.getCredits());
        order.save(oSes);
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

  private static CountryNameComparator oCntrCmp = new Countries().new CountryNameComparator();

  public static Collection<Country> list() {
    if (aCntrs==null) {
      AtrilSession oSes = DAO.getAdminSession("Countries");
      Dms oDms = oSes.getDms();
      SortableList<Document> oLst = (SortableList<Document>) oDms.query("Country");
      aCntrs = new ArrayList<Country>();
      for (Document d : oLst) {
        Country c = new Country();
        c.setDocument(oDms.getDocument(d.id()));
        aCntrs.add(c);
      } // next
      oSes.disconnect();
      oSes.close();   
      Collections.sort(aCntrs, oCntrCmp);
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

    oCity.save(oSes);
    return oCity;
  }
 
  public Collection<City> list(AtrilSession oSes) {
    Dms oDms = oSes.getDms();
    State oStte = getState(oSes);
    if (oCache.containsKey(oStte.getCode())) {
      return oCache.get(oStte.getCode());
    } else {
      ArrayList<City> aCities = new ArrayList<City>();
      for (Document d : getDocument().children()) {
        aCities.add(new City(oDms.getDocument(d.id())));
      }
      Collections.sort(aCities, oCtyCmp);
      oCache.put(oStte.getCode(), aCities);
      return aCities;     
    }
View Full Code Here

Examples of es.ipsa.atril.doc.user.Dms

        errors.add("concepto", new LocalizableError("com.zesped.action.EditBillNote.concept.valueNotPresent"));
      if (sBeanEmployeeUUID.length()==0)
        errors.add("empleado", new LocalizableError("com.zesped.action.EditBillNote.employee.valueNotPresent"));       
      if (sConcept.length()>0 && sBeanEmployeeUUID.length()>0) {
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
        Dms oDms = getSession().getDms();       
        TaxPayer txpy = new TaxPayer(oDms, getRecipientTaxPayer());
        BillNote bill = txpy.billnotes(getSession()).forConcept(getSession(), sConcept, sBeanEmployeeUUID);
        Log.out.debug("BillNote with Id "+bill.id()+" found for concept "+sConcept+" and employee "+sBeanEmployeeUUID);
        if (bill.isOpen()) {
          final String sBillEmployeeUUID = (bill.getEmployeeUuid()==null ? "" : bill.getEmployeeUuid());
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.