Package es.ipsa.atril.doc.user

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


  public Employee employee(AtrilSession oSes) {
    Employee oEmp = null;
    if (getStringNull("employee_uuid","").length()>=0) {
      oEmp = new Employee();
      Document d = oEmp.exists(oSes, "employee_uuid", getStringNull("employee_uuid"));
      if (d!=null)
        oEmp.setDocument(d);
      else
        oEmp = null;
    }
View Full Code Here


    setDocument(oAtrilDocument);
  }

  public BaseModelObject(Dms oDms, String sDocId)
    throws ElementNotFoundException,NumberFormatException,NullPointerException,IllegalArgumentException {
    Document oDoc = null;
    if (null==sDocId)
      throw new NullPointerException("Document Id cannot be null");
    if (sDocId.length()==0)
      throw new IllegalArgumentException("Document Id cannot be empty");
    try {
View Full Code Here

    return oParents.get(0).id();
  }

  public void load(AtrilSession oSes, String sDocId) throws ElementNotFoundException, NotEnoughRightsException , DmsException {
    Dms oDms = oSes.getDms();
    Document d = oDms.getDocument(sDocId);
    if (null==d) throw new ElementNotFoundException("Document "+sDocId+" not found");
    setDocument(d);
  }
View Full Code Here

 
  protected void delete(AtrilSession oSes, Dms oDms)
    throws ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastException,
    IllegalStateException, DmsException  {
    Log.out.debug("Begin "+getClass().getName()+".delete("+id()+")");
    Document p = oDms.getDocument(id());
    for (Document c : p.children()) {
      Document d = oDms.getDocument(c.id());
      Class t = Class.forName("com.zesped.model."+d.type().name());
      BaseModelObject o = (BaseModelObject) t.newInstance();
      o.setDocument(d);
      o.delete(oSes,oDms);
    }
    if (attributes()!=null) {
View Full Code Here

 
  public static void delete(AtrilSession oSes, String sDocId)
    throws DmsException, ElementNotFoundException, ClassNotFoundException, InstantiationException,
    IllegalAccessException, ClassCastException, IllegalStateException {
    Dms oDms = oSes.getDms();
    Document d = oDms.getDocument(sDocId);
    Log.out.debug("BaseModelObject.delete(AtrilSession, "+sDocId+")");
    if (null==d) throw new ElementNotFoundException("Document "+sDocId+" not found");
    Class t = Class.forName("com.zesped.model."+d.type().name());
    BaseModelObject o = (BaseModelObject) t.newInstance();
    o.setDocument(d);
    o.delete(oSes, oDms);
  }
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

    return aAttrs;
  }

  public static Deposits top(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException {
    Document r = oSes.getDms().getRootDocument();
    Deposits s = new Deposits();
    for (Document d : r.children()) {
      if (d.type().name().equals(s.getTypeName())) {
        s.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
View Full Code Here

 
  public void grantAll(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AuthorizationManager oAum = oSes.getAuthorizationManager();
    ArrayList<User> aUsrs = Users.top(oSes).list(oSes);
    Document oDeps = getDocument();
    for (User u : aUsrs)
      oAum.setDocumentRights(oAum.getUser(u.getNickName()), oDeps, RightsFactory.getDocumentRightsAllGrant());
  }
View Full Code Here

      connect();

      Log.out.debug("Begin attaching sides");
     
      Dms oDms = getSession().getDms();
      Document rcpt = oDms.getDocument(sRecipient);
      String sTaxPayerId = rcpt.type().name().equals("TaxPayer") ? sRecipient : getSessionAttribute("taxpayer_docid");
      if (sService.equals("INVOICES")) {
        disconnect();
        DepositToZespedBridge oDzb = new DepositToZespedBridge(CaptureService.INVOICES, lDepositId, getSessionAttribute("user_uuid"), sFlavor, sTaxPayerId, sBiller, sRecipient);
        oDzb.start();
        Log.out.debug("Done attaching sides");
View Full Code Here

    super(oDms, sDocId);
  }

  public Product(AtrilSession oSes, String sId, String sName, long lCredits, String dPrice, String sCurrency) {
    super("Product");
    Document oDoc = exists(oSes, "product_id", sId);
    Document oParent = Products.top(oSes).getDocument();
    if (oDoc==null)
      newDocument(oSes, oParent);
    else
      setDocument(oDoc);
    put("product_id",sId);
View Full Code Here

TOP

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

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.