Package no.kommune.bergen.soa.svarut.dto

Examples of no.kommune.bergen.soa.svarut.dto.ShipmentPolicy


  /**
   * Lokaliserer korrekt Dispatcher for forsendelsen
   */
  public Dispatcher getDispatcher(Forsendelse forsendelse) {
    ShipmentPolicy sp = ShipmentPolicy.fromValue(forsendelse.getShipmentPolicy());
    for (Dispatcher dispatcher : dispatchers) {
      AbstractDispatcher ad = (AbstractDispatcher) dispatcher;
      if (ad.handlesShipmentPolicy(sp)) {
        ad.verify(forsendelse);
        return ad;
      }
    }
    throw new UserException("No dispatcher found for the given shipmentpolicy : " + sp.value());
  }
View Full Code Here


  /**
   * Lokaliserer korrekt Dispatcher for forsendelsen
   */
  public Dispatcher getDispatcher(Forsendelse forsendelse) {
    ShipmentPolicy sp = ShipmentPolicy.fromValue(forsendelse.getShipmentPolicy());
    for (Dispatcher dispatcher : dispatchers) {
      AbstractDispatcher ad = (AbstractDispatcher) dispatcher;
      if (ad.handlesShipmentPolicy(sp)) {
        ad.verify(forsendelse);
        return ad;
      }
    }
    throw new UserException("No dispatcher found for the given shipmentpolicy : " + sp.value());
  }
View Full Code Here

    result.setEmail( rq.getEpost() );
    result.setReplyTo( rq.getReplyTo() );
    result.setPrintFarge( rq.isFargePrint() );
    result.setAnsvarsSted(rq.getAnsvarsSted());
    result.setKonteringkode(rq.getKonteringkode());
    ShipmentPolicy forsendelsesMate = rq.getForsendelsesMate();
    if (forsendelsesMate != null) {
      result.setShipmentPolicy( forsendelsesMate.value() );
    }
    if (log.isDebugEnabled()) log.debug( "Returning " + result );
    return result;
  }
View Full Code Here

    public void setShipmentParams(List<DispatchPolicyShipmentParams> shipmentParams) {
        this.shipmentParams = shipmentParams;
    }

    public long getLeadTimeBeforePrintInMilliseconds(Forsendelse f) {
        ShipmentPolicy sp = ShipmentPolicy.fromValue(f.getShipmentPolicy());
        DispatchPolicyShipmentParams p = getDispatchPolicyShipmentParam(sp);
        if ( p == null ) throw new IllegalArgumentException("Unhandled ShipmentPolicy:" + sp);
        return p.getLeadTimeBeforePrint()*24*60*60*1000;
    }
View Full Code Here

        return p.getLeadTimeBeforePrint()*24*60*60*1000;
    }


    public long getLeadTimeBeforeStopInMilliseconds(Forsendelse f){
        ShipmentPolicy sp = ShipmentPolicy.fromValue(f.getShipmentPolicy());
        DispatchPolicyShipmentParams p = getDispatchPolicyShipmentParam(sp);
        if ( p == null ) throw new IllegalArgumentException("Unhandled ShipmentPolicy:" + sp);
        return p.getLeadTimeBeforeStop();
    }
View Full Code Here

TOP

Related Classes of no.kommune.bergen.soa.svarut.dto.ShipmentPolicy

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.