Search in sources :

Example 1 with DisplayModel

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));
}
Also used : DisplayModel(org.mule.runtime.api.meta.model.display.DisplayModel)

Example 2 with DisplayModel

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));
}
Also used : DisplayModel(org.mule.runtime.api.meta.model.display.DisplayModel)

Example 3 with DisplayModel

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));
}
Also used : DisplayModel(org.mule.runtime.api.meta.model.display.DisplayModel)

Example 4 with DisplayModel

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);
}
Also used : ParameterDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclarer) DisplayModel(org.mule.runtime.api.meta.model.display.DisplayModel) MetadataType(org.mule.metadata.api.model.MetadataType) LayoutModel(org.mule.runtime.api.meta.model.display.LayoutModel)

Aggregations

DisplayModel (org.mule.runtime.api.meta.model.display.DisplayModel)4 MetadataType (org.mule.metadata.api.model.MetadataType)1 ParameterDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclarer)1 LayoutModel (org.mule.runtime.api.meta.model.display.LayoutModel)1