use of org.mule.runtime.api.metadata.resolving.AttributesTypeResolver in project mule by mulesoft.
the class MetadataScopeAdapter method getCategoryName.
private String getCategoryName(Supplier<? extends OutputTypeResolver> outputResolver, Supplier<? extends AttributesTypeResolver> attributesResolver, Map<String, Supplier<? extends InputTypeResolver>> inputResolvers) {
OutputTypeResolver outputTypeResolver = outputResolver.get();
if (!(outputTypeResolver instanceof NullMetadataResolver)) {
return outputTypeResolver.getCategoryName();
}
AttributesTypeResolver attributesTypeResolver = attributesResolver.get();
if (!(attributesTypeResolver instanceof NullMetadataResolver)) {
return attributesTypeResolver.getCategoryName();
}
for (Supplier<? extends InputTypeResolver> supplier : inputResolvers.values()) {
InputTypeResolver inputTypeResolver = supplier.get();
if (!(inputTypeResolver instanceof NullMetadataResolver)) {
return inputTypeResolver.getCategoryName();
}
}
throw new IllegalModelDefinitionException("Unable to create Keys Resolver. A Keys Resolver is being defined " + "without defining an Output Resolver, Input Resolver nor Attributes Resolver");
}
Aggregations