public void checkRuleAud() { if (ruleAud == null) throw REQUEST_MISSING_VALUE.exception("rule"); if (!ruleAud.getAllowed()) throw REQUEST_NOT_ALLOWED.exception(goods.getName(), arrival.getName()); }
public void checkDepartureAndArrival() { if (departure.getCode().equals(arrival.getCode())) throw DESTINATION_AND_ARRIVAL_ARE_THE_SAME.exception(); }