Search in sources :

Example 6 with GlobalElementComponentModelModelProperty

use of org.mule.runtime.config.internal.dsl.model.extension.xml.property.GlobalElementComponentModelModelProperty in project mule by mulesoft.

the class MacroExpansionModuleModel method getModuleGlobalElements.

private List<ComponentModel> getModuleGlobalElements() {
    List<ComponentModel> moduleGlobalElements = new ArrayList<>();
    Optional<ConfigurationModel> config = getConfigurationModel();
    if (config.isPresent() && config.get().getModelProperty(GlobalElementComponentModelModelProperty.class).isPresent()) {
        GlobalElementComponentModelModelProperty globalElementComponentModelModelProperty = config.get().getModelProperty(GlobalElementComponentModelModelProperty.class).get();
        moduleGlobalElements = globalElementComponentModelModelProperty.getGlobalElements();
    }
    return moduleGlobalElements;
}
Also used : ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) GlobalElementComponentModelModelProperty(org.mule.runtime.config.internal.dsl.model.extension.xml.property.GlobalElementComponentModelModelProperty) ComponentModel(org.mule.runtime.config.internal.model.ComponentModel) ArrayList(java.util.ArrayList)

Aggregations

GlobalElementComponentModelModelProperty (org.mule.runtime.config.internal.dsl.model.extension.xml.property.GlobalElementComponentModelModelProperty)6 ConfigurationModel (org.mule.runtime.api.meta.model.config.ConfigurationModel)5 Matchers.containsString (org.hamcrest.Matchers.containsString)4 Test (org.junit.Test)4 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)4 OperationModel (org.mule.runtime.api.meta.model.operation.OperationModel)4 OperationComponentModelModelProperty (org.mule.runtime.config.internal.dsl.model.extension.xml.property.OperationComponentModelModelProperty)4 ComponentModel (org.mule.runtime.config.internal.model.ComponentModel)2 ArrayList (java.util.ArrayList)1 VoidType (org.mule.metadata.api.model.VoidType)1 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)1 ConfigurationDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ConfigurationDeclarer)1 ParameterModel (org.mule.runtime.api.meta.model.parameter.ParameterModel)1 NoReconnectionStrategyModelProperty (org.mule.runtime.extension.internal.property.NoReconnectionStrategyModelProperty)1