class Oadr20bVENEiEventService {

	public boolean isUpdatedEvent(VtnSessionConfiguration vtnConfiguration, String requestId, OadrEvent event)
			throws Oadr20bDistributeEventApplicationLayerException {
		String eventID = event.getEiEvent().getEventDescriptor().getEventID();
		long modificationNumber = event.getEiEvent().getEventDescriptor().getModificationNumber();
		OadrEvent oadrEvent = getOadrEvents(vtnConfiguration).get(eventID);
		if (oadrEvent == null) {
			return false;
		}
		long knownModificationNumber = oadrEvent.getEiEvent().getEventDescriptor().getModificationNumber();
		if (knownModificationNumber > modificationNumber) {
			throw new Oadr20bDistributeEventApplicationLayerException(
					"registred event " + eventID + " has a modification number higher than retrieved event",
					Oadr20bResponseBuilders.newOadr20bResponseBuilder(requestId, HttpStatus.NOT_ACCEPTABLE_406, "")
							.build());
		}

		return modificationNumber > knownModificationNumber;
	}

}