NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/converter/ToGetPRSAccountExemptionsNdsResponseConverter.java
/**
	 * @param response
	 *            - This is the back office response that needs transforming 
	 * @return - the dashboard nds response
	 */
@param response
- This is the back office response that needs transforming
@return - the dashboard nds response
@param response - This is the back office response that needs transforming @return - the dashboard nds response
@Converter
	public static GetPRSAccountExemptionsNdsResponse converting(GetPRSAccountExemptionsResponse response) {
		logger.info("Starting Conversion For getting GetPRSAccountExemptionsNdsResponse");
		GetPRSAccountExemptionsNdsResponse dashboardResponse = new GetPRSAccountExemptionsNdsResponse();
		dashboardResponse.setDashboardDetails(new DashboardDetails());		
		List<RegisteredExemptionDetail> registeredExemptions = new ArrayList<RegisteredExemptionDetail>();		
		dashboardResponse.getDashboardDetails().setExemptionDetailList(registeredExemptions);
		if( response.getExemptions() != null ){
			List<Exemption> exemptions = response.getExemptions().getExemption();
			for( Exemption exemption : exemptions){
				RegisteredExemptionDetail registeredExemption = new RegisteredExemptionDetail();
				registeredExemption.setLandlord(exemption.getLandlord());
				registeredExemption.setExemptionReference(exemption.getExemptionReference());
                registeredExemption.setReferenceId(exemption.getExemptionRefNo() == null ? null :exemption.getExemptionRefNo().toString());
                registeredExemption.setDescription(exemption.getPWSDescription());
                registeredExemption.setStartDate(XMLGregorianCalendarToZonedDateTimeConverter.convert(exemption.getRegisteredDate()));
                registeredExemption.setEndDate(XMLGregorianCalendarToZonedDateTimeConverter.convert(exemption.getEndDate()));
                registeredExemption.setAddress(exemption.getAddress());				
                registeredExemptions.add(registeredExemption);
			}
		}
		return dashboardResponse;
	}
@ Converter public static GetPRSAccountExemptionsNdsResponse converting ( GetPRSAccountExemptionsResponse response ) { logger . info ( "Starting Conversion For getting GetPRSAccountExemptionsNdsResponse" ) ; GetPRSAccountExemptionsNdsResponse dashboardResponse = new GetPRSAccountExemptionsNdsResponse ( ) ; dashboardResponse . setDashboardDetails ( new DashboardDetails ( ) ) ; List < RegisteredExemptionDetail > registeredExemptions = new ArrayList < RegisteredExemptionDetail > ( ) ; dashboardResponse . getDashboardDetails ( ) . setExemptionDetailList ( registeredExemptions ) ; if ( response . getExemptions ( ) != null ) { List < Exemption > exemptions = response . getExemptions ( ) . getExemption ( ) ; for ( Exemption exemption : exemptions ) { RegisteredExemptionDetail registeredExemption = new RegisteredExemptionDetail ( ) ; registeredExemption . setLandlord ( exemption . getLandlord ( ) ) ; registeredExemption . setExemptionReference ( exemption . getExemptionReference ( ) ) ; registeredExemption . setReferenceId ( exemption . getExemptionRefNo ( ) == null ? null : exemption . getExemptionRefNo ( ) . toString ( ) ) ; registeredExemption . setDescription ( exemption . getPWSDescription ( ) ) ; registeredExemption . setStartDate ( XMLGregorianCalendarToZonedDateTimeConverter . convert ( exemption . getRegisteredDate ( ) ) ) ; registeredExemption . setEndDate ( XMLGregorianCalendarToZonedDateTimeConverter . convert ( exemption . getEndDate ( ) ) ) ; registeredExemption . setAddress ( exemption . getAddress ( ) ) ; registeredExemptions . add ( registeredExemption ) ; } } return dashboardResponse ; }
@param response
            - This is the back office response that needs transforming
 @return - the dashboard nds response
@param response - This is the back office response that needs transforming @return - the dashboard nds response
//setup the response ready for data //convert the exemptions