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 String |
ANNOTATIONS |
static org.mule.runtime.api.component.ComponentIdentifier |
ANNOTATIONS_ELEMENT_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
ANNOTATIONS_IDENTIFIER |
static String |
BATCH_NAMESPACE |
static String |
CONFIGURATION_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
CONFIGURATION_IDENTIFIER |
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 |
FILTER_ELEMENT_SUFFIX |
static String |
FILTER_REFERENCE_ELEMENT |
static String |
FLOW_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
FLOW_IDENTIFIER |
static String |
FLOW_REF_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
FLOW_REF_IDENTIFIER |
static String |
GLOBAL_PROPERTY |
static org.mule.runtime.api.component.ComponentIdentifier |
GLOBAL_PROPERTY_IDENTIFIER |
static String |
HTTP_TRANSPORT_NAMESPACE |
static String |
INTERCEPTOR_STACK_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
INTERCEPTOR_STACK_IDENTIFIER |
static String |
JMS_NAMESPACE |
static String |
MAX_REDELIVERY_ATTEMPTS_ROLLBACK_ES_ATTRIBUTE |
static String |
MESSAGE_FILTER_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
MESSAGE_FILTER_ELEMENT_IDENTIFIER |
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 String |
NAME_ATTRIBUTE |
static String |
PARSER_TEST_NAMESPACE |
static String |
PGP_NAMESPACE |
static org.mule.runtime.api.component.ComponentIdentifier |
POLICY_IDENTIFIER |
static String |
POLICY_ROOT_ELEMENT |
static String |
PROCESSING_STRATEGY_ATTRIBUTE |
static String |
PROCESSING_STRATEGY_FACTORY_ATTRIBUTE |
static org.mule.runtime.api.component.ComponentIdentifier |
PROCESSOR_IDENTIFIER |
static String |
PROCESSOR_REFERENCE_ELEMENT |
static String |
PROPERTIES_ELEMENT |
static String |
PROPERTY_ELEMENT |
static String |
PROPERTY_PLACEHOLDER_ELEMENT |
static String |
PROTOTYPE_OBJECT_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
PROTOTYPE_OBJECT_IDENTIFIER |
static String |
REDELIVERY_POLICY_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
REDELIVERY_POLICY_IDENTIFIER |
static String |
REFERENCE_ATTRIBUTE |
static String |
SINGLETON_OBJECT_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SINGLETON_OBJECT_IDENTIFIER |
static String |
SPRING_CONTEXT_NAMESPACE |
static String |
SPRING_ENTRY_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_ENTRY_IDENTIFIER |
static String |
SPRING_LIST_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_LIST_IDENTIFIER |
static String |
SPRING_MAP_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_MAP_IDENTIFIER |
static String |
SPRING_NAMESPACE |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_PROPERTY_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_PROPERTY_PLACEHOLDER_IDENTIFIER |
static String |
SPRING_SECURITY_NAMESPACE |
static String |
SPRING_VALUE_ELEMENT |
static org.mule.runtime.api.component.ComponentIdentifier |
SPRING_VALUE_IDENTIFIER |
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)
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,
Optional<ComponentBuildingDefinitionRegistry> componentBuildingDefinitionRegistry)
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) |
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.artifact.ArtifactProperties |
getArtifactProperties() |
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.
|
boolean |
hasSpringConfig() |
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 POLICY_ROOT_ELEMENT
public static final String ANNOTATIONS
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 SPRING_NAMESPACE
public static final String SPRING_CONTEXT_NAMESPACE
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 PROCESSOR_REFERENCE_ELEMENT
public static final String TRANSFORMER_REFERENCE_ELEMENT
public static final String FILTER_REFERENCE_ELEMENT
public static final String MESSAGE_FILTER_ELEMENT
public static final String ANNOTATION_ELEMENT
public static final String FILTER_ELEMENT_SUFFIX
public static final String PROCESSING_STRATEGY_ATTRIBUTE
public static final String PROCESSING_STRATEGY_FACTORY_ATTRIBUTE
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 FLOW_REF_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 PROPERTY_PLACEHOLDER_ELEMENT
public static final String GLOBAL_PROPERTY
public static final String SPRING_ENTRY_ELEMENT
public static final String SPRING_LIST_ELEMENT
public static final String SPRING_MAP_ELEMENT
public static final String SPRING_VALUE_ELEMENT
public static final String PROTOTYPE_OBJECT_ELEMENT
public static final String SINGLETON_OBJECT_ELEMENT
public static final String INTERCEPTOR_STACK_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 POLICY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SPRING_PROPERTY_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 MESSAGE_FILTER_ELEMENT_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier PROCESSOR_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 SPRING_PROPERTY_PLACEHOLDER_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 ANNOTATIONS_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SPRING_ENTRY_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SPRING_LIST_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SPRING_MAP_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SPRING_VALUE_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier PROTOTYPE_OBJECT_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier SINGLETON_OBJECT_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier INTERCEPTOR_STACK_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier FLOW_IDENTIFIER
public static final org.mule.runtime.api.component.ComponentIdentifier FLOW_REF_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 MODULE_OPERATION_CHAIN
public ApplicationModel(ArtifactConfig artifactConfig, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration) 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, Optional<ComponentBuildingDefinitionRegistry> componentBuildingDefinitionRegistry) 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 componentModelscomponentBuildingDefinitionRegistry - an optional ComponentBuildingDefinitionRegistry used to correlate items in
this model to their definitionsException - 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 boolean hasSpringConfig()
public void executeOnEveryComponentTree(Consumer<ComponentModel> task)
public void executeOnEveryMuleComponentTree(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.artifact.ArtifactProperties getArtifactProperties()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.