protected ModelClass<?> getModelClass(ServiceType serviceType, ItemType itemType)
throws PlatformLayerClientException {
ServiceProvider serviceProvider = getServiceProvider(serviceType);
if (serviceProvider == null) {
log.warn("Unknown serviceType: " + serviceType);
throw new PlatformLayerClientException("Service type not recognized: " + serviceType.getKey());
}
ModelClass<?> modelClass = serviceProvider.getModels().find(itemType);
if (modelClass == null) {
log.warn("Unknown itemtype: " + itemType);
throw new PlatformLayerClientException("Item type not recognized: " + itemType.getKey());
}
return modelClass;
}