Examples of ElementNotFoundException


Examples of es.ipsa.atril.exceptions.ElementNotFoundException

  public Attr[] attributes() {
    return null;
  }

  public Client seek(AtrilSession oSes, String sClient) throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    if (sClient==null) throw new ElementNotFoundException("Client may not be null");
    if (sClient.length()==0) throw new ElementNotFoundException("Client may not be empty");
    final String sSanitizedBusinessName =  Gadgets.removeChars(sClient, "\"*?").trim().toUpperCase();;
    for (Client c : super.list(oSes)) {
      if (c.getBusinessName().equals(sSanitizedBusinessName) || c.getBusinessName().equalsIgnoreCase(sClient) || c.getId().equals(sClient) || c.getTaxId().equalsIgnoreCase(sClient))
        return c;
    }
    throw new ElementNotFoundException("Client "+sClient+"not found");
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

    super("CustomerAccount");
    if (null==oUsr) throw new NullPointerException("User cannot be null");
    Dms oDms = oSes.getDms();   
    List<Document> oLst =  oDms.query("CustomerAccount$account_id='" + oUsr.getCustomerAccountId() + "'");
    if (oLst.isEmpty())
      throw new ElementNotFoundException("CustomerAccount for user not found");
    else
      load(oSes, oLst.get(0).id());
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

      if (d.type().name().equals(t.getTypeName())) {
        t.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
    if (t.getDocument()==null) throw new ElementNotFoundException(t.getTypeName()+" document not found");
    return t;
   
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

  }

  public static CustomerAccount forUuid(AtrilSession oSes, String sUuidthrows ElementNotFoundException, NullPointerException, IllegalArgumentException {
    Dms oDms = oSes.getDms();
    SortableList<Document> oLst = oDms.query("CustomerAccount$account_id='"+sUuid+"'");
    if (oLst.isEmpty()) throw new ElementNotFoundException("Could not find any CustomerAccount with unique id "+sUuid);
    return new CustomerAccount(oDms.getDocument(oLst.get(0).id()));
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

      if (d.type().name().equals(o.getTypeName())) {
      o.setDocument(oSes.getDms().getDocument(d.id()));
      break;
      }
    } // next
    if (o.getDocument()==null) throw new ElementNotFoundException(o.getTypeName()+" document not found");
    return o;     
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

        if (d.type().name().equals(a.getTypeName())) {
          a.setDocument(oSes.getDms().getDocument(d.id()));
          break;
        }
      } // next
      if (a.getDocument()==null) throw new ElementNotFoundException(a.getTypeName()+" document not found");
      return a;
   
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

        if (d.type().name().equals(u.getTypeName())) {
          u.setDocument(oSes.getDms().getDocument(d.id()));
          break;
        }
      } // next
      if (u.getDocument()==null) throw new ElementNotFoundException(u.getTypeName()+" document not found");
      Log.out.debug("End com.zesped.model.Users.top() : " + u);
      return u;
   
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

  public Fields fields(AtrilSession oSes) {
    Dms oDms = oSes.getDms();
    for (Document d : getDocument().children())
      if (d.type().name().equals("Fields"))
        return new Fields(oDms.getDocument(d.id()));
    throw new ElementNotFoundException("Fields not found");
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

        Scanner s = new Scanner(oDms.getDocument(d.id()));
        if (s.name().equals(sScannerName))
          return s;
      }
    }
    throw new ElementNotFoundException("Scanner "+sScannerName+" not found");
  }
View Full Code Here

Examples of es.ipsa.atril.exceptions.ElementNotFoundException

    NullPointerException, NotYetConnectedException, DmsException, ElementNotFoundException, InstantiationException, IllegalAccessException {
    Iterator<AccountingAccount> oItr = taxPayer(oSes.getDms()).accounts(oSes).list(oSes).iterator();
    if (oItr.hasNext())
      return createTicket(oSes, oItr.next());
    else
      throw new ElementNotFoundException("No default accounting account found for ticket");
  }
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.