use of org.mule.runtime.api.meta.model.display.DisplayModel in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method assertParameterExample.
private void assertParameterExample(ParameterDeclaration param, String example) {
DisplayModel display = param.getDisplayModel();
assertThat(display.getExample(), is(example));
}
use of org.mule.runtime.api.meta.model.display.DisplayModel in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method assertParameterDisplayName.
private void assertParameterDisplayName(ParameterDeclaration param, String displayName) {
DisplayModel display = param.getDisplayModel();
assertThat(display.getDisplayName(), is(displayName));
}
use of org.mule.runtime.api.meta.model.display.DisplayModel in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method assertParameterSummary.
private void assertParameterSummary(ParameterDeclaration param, String summary) {
DisplayModel display = param.getDisplayModel();
assertThat(display.getSummary(), is(summary));
}
use of org.mule.runtime.api.meta.model.display.DisplayModel in project mule by mulesoft.
the class XmlExtensionLoaderDelegate method extractParameter.
private void extractParameter(ParameterizedDeclarer parameterizedDeclarer, ComponentModel param, ParameterRole role) {
Map<String, String> parameters = param.getParameters();
String receivedInputType = parameters.get(TYPE_ATTRIBUTE);
final LayoutModel.LayoutModelBuilder layoutModelBuilder = builder();
if (parseBoolean(parameters.get(PASSWORD))) {
layoutModelBuilder.asPassword();
}
layoutModelBuilder.order(getOrder(parameters.get(ORDER_ATTRIBUTE)));
layoutModelBuilder.tabName(getTab(parameters.get(TAB_ATTRIBUTE)));
final DisplayModel displayModel = getDisplayModel(param);
MetadataType parameterType = extractType(receivedInputType);
ParameterDeclarer parameterDeclarer = getParameterDeclarer(parameterizedDeclarer, parameters);
parameterDeclarer.describedAs(getDescription(param)).withLayout(layoutModelBuilder.build()).withDisplayModel(displayModel).withRole(role).ofType(parameterType);
}
Aggregations