public class ApplicationModel extends Object
ApplicationModel holds a representation of all the artifact configuration using an abstract model to represent any
configuration option.
This model is represented by a set of ComponentModel. Each
ComponentModel holds a piece of configuration and may have children ComponentModels as defined in the artifact
configuration.
Once the set of ComponentModel gets created from the application
ConfigFiles the ApplicationModel executes a set of common
validations dictated by the configuration semantics.| Modifier and Type | Field and Description |
|---|---|
static String |
ANNOTATION_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
ANNOTATIONS_ELEMENT_IDENTIFIER |
static String |
BATCH_NAMESPACE |
static String |
CLASS_ATTRIBUTE |
static String |
CONFIGURATION_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
CONFIGURATION_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
CONFIGURATION_PROPERTIES |
static String |
CONFIGURATION_PROPERTIES_ELEMENT |
static String |
CUSTOM_TRANSFORMER |
static org.mule.runtime.api.component.ComponentIdentifier |
CUSTOM_TRANSFORMER_IDENTIFIER |
static String |
DATA_WEAVE |
static String |
DESCRIPTION_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
DESCRIPTION_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
DOC_DESCRIPTION_IDENTIFIER |
static String |
DOC_NAMESPACE |
static String |
ERROR_HANDLER |
static org.mule.runtime.api.component.ComponentIdentifier |
ERROR_HANDLER_IDENTIFIER |
static String |
ERROR_MAPPING |
static org.mule.runtime.api.component.ComponentIdentifier |
ERROR_MAPPING_IDENTIFIER |
static String |
EXCEPTION_STRATEGY_REFERENCE_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
EXCEPTION_STRATEGY_REFERENCE_IDENTIFIER |
static String |
FLOW_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
FLOW_IDENTIFIER |
static String |
GLOBAL_PROPERTY |
static org.mule.runtime.api.component.ComponentIdentifier |
GLOBAL_PROPERTY_IDENTIFIER |
static String |
HTTP_POLICY |
static org.mule.runtime.api.component.ComponentIdentifier |
HTTP_PROXY_OPERATION_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
HTTP_PROXY_POLICY_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
HTTP_PROXY_SOURCE_POLICY_IDENTIFIER |
static String |
HTTP_TRANSPORT_NAMESPACE |
static String |
IMPORT_ELEMENT |
static String |
JMS_NAMESPACE |
static String |
MAX_REDELIVERY_ATTEMPTS_ROLLBACK_ES_ATTRIBUTE |
static org.mule.runtime.api.component.ComponentIdentifier |
MODULE_OPERATION_CHAIN |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_DOMAIN_IDENTIFIER |
static String |
MULE_DOMAIN_ROOT_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_EE_DOMAIN_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_PROPERTIES_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_PROPERTY_IDENTIFIER |
static String |
MULE_ROOT_ELEMENT |
static String |
MULE_SECURITY_NAMESPACE |
static String |
MULE_XML_NAMESPACE |
static org.mule.runtime.api.component.ComponentIdentifier |
MUNIT_AFTER_SUITE_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MUNIT_AFTER_TEST_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MUNIT_BEFORE_SUITE_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MUNIT_BEFORE_TEST_IDENTIFIER |
static String |
MUNIT_PREFIX |
static org.mule.runtime.api.component.ComponentIdentifier |
MUNIT_TEST_IDENTIFIER |
static String |
NAME_ATTRIBUTE |
static String |
OBJECT_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
OBJECT_IDENTIFIER |
static String |
PARSER_TEST_NAMESPACE |
static String |
PGP_NAMESPACE |
static String |
POLICY_ROOT_ELEMENT |
static String |
PROPERTIES_ELEMENT |
static String |
PROPERTY_ELEMENT |
static String |
REDELIVERY_POLICY_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
REDELIVERY_POLICY_IDENTIFIER |
static String |
REFERENCE_ATTRIBUTE |
static String |
SECURITY_MANAGER |
static org.mule.runtime.api.component.ComponentIdentifier |
SECURITY_MANAGER_IDENTIFIER |
static String |
SPRING_SECURITY_NAMESPACE |
static String |
SUBFLOW_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SUBFLOW_IDENTIFIER |
static String |
TEST_NAMESPACE |
static org.mule.runtime.api.component.ComponentIdentifier |
TRANSFORMER_IDENTIFIER |
static String |
TRANSFORMER_REFERENCE_ELEMENT |
static String |
TRANSPORT_NAMESPACE |
static String |
TYPE_ES_ATTRIBUTE |
static String |
VALUE_ATTRIBUTE |
static String |
VM_NAMESPACE |
static String |
WHEN_CHOICE_ES_ATTRIBUTE |
static String |
XSL_NAMESPACE |
| Constructor and Description |
|---|
ApplicationModel(ArtifactConfig artifactConfig,
org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration,
ResourceProvider externalResourceProvider)
Creates an {code ApplicationModel} from a
ArtifactConfig. |
ApplicationModel(ArtifactConfig artifactConfig,
org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration,
Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels,
Map<String,String> deploymentProperties,
Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties,
Optional<ComponentBuildingDefinitionRegistry> componentBuildingDefinitionRegistry,
boolean runtimeMode,
ResourceProvider externalResourceProvider)
Creates an {code ApplicationModel} from a
ArtifactConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
executeOnEveryComponentTree(Consumer<ComponentModel> task) |
void |
executeOnEveryFlow(Consumer<ComponentModel> task) |
void |
executeOnEveryMuleComponentTree(Consumer<ComponentModel> task) |
void |
executeOnEveryRootElement(Consumer<ComponentModel> task) |
Optional<ComponentModel> |
findComponentDefinitionModel(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier) |
ComponentModel |
findComponentDefinitionModel(Node element) |
Optional<ComponentModel> |
findTopLevelNamedComponent(String name)
Find a named component configuration.
|
Optional<ComponentConfiguration> |
findTopLevelNamedElement(String name)
Find a named component configuration.
|
org.mule.runtime.api.component.ConfigurationProperties |
getConfigurationProperties() |
ComponentModel |
getRootComponentModel()
TODO MULE-9688: When the model it's made immutable we will also provide the parent component for navigation and this will not
be needed anymore.
|
void |
resolveComponentTypes()
Resolves the types of each component model when possible.
|
public static final String MULE_ROOT_ELEMENT
public static final String MULE_DOMAIN_ROOT_ELEMENT
public static final String IMPORT_ELEMENT
public static final String POLICY_ROOT_ELEMENT
public static final String ERROR_HANDLER
public static final String ERROR_MAPPING
public static final String MAX_REDELIVERY_ATTEMPTS_ROLLBACK_ES_ATTRIBUTE
public static final String WHEN_CHOICE_ES_ATTRIBUTE
public static final String TYPE_ES_ATTRIBUTE
public static final String EXCEPTION_STRATEGY_REFERENCE_ELEMENT
public static final String PROPERTY_ELEMENT
public static final String NAME_ATTRIBUTE
public static final String REFERENCE_ATTRIBUTE
public static final String VALUE_ATTRIBUTE
public static final String TRANSFORMER_REFERENCE_ELEMENT
public static final String ANNOTATION_ELEMENT
public static final String CONFIGURATION_ELEMENT
public static final String DATA_WEAVE
public static final String CUSTOM_TRANSFORMER
public static final String DESCRIPTION_ELEMENT
public static final String PROPERTIES_ELEMENT
public static final String FLOW_ELEMENT
public static final String SUBFLOW_ELEMENT
public static final String REDELIVERY_POLICY_ELEMENT
public static final String TEST_NAMESPACE
public static final String DOC_NAMESPACE
public static final String SPRING_SECURITY_NAMESPACE
public static final String MULE_SECURITY_NAMESPACE
public static final String MULE_XML_NAMESPACE
public static final String PGP_NAMESPACE
public static final String XSL_NAMESPACE
public static final String TRANSPORT_NAMESPACE
public static final String JMS_NAMESPACE
public static final String VM_NAMESPACE
public static final String HTTP_TRANSPORT_NAMESPACE
public static final String BATCH_NAMESPACE
public static final String PARSER_TEST_NAMESPACE
public static final String GLOBAL_PROPERTY
public static final String SECURITY_MANAGER
public static final String CONFIGURATION_PROPERTIES_ELEMENT
public static final String OBJECT_ELEMENT
public static final org.mule.runtime.api.component.ComponentIdentifier ERROR_HANDLER_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier EXCEPTION_STRATEGY_REFERENCE_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier ERROR_MAPPING_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MULE_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MULE_DOMAIN_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MULE_EE_DOMAIN_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MULE_PROPERTY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MULE_PROPERTIES_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier ANNOTATIONS_ELEMENT_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier TRANSFORMER_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier CONFIGURATION_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier CUSTOM_TRANSFORMER_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier DOC_DESCRIPTION_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier DESCRIPTION_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier OBJECT_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier FLOW_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SUBFLOW_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier REDELIVERY_POLICY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier GLOBAL_PROPERTY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SECURITY_MANAGER_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier CONFIGURATION_PROPERTIES
public static final org.mule.runtime.api.component.ComponentIdentifier MODULE_OPERATION_CHAIN
public static final String MUNIT_PREFIX
public static final org.mule.runtime.api.component.ComponentIdentifier MUNIT_TEST_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MUNIT_BEFORE_TEST_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MUNIT_BEFORE_SUITE_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MUNIT_AFTER_TEST_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier MUNIT_AFTER_SUITE_IDENTIFIER
public static final String HTTP_POLICY
public static final org.mule.runtime.api.component.ComponentIdentifier HTTP_PROXY_SOURCE_POLICY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier HTTP_PROXY_OPERATION_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier HTTP_PROXY_POLICY_IDENTIFIER
public static final String CLASS_ATTRIBUTE
public ApplicationModel(ArtifactConfig artifactConfig, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, ResourceProvider externalResourceProvider) throws Exception
ArtifactConfig.
A set of validations are applied that may make creation fail.artifactConfig - the mule artifact configuration content.artifactDeclaration - an ArtifactDeclarationException - when the application configuration has semantic errors.public ApplicationModel(ArtifactConfig artifactConfig, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels, Map<String,String> deploymentProperties, Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties, Optional<ComponentBuildingDefinitionRegistry> componentBuildingDefinitionRegistry, boolean runtimeMode, ResourceProvider externalResourceProvider) throws Exception
ArtifactConfig.
A set of validations are applied that may make creation fail.artifactConfig - the mule artifact configuration content.artifactDeclaration - an ArtifactDeclarationextensionModels - Set of extensionModels that will be used to type componentModelsparentConfigurationProperties - the ConfigurationProperties of the parent artifact. For instance, application
will receive the domain resolver.componentBuildingDefinitionRegistry - an optional ComponentBuildingDefinitionRegistry used to correlate items in
this model to their definitionsruntimeMode - true implies the mule application should behave as a runtime app (e.g.: smart connectors will be macro
expanded) false implies the mule is being created from a tooling perspective.externalResourceProvider - the provider for configuration properties files and ${file::name.txt} placeholdersException - when the application configuration has semantic errors.public void resolveComponentTypes()
public ComponentModel findComponentDefinitionModel(Node element)
element - element which was the source of the ComponentModel.ComponentModel created from the element.public Optional<ComponentModel> findComponentDefinitionModel(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
public void executeOnEveryComponentTree(Consumer<ComponentModel> task)
public void executeOnEveryMuleComponentTree(Consumer<ComponentModel> task)
public void executeOnEveryRootElement(Consumer<ComponentModel> task)
public void executeOnEveryFlow(Consumer<ComponentModel> task)
public ComponentModel getRootComponentModel()
public Optional<ComponentModel> findTopLevelNamedComponent(String name)
name - the expected value for the name attribute configuration.Optionalpublic Optional<ComponentConfiguration> findTopLevelNamedElement(String name)
name - the expected value for the name attribute configuration.Optionalpublic org.mule.runtime.api.component.ConfigurationProperties getConfigurationProperties()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.