Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import org.mule.metadata.api.builder.BaseTypeBuilder;
import org.mule.metadata.api.model.MetadataFormat;
import org.mule.metadata.api.model.MetadataType;
import org.mule.runtime.api.metadata.MetadataContext;
import org.mule.runtime.api.metadata.resolving.InputTypeResolver;
import org.mule.runtime.api.metadata.resolving.OutputTypeResolver;
public class MyDataSenseResolver
implements InputTypeResolver<String>, OutputTypeResolver<String> {
@Override
public String getResolverName() {
return "MyDataSenseResolver";
}
@Override
public String getCategoryName() {
return "MyDataSenseResolver";
}
@Override
public MetadataType getInputMetadata(MetadataContext metadataContext, String entityKeyId){
return new BaseTypeBuilder(MetadataFormat.JAVA).numberType().build();
}
@Override
public MetadataType getOutputType(MetadataContext metadataContext, String entityKeyId){
return metadataContext.getTypeLoader().load(MyCustomObject.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.