All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.debugthug.validators.HoldInventoryValidator Maven / Gradle / Ivy

package com.github.debugthug.validators;

import java.util.List;

import com.github.debugthug.exceptions.IncorrectRequestException;
import com.github.debugthug.xo.Envelope;
import com.github.debugthug.xo.holdInventory.Hold;
import com.github.debugthug.xo.holdInventory.HoldInventoryRQ;

public class HoldInventoryValidator implements RequestValidator{

	public void validate(Envelope envelopeRQ) throws IncorrectRequestException {
		
		
		HoldInventoryRQ holdInventoryRQ=envelopeRQ.getBody().getHoldInventory().getStrInput().getHoldInventoryRQ();
		List holdList=holdInventoryRQ.getHoldList();
		
		if(holdList.size()==0)
			throw new IncorrectRequestException("No Any Flight Details specified to Hold");
			
		
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy