return FieldProviderResponse.NOT_HANDLED;
}
//look for any map field metadata that was previously added for the requested field
for (Map.Entry<String, FieldMetadata> entry : addMetadataFromFieldTypeRequest.getPresentationAttributes().entrySet()) {
if (entry.getKey().startsWith(addMetadataFromFieldTypeRequest.getRequestedPropertyName() + FieldManager.MAPFIELDSEPARATOR)) {
TypeLocatorImpl typeLocator = new TypeLocatorImpl(new TypeResolver());
Type myType = null;
//first, check if an explicit type was declared
String valueClass = ((BasicFieldMetadata) entry.getValue()).getMapFieldValueClass();
if (valueClass != null) {
myType = typeLocator.entity(valueClass);
}
if (myType == null) {
SupportedFieldType fieldType = ((BasicFieldMetadata) entry.getValue()).getExplicitFieldType();
Class<?> basicJavaType = getBasicJavaType(fieldType);
if (basicJavaType != null) {
myType = typeLocator.basic(basicJavaType);
}
}
if (myType == null) {
java.lang.reflect.Type genericType = addMetadataFromFieldTypeRequest.getRequestedField().getGenericType();
if (genericType instanceof ParameterizedType) {
ParameterizedType pType = (ParameterizedType) genericType;
Class<?> clazz = (Class<?>) pType.getActualTypeArguments()[1];
Class<?>[] entities = addMetadataFromFieldTypeRequest.getDynamicEntityDao().getAllPolymorphicEntitiesFromCeiling(clazz);
if (!ArrayUtils.isEmpty(entities)) {
myType = typeLocator.entity(entities[entities.length-1]);
}
}
}
if (myType == null) {
throw new IllegalArgumentException("Unable to establish the type for the property (" + entry