public final class XmlDslUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.jdom2.Namespace |
CORE_EE_NAMESPACE |
static String |
CORE_EE_NS_URI |
static org.jdom2.Namespace |
CORE_NAMESPACE |
static String |
EE_NAMESPACE_NAME |
static String |
EE_NAMESPACE_SCHEMA |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCompatibilityNamespace(org.jdom2.Document document)
Add the required compatibility namespace declaration on document.
|
static void |
addElementAfter(org.jdom2.Element newElement,
org.jdom2.Element element)
Add new element after some existing element.
|
static void |
addElementBefore(org.jdom2.Element newElement,
org.jdom2.Element element)
Add new element before some existing element.
|
static void |
addElementsAfter(Collection<? extends org.jdom2.Content> newElements,
org.jdom2.Element element)
Add new element after some existing element.
|
static void |
addMigrationAttributeToElement(org.jdom2.Element element,
org.jdom2.Attribute attribute) |
static org.jdom2.Element |
addOutboundPropertySetter(String propertyName,
org.jdom2.Element element,
ApplicationModel model,
org.jdom2.Element after) |
static void |
addTopLevelElement(org.jdom2.Element element,
org.jdom2.Document document)
Add new top level element after all the existing ones.
|
static String |
changeDefault(String oldDefaultValue,
String newDefaultValue,
String currentValue)
Migrate a field for which the default value was changed.
|
static boolean |
copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String attributeName) |
static boolean |
copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String attributeName,
boolean removeSource) |
static boolean |
copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String sourceAttributeName,
String targetAttributeName) |
static boolean |
copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String sourceAttributeName,
String targetAttributeName,
boolean removeSource) |
static void |
createErrorHandlerParent(org.jdom2.Element element) |
static org.jdom2.Document |
generateDocument(Path filePath)
Return JDOM document from a file path.
|
static org.jdom2.Element |
getFlow(org.jdom2.Element processor) |
static org.jdom2.Element |
getFlowExceptionHandlingElement(org.jdom2.Element flow) |
static boolean |
isErrorHanldingElement(org.jdom2.Element element) |
static boolean |
isMuleConfigFile(String fileName,
Path appBasePath) |
static boolean |
isTopLevelElement(org.jdom2.Element element) |
static void |
migrateEnrichers(org.jdom2.Element object,
ExpressionMigrator expressionMigrator,
CompatibilityResolver<String> resolver,
ApplicationModel model,
MigrationReport report) |
static void |
migrateExpression(org.jdom2.Attribute attr,
ExpressionMigrator exprMigrator)
Assuming the value of
attr is an expression, migrate it and update the value. |
static void |
migrateOperationStructure(ApplicationModel appModel,
org.jdom2.Element object,
MigrationReport report)
Add the required compatibility elements to the flow for a migrated operation to work correctly.
|
static void |
migrateOperationStructure(ApplicationModel appModel,
org.jdom2.Element object,
MigrationReport report,
boolean outputsAttributes,
ExpressionMigrator expressionMigrator,
CompatibilityResolver resolver) |
static void |
migrateOperationStructure(ApplicationModel appModel,
org.jdom2.Element object,
MigrationReport report,
boolean outputsAttributes,
ExpressionMigrator expressionMigrator,
CompatibilityResolver resolver,
boolean consumeStreams)
Add the required compatibility elements to the flow for a migrated operation to work correctly.
|
static void |
migrateRedeliveryPolicyChildren(org.jdom2.Element redeliveryPolicy,
MigrationReport report) |
static void |
migrateSourceStructure(ApplicationModel appModel,
org.jdom2.Element object,
MigrationReport report)
Add the required compatibility elements to the flow for a migrated source to work correctly.
|
static void |
migrateSourceStructure(ApplicationModel appModel,
org.jdom2.Element object,
MigrationReport report,
boolean expectsOutboundProperties,
boolean consumeStreams)
Add the required compatibility elements to the flow for a migrated source to work correctly.
|
static org.jdom2.Element |
setText(org.jdom2.Element element,
String text)
Sets the given
text on the given element, wrapping it in a CDATA for readability if it contains
special characters. |
public static final org.jdom2.Namespace CORE_NAMESPACE
public static final String EE_NAMESPACE_NAME
public static final String CORE_EE_NS_URI
public static final org.jdom2.Namespace CORE_EE_NAMESPACE
public static final String EE_NAMESPACE_SCHEMA
public static org.jdom2.Element setText(org.jdom2.Element element,
String text)
text on the given element, wrapping it in a CDATA for readability if it contains
special characters.element - text - public static void migrateExpression(org.jdom2.Attribute attr,
ExpressionMigrator exprMigrator)
attr is an expression, migrate it and update the value.attr - the attribute containing the expression to migrateexprMigrator - the migrator for the expressionspublic static String changeDefault(String oldDefaultValue, String newDefaultValue, String currentValue)
oldDefaultValue - newDefaultValue - currentValue - currentValue is already the new default.public static void migrateSourceStructure(ApplicationModel appModel, org.jdom2.Element object, MigrationReport report)
public static void migrateSourceStructure(ApplicationModel appModel, org.jdom2.Element object, MigrationReport report, boolean expectsOutboundProperties, boolean consumeStreams)
public static void migrateOperationStructure(ApplicationModel appModel, org.jdom2.Element object, MigrationReport report)
public static void migrateOperationStructure(ApplicationModel appModel, org.jdom2.Element object, MigrationReport report, boolean outputsAttributes, ExpressionMigrator expressionMigrator, CompatibilityResolver resolver)
public static void migrateOperationStructure(ApplicationModel appModel, org.jdom2.Element object, MigrationReport report, boolean outputsAttributes, ExpressionMigrator expressionMigrator, CompatibilityResolver resolver, boolean consumeStreams)
public static void migrateEnrichers(org.jdom2.Element object,
ExpressionMigrator expressionMigrator,
CompatibilityResolver<String> resolver,
ApplicationModel model,
MigrationReport report)
public static org.jdom2.Element addOutboundPropertySetter(String propertyName, org.jdom2.Element element, ApplicationModel model, org.jdom2.Element after)
public static void migrateRedeliveryPolicyChildren(org.jdom2.Element redeliveryPolicy,
MigrationReport report)
public static void addCompatibilityNamespace(org.jdom2.Document document)
public static boolean copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String attributeName)
source - the element to remove the attribute fromtarget - the element to add the element toattributeName - the name of the attribute to move from source to targettrue if the attribute was present on source, false otherwisepublic static boolean copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String sourceAttributeName,
String targetAttributeName)
source - the element to remove the attribute fromtarget - the element to add the element tosourceAttributeName - the name of the attribute to remove from sourcetargetAttributeName - the name of the attribute to add to targettrue if the attribute was present on source, false otherwisepublic static boolean copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String attributeName,
boolean removeSource)
source - the element to remove the attribute fromtarget - the element to add the element toattributeName - the name of the attribute to move from source to targettrue if the attribute was present on source, false otherwisepublic static boolean copyAttributeIfPresent(org.jdom2.Element source,
org.jdom2.Element target,
String sourceAttributeName,
String targetAttributeName,
boolean removeSource)
source - the element to remove the attribute fromtarget - the element to add the element tosourceAttributeName - the name of the attribute to remove from sourcetargetAttributeName - the name of the attribute to add to targettrue if the attribute was present on source, false otherwisepublic static void addElementBefore(org.jdom2.Element newElement,
org.jdom2.Element element)
newElement - element - public static void addElementAfter(org.jdom2.Element newElement,
org.jdom2.Element element)
newElement - element - public static void addElementsAfter(Collection<? extends org.jdom2.Content> newElements, org.jdom2.Element element)
newElement - element - public static org.jdom2.Element getFlow(org.jdom2.Element processor)
public static boolean isTopLevelElement(org.jdom2.Element element)
public static void createErrorHandlerParent(org.jdom2.Element element)
public static void addMigrationAttributeToElement(org.jdom2.Element element,
org.jdom2.Attribute attribute)
public static boolean isErrorHanldingElement(org.jdom2.Element element)
public static org.jdom2.Element getFlowExceptionHandlingElement(org.jdom2.Element flow)
public static void addTopLevelElement(org.jdom2.Element element,
org.jdom2.Document document)
element - document - public static org.jdom2.Document generateDocument(Path filePath) throws org.jdom2.JDOMException, IOException
filePath - org.jdom2.JDOMExceptionIOExceptionCopyright © 2018 MuleSoft Inc. All rights reserved.