Package es.ipsa.atril.sec.authentication

Examples of es.ipsa.atril.sec.authentication.AtrilSession.disconnect()


    try {
      oSes = DAO.getAdminSession("Order.lines");
      Dms oDma = oSes.getDms();
      for (Document d : oDma.getDocument(id()).children())
        aLines.add(new OrderLine(oDma.getDocument(d.id())));
      oSes.disconnect();
      oSes.close();
      oSes = null;
    } finally {
      if (oSes != null) {
        if (oSes.isConnected()) {
View Full Code Here


      oSes.close();
      oSes = null;
    } finally {
      if (oSes != null) {
        if (oSes.isConnected()) {
          oSes.disconnect();
        }
        if (oSes.isOpen()) {
          oSes.close();
        }
      }
View Full Code Here

        CaptureType c = new CaptureType();
        c.setDocument(d);
        aCtps.add(c);                   
      }
    }
    oSes.disconnect();
    oSes.close();   
    return aCtps;
 

  public static CaptureType seek(AtrilSession oSes, String sName) throws ElementNotFoundException {
View Full Code Here

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

              throw new DmsException(getTypeName()+" attribute "+aAttrs[a].name+" constraint violation "+aAttrs[a].cc.getClass().getName());
          }
        } // next
      } finally {
        if (oAdm!=null) {
          if (oAdm.isConnected()) oAdm.disconnect();
          if (oAdm.isOpen()) oAdm.close();         
        }       
      }
    } // fi
    AttributeMultiValue oAttr;
View Full Code Here

  @Override
  protected void setDocument(Document oDoc) {
    super.setDocument(oDoc);
    AtrilSession oSes = DAO.getAdminSession("Country");
    states(oSes);
    oSes.disconnect();
    oSes.close();   
  }
 
  public String getIsoCode() {
    return getString("id");
View Full Code Here

  public Collection<Client> getClients() throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AtrilSession oSes = DAO.getAdminSession("CaptureInvoice");
    CustomerAccount oAcc = new CustomerAccount(oSes.getDms().getDocument(getSessionAttribute("customer_account_docid")));
    Collection<Client> clients = oAcc.clients(oSes).list(oSes);
    oSes.disconnect();
    oSes.close();
    return clients;
  }
 
  @Override
View Full Code Here

      oUgrp.grantAll(oDoc);
      oOgrp.grantAll(oDoc);
      oAgrp.grantAll(oDoc);
    }
    oSes.commit();
    if (oSes.isConnected()) oSes.disconnect();
    if (oSes.isOpen()) oSes.close();
  }

  public void createGroups(AtrilSession oSesthrows NullPointerException, IllegalArgumentException {
    Log.out.debug("Begin CustomerAccount.createGroups()");
View Full Code Here

        if (d.type().name().equals("CaptureServiceFlavor")) {
          oSrvFlv = new CaptureServiceFlavor(oDms.getDocument(d.id()));
          oServFlvrs.put(oSrvFlv.uid(), oSrvFlv);
        }
      }
      oSes.disconnect();
      oSes.close();
    }
    oSrvFlv = oServFlvrs.get(sCaptureServiceFlavorId);
    if (null==oSrvFlv) throw new ElementNotFoundException("No CaptureService Flavor was found with Id. "+sCaptureServiceFlavorId);
    return oSrvFlv;
View Full Code Here

      AtrilSession oSes = DAO.getAdminSession("AccountingAccounts");
      List<Document> oLst = oSes.getDms().query("AccountingAccount$account_uuid='"+sUuid+"'");
      if (!oLst.isEmpty()) {
        oAacc = new AccountingAccount(oSes.getDms(), oLst.get(0).id());
      }
      oSes.disconnect();
      oSes.close();
      oSes = null;
      if (null==oAacc) {
        Log.out.error("No accounting account with uuid "+sUuid+" was found");
        conversionErrors.add(new SimpleError("No accounting account with uuid "+sUuid+" was found"));
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.