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

com.nhl.link.rest.provider.EntityUpdateReaderProcessor Maven / Gradle / Ivy

package com.nhl.link.rest.provider;

import com.nhl.link.rest.EntityUpdate;
import com.nhl.link.rest.runtime.meta.IMetadataService;
import com.nhl.link.rest.runtime.protocol.IEntityUpdateParser;

import javax.ws.rs.WebApplicationException;
import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.Collection;

class EntityUpdateReaderProcessor {

	private IEntityUpdateParser parser;
	private IMetadataService metadataService;

	EntityUpdateReaderProcessor(IEntityUpdateParser parser, IMetadataService metadataService) {
		this.parser = parser;
		this.metadataService = metadataService;
	}

	 Collection> read(Type entityUpdateType, InputStream entityStream) throws WebApplicationException {
		return parser.parse(metadataService.getEntityByType(entityUpdateType), entityStream);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy