Package es.ipsa.atril.doc.user

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


  }

  public static Collection<VatPercent> listActive() {
    if (oActivePercents==null) {
      AtrilSession oSes = DAO.getAdminSession("VatPercents");
      Dms oDms = oSes.getDms();
      Document p = VatPercents.top(oSes).getDocument();
      oActivePercents = new ArrayList<VatPercent>();
      for (Document d : p.children()) {
        VatPercent v = new VatPercent(oDms.getDocument(d.id()));
        if (v.isActive()) oActivePercents.add(v);
      }
      oSes.disconnect();
      oSes.close();
      Collections.sort(oActivePercents, oVatCmp);
View Full Code Here


    if (iMaxRows>0) {
      Boolean bOpen = (sOpen.length()==0 ? null : sOpen.equals("1") ? Boolean.TRUE : Boolean.FALSE);     
      try {
        connect(sNickN, sPassw);
        Dms oDms = getSession().getDms();
        aLst = new TaxPayer(oDms, sTaxPayer).queryBillNotes(getSession(), bOpen, sEmployee, sConcept, sSearchStr, iMaxRows, iOffset);       
        disconnect();
      } catch (Exception xcpt) {
        Log.out.error("QueryTickets "+sNickN+" "+xcpt.getClass()+" "+xcpt.getMessage());
      } finally {
View Full Code Here

      Log.out.error("BaseListBean.preload() Cache.getObject("+getSessionAttribute("customer_account_docid")+"taxpayers) "+e.getClass().getName()+" "+e.getMessage(), e);
    }
   
    try {
      connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
      Dms oDms = getSession().getDms();
      cacc = new CustomerAccount(oDms, getSessionAttribute("customer_account_docid"));
      if (cnts==null) {
        cnts = cacc.clients(getSession()).list(getSession());
        try {
          Cache.putEntry(getSessionAttribute("customer_account_docid")+"clients", cnts);
View Full Code Here

    final String sNickN = getSessionAttribute("nickname");
    final String sPassw = getSessionAttribute("password");
    final String sBillNoteId = getParam("id");
    try {
      connect(sNickN, sPassw);
      Dms oDms = getSession().getDms();
      BillNote oBln = new BillNote(oDms, sBillNoteId);
      setId(sBillNoteId);
      oBln.computeSettling(getSession());
      setIsOpen(oBln.isOpen());
      base = oBln.getBaseAmount();
View Full Code Here

    final String sNickN = getSessionAttribute("nickname");
    final String sPassw = getSessionAttribute("password");
    Log.out.debug("Writting Bill Note "+getId()+(bSettle ? " with settling" : " without settling"));
    try {
      connect(sNickN, sPassw);
      Dms oDms = getSession().getDms();
      final int nTickets = getTicketIds().size();
      Log.out.debug(String.valueOf(nTickets)+" tickets found");
      Log.out.debug(String.valueOf(getBillers().size())+" billers found");
      for (int t=0; t<nTickets; t++) {
        Log.out.debug("Updating Ticket "+getTicketIds().get(t));
View Full Code Here

    final String sNickN = getSessionAttribute("nickname");
    final String sPassw = getSessionAttribute("password");

    try {
      connect(sNickN, sPassw);
      Dms oDms = getSession().getDms();
      BillNote oBln = new BillNote(oDms, getId());
      oBln.isOpen(true);
      oBln.save(getSession());
      DAO.log(getSession(), oBln.getDocument(), BillNote.class, "REOPEN BILLNOTE", AtrilEvent.Level.INFO, oBln.id()+";"+oBln.getTaxPayer());
      disconnect();
View Full Code Here

  }

  public static void delete(AtrilSession oSes, String sDocId)
    throws DmsException, ElementNotFoundException, ClassNotFoundException, InstantiationException,
    IllegalAccessException, ClassCastException, IllegalStateException {
    Dms oDms = oSes.getDms();
    new Invoice(oDms, sDocId).delete(oSes, oDms);
 
View Full Code Here

  }

  public CaptureType create(AtrilSession oSes, String sMimeType, boolean bMultiPage, boolean bMultiSheet,
                boolean bSign, boolean bServerSign, String sName, String sDescripcion) {
    CaptureType oCpt = new CaptureType();
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType(oCpt.getTypeName()), getDocument());
    oDoc.attribute("name").set(sName);
    oDoc.attribute("description").set(sDescripcion);
    oDoc.attribute("MimeType").set(sMimeType);
    oDoc.attribute("MultiPageItem").set(bMultiPage ? 1 : 0);
    oDoc.attribute("MultiSheetDocument").set(bMultiSheet ? 1 : 0);
    oDoc.attribute("Sign").set(bSign ? 1 : 0);
    oDoc.attribute("SignInClient").set(bSign ? 1 : 0);
    oDoc.attribute("SignInServer").set(bServerSign ? 1 : 0);
    oDoc.attribute("IsPDFA").set(0);
    oDoc.attribute("XMPMetadataStructure").set("");
    oDoc.attribute("bitsDepth").set(0);
    oDoc.save("");
    oCpt.setDocument(oDoc);
    oDoc = oDms.newDocument(oDms.getDocumentType("Fields"), oCpt.getDocument());
    oDoc.save("");
    return oCpt;
  }
View Full Code Here

    oSes.close();   
    return aCtps;
 

  public static CaptureType seek(AtrilSession oSes, String sName) throws ElementNotFoundException {
    Dms oDms = oSes.getDms();
    SortableList<Document> oLst = oDms.query("CaptureType$name='"+sName+"'");
    if (oLst.isEmpty())
      throw new ElementNotFoundException("CaptureType "+sName+" not found");
    return new CaptureType(oDms.getDocument(oLst.get(0).id()));
  }
View Full Code Here

  }

  public void grantAll(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AuthorizationManager oAum = oSes.getAuthorizationManager();
    Dms oDms = oSes.getDms();
    DocumentRights oGrt = RightsFactory.getDocumentRightsAllGrant();
    ArrayList<User> aUsrs = Users.top(oSes).list(oSes);
    Document oCpts = getDocument();
    for (User u : aUsrs) {
      String sNick = u.getNickName();
      if (!sNick.equals("admin")) {
        es.ipsa.atril.sec.user.User oUsr = oAum.getUser(sNick);
        oAum.setDocumentRights(oUsr, oCpts, oGrt);
        for (Document t : oCpts.children()) {
          oAum.setDocumentRights(oUsr, oDms.getDocument(t.id()), oGrt);
          for (Document f : t.children()) {
            oAum.setDocumentRights(oUsr, oDms.getDocument(f.id()), oGrt);
            for (Document s : f.children()) {
              oAum.setDocumentRights(oUsr, oDms.getDocument(s.id()), oGrt);             
            } // next
          } // next
        } // next
      } // fi
    } // next
View Full Code Here

TOP

Related Classes of es.ipsa.atril.doc.user.Dms

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.