1 package org.onap.so.apihandlerinfra;
4 import javax.ws.rs.core.UriBuilder;
5 import org.springframework.core.convert.TypeDescriptor;
6 import org.springframework.stereotype.Component;
9 public class HealthCheckConverter {
12 public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
13 if (sourceType.getType() == String.class && targetType.getType() == Subsystem.class) {
14 return SoSubsystems.valueOf(((String) source).toUpperCase());
15 } else if (sourceType.getType() == String.class && targetType.getType() == URI.class) {
16 return UriBuilder.fromUri((String) source).build();