Package es.ipsa.atril.exceptions

Examples of es.ipsa.atril.exceptions.ElementNotFoundException


    if (sConcept.length()==0) throw new NullPointerException("BillNote.create() concept may not be empty");
    if (sEmployeeUuid.length()==0) throw new NullPointerException("BillNote.create() employee may not be empty");
    Employee emee = new Employee();
    Document dmee = emee.exists(oSes, "employee_uuid", sEmployeeUuid);
    if (null==dmee)
      throw new ElementNotFoundException("BillNotes.create()  Employee "+sEmployeeUuid+" not found");
    emee.setDocument(dmee);
    Log.out.debug("got employee "+sEmployeeUuid);
    BillNote bill = new BillNote(oSes, this);
    bill.put("service_type", sServiceType);
    bill.put("concept", sSanitizedConcept);
View Full Code Here


    }
    SortableList<Document> oLst = (SortableList<Document>) oIdx.query("business_name:\"" + sSanitizedBusinessName + "\" AND " + DocumentIndexer.AdditionalDocumentFields.DOCUMENT_TYPE_NAME.value() + ":" + sTypeName);
    if (oLst.isEmpty()) {
      oSes.disconnect();
      oSes.close();
      throw new ElementNotFoundException(sBusinessName+" not found");
    } else {
      String sId = oLst.get(0).id();
      oSes.disconnect();
      oSes.close();
      return sId;
View Full Code Here

    }
    SortableList<Document> oLst = (SortableList<Document>) oIdx.query("tax_id:\"" + sTaxId + "\" AND " + DocumentIndexer.AdditionalDocumentFields.DOCUMENT_TYPE_NAME.value() + ":" + sTypeName);
    if (oLst.isEmpty()) {
      oSes.disconnect();
      oSes.close();
      throw new ElementNotFoundException(sTaxId+" not found");
    } else {
      String sId = oLst.get(0).id();
      oSes.disconnect();
      oSes.close();
      return sId;     
View Full Code Here

    Dms oDms = oSes.getDms();
    SortableList<Document> oLst = oDms.query("User$email='"+sEmailAddr.toLowerCase().trim()+"'");
    if (oLst.isEmpty()) {
      oSes.disconnect();
      oSes.close();
      throw new ElementNotFoundException("No user found with email "+sEmailAddr.toLowerCase().trim());
    } else {
      String sUsrId = oLst.get(0).id();     
      oSes.disconnect();
      oSes.close();
      return sUsrId;     
View Full Code Here

    Dms oDms = oSes.getDms();
    SortableList<Document> oLst = oDms.query("User$user_uuid='"+sUuid+"'");
    if (oLst.isEmpty()) {
      oSes.disconnect();
      oSes.close();
      throw new ElementNotFoundException("No user found with UUID "+sUuid);
    } else {
      String sUsrId = oLst.get(0).id();     
      oSes.disconnect();
      oSes.close();
      return sUsrId;     
View Full Code Here

  public void save(AtrilSession oSes)
    throws ClassCastException, RuntimeException, IllegalStateException, NullPointerException, DmsDocumentModificationException,
    NotYetConnectedException, DmsException, RecentlyUsedPasswordException, OldPasswordWrongOnPasswordChangeException {
   
    if (getEmail()==null) throw new NullPointerException("User e-mail cannot be null");
    if (exists(oSes,"user_uuid",sNickName)==null) throw new ElementNotFoundException("Cannot find any user with uuid "+sNickName);

    String sAllowedServices = "";
    for (CaptureService s : allowedServices())
      sAllowedServices += (sAllowedServices.length()==0 ? "" : ",") + String.valueOf(s.toInt());
    put ("allowed_services", sAllowedServices);
View Full Code Here

TOP

Related Classes of es.ipsa.atril.exceptions.ElementNotFoundException

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.