use of com.liferay.apio.architect.logger.ApioLogger in project com-liferay-apio-architect by liferay.
the class MessageMapperBaseManager method computeMessageMappers.
/**
* Computes the list of managed message mappers and uses the provided
* consumer to store them.
*/
protected void computeMessageMappers() {
Stream<String> stream = getKeyStream();
stream.forEach(key -> {
T formMessageMapper = serviceTrackerMap.getService(key);
try {
MediaType mediaType = MediaType.valueOf(key);
_storeBiConsumer.accept(mediaType, formMessageMapper);
} catch (IllegalArgumentException iae) {
Optional<ApioLogger> optional = getLoggerOptional();
optional.ifPresent(apioLogger -> apioLogger.warning("Message mapper has invalid media type: " + key));
}
});
}
Aggregations