public class ApplicationModel extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApplicationModel.ApplicationModelBuilder
It represent the builder to obtain a
ApplicationModel |
| Modifier | Constructor and Description |
|---|---|
protected |
ApplicationModel(Map<Path,org.jdom2.Document> applicationDocuments) |
protected |
ApplicationModel(Map<Path,org.jdom2.Document> applicationDocuments,
Map<Path,org.jdom2.Document> domainDocuments) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addNameSpace(org.jdom2.Namespace namespace,
String schemaLocation,
org.jdom2.Document document)
Adds a namespace to an application document
|
void |
addNameSpace(String prefix,
String uri,
String schemaLocation)
Adds a namespace to the application documents
|
Map<Path,org.jdom2.Document> |
getApplicationDocuments()
The key of the map is relative to the source of the target project.
|
Map<Path,org.jdom2.Document> |
getDomainDocuments()
The key of the map is relative to the source of the target project.
|
static List<org.jdom2.Element> |
getElementsWithNamespace(org.jdom2.Document document,
org.jdom2.Namespace namespace,
ApplicationModel applicationModel)
Retrieves all elements in the document that have the specified namespace
|
Optional<MuleArtifactJsonModel> |
getMuleArtifactJsonModel()
Retrieves the
MuleArtifactJsonModel. |
String |
getMuleVersion() |
org.jdom2.Element |
getNode(String xpathExpression)
Returns a single node in the application documents that match the xpath expression
|
Optional<org.jdom2.Element> |
getNodeOptional(String xpathExpression)
Returns a single node in the application documents that match the xpath expression
|
List<org.jdom2.Element> |
getNodes(String xpathExpression)
Returns all the nodes in the application documents that match the xpath expression
|
List<org.jdom2.Element> |
getNodes(org.jdom2.xpath.XPathExpression xpathExpression)
Returns all the nodes in the application documents that match the xpath expression
|
Optional<PomModel> |
getPomModel()
Retrieves the
PomModel of this instance. |
Path |
getProjectBasePath()
Retrieves the root path of the project represented by the application model instance
|
ProjectType |
getProjectType() |
Path |
getSourceProjectBasePath()
Retrieves the root path of the project represented by the application model instance
|
List<org.jdom2.Namespace> |
getSupportedNamespaces()
Retrieves the
List. |
void |
removeNameSpace(org.jdom2.Namespace namespace,
String schemaLocation,
org.jdom2.Document document)
Removes a namespace from an application document
|
void |
removeNameSpace(String prefix,
String uri,
String schemaLocation)
Removes a namespace from the application documents
|
void |
setMuleVersion(String muleVersion) |
void |
setProjectType(ProjectType projectType) |
void |
setSupportedNamespaces(List<org.jdom2.Namespace> supportedNamespaces)
Sets the
List that represents the supported namespaces for the tool. |
public Map<Path,org.jdom2.Document> getApplicationDocuments()
public Map<Path,org.jdom2.Document> getDomainDocuments()
This is just for the domain referenced by an application, this is not used when migrating the domain itself.
public List<org.jdom2.Element> getNodes(String xpathExpression)
xpathExpression - the xpath expression that defines which nodes should be retrievedpublic org.jdom2.Element getNode(String xpathExpression)
xpathExpression - the xpath expression that defines which nodes should be retrievedpublic Optional<org.jdom2.Element> getNodeOptional(String xpathExpression)
xpathExpression - the xpath expression that defines which nodes should be retrievedpublic List<org.jdom2.Element> getNodes(org.jdom2.xpath.XPathExpression xpathExpression)
xpathExpression - the xpath expression that defines which nodes should be retrievedpublic static List<org.jdom2.Element> getElementsWithNamespace(org.jdom2.Document document, org.jdom2.Namespace namespace, ApplicationModel applicationModel)
document - the document where the elements are going to be searched throughnamespace - the namespace of the elements that should be retrievedpublic void addNameSpace(String prefix, String uri, String schemaLocation)
prefix - uri - schemaLocation - public static void addNameSpace(org.jdom2.Namespace namespace,
String schemaLocation,
org.jdom2.Document document)
namespace - schemaLocation - document - public void removeNameSpace(String prefix, String uri, String schemaLocation)
prefix - uri - schemaLocation - public void removeNameSpace(org.jdom2.Namespace namespace,
String schemaLocation,
org.jdom2.Document document)
namespace - schemaLocation - document - public Optional<PomModel> getPomModel()
PomModel of this instance. It is optional since the pom is not mandatory in a Mule 3.x applicationPomModelpublic void setProjectType(ProjectType projectType)
public ProjectType getProjectType()
public void setMuleVersion(String muleVersion)
public String getMuleVersion()
public Path getSourceProjectBasePath()
public Path getProjectBasePath()
public Optional<MuleArtifactJsonModel> getMuleArtifactJsonModel()
MuleArtifactJsonModel. It is optional since this resource is not part of a Mule 3.x applicationMuleArtifactJsonModelpublic void setSupportedNamespaces(List<org.jdom2.Namespace> supportedNamespaces)
List that represents the supported namespaces for the tool.supportedNamespaces - public List<org.jdom2.Namespace> getSupportedNamespaces()
List.ListCopyright © 2018 MuleSoft Inc. All rights reserved.