Package es.ipsa.atril.doc.user

Examples of es.ipsa.atril.doc.user.Document.children()


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


    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);             
View Full Code Here

  }

  public static Countries top(AtrilSession oSes) throws ElementNotFoundException {
    Document z = Zesped.top(oSes).getDocument();
    Countries c = new Countries();
    for (Document d : z.children()) {
      if (d.type().name().equals(c.getTypeName())) {
        c.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
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);
View Full Code Here

  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 static Configurations top(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException {
    Document r = oSes.getDms().getRootDocument();
    Configurations c = new Configurations();
    for (Document d : r.children()) {
      if (d.type().name().equals(c.getTypeName())) {
        c.setDocument(oSes.getDms().getDocument(d.id()));
          break;
      }
    } // next
View Full Code Here

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

    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();
View Full Code Here

  }

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

  public static Zesped top(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException {
      Log.out.debug("Begin com.zesped.model.Zesped.top()");
    Document r = oSes.getDms().getRootDocument();
    Zesped z = new Zesped();
    for (Document d : r.children()) {
      if (d.type().name().equals(z.getTypeName())) {
        z.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
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.