public abstract class AbstractXmlUpgrader extends Object
Constructor and Description |
---|
AbstractXmlUpgrader() |
Modifier and Type | Method and Description |
---|---|
static org.dom4j.Element |
asElement(Map<String,String> artifactHandlerConfiguration,
String name) |
static Map<String,String> |
asMap(org.dom4j.Element element) |
protected static void |
closeQuietly(org.dom4j.io.XMLWriter writer) |
protected abstract org.dom4j.Document |
getDocument() |
org.dom4j.Element |
getElement(org.dom4j.Element parent,
String xpathExpression) |
org.dom4j.Element |
getElement(String xpathExpression) |
String |
getElementText(org.dom4j.Element parent,
String elementName) |
org.dom4j.Element |
getRootElement() |
protected static void |
logChanges(String xmlSourceIdentifier,
String originalContent,
String newContent) |
void |
remove(org.dom4j.Element element) |
abstract void |
save() |
static void |
saveNode(org.dom4j.Node node,
File file)
Save node contents to a file.
|
void |
setOrAdd(org.dom4j.Element element) |
void |
setOrAdd(org.dom4j.Element parent,
org.dom4j.Element element) |
void |
setOrAdd(org.dom4j.Element parent,
String elementName,
String value) |
void |
setOrAdd(String elementName,
String value) |
void |
update(org.dom4j.Element element) |
protected abstract org.dom4j.Document getDocument()
public abstract void save() throws IOException
IOException
public void setOrAdd(@NotNull org.dom4j.Element parent, @NotNull String elementName, @NotNull String value)
public void setOrAdd(@NotNull org.dom4j.Element element)
public void setOrAdd(@NotNull org.dom4j.Element parent, @NotNull org.dom4j.Element element)
public void update(org.dom4j.Element element)
public void remove(org.dom4j.Element element)
public org.dom4j.Element getRootElement()
@Nullable public org.dom4j.Element getElement(@NotNull String xpathExpression)
@Nullable public org.dom4j.Element getElement(@NotNull org.dom4j.Element parent, @NotNull String xpathExpression)
public static org.dom4j.Element asElement(Map<String,String> artifactHandlerConfiguration, String name)
public static void saveNode(org.dom4j.Node node, File file) throws IOException
node
- element to be persistedfile
- destination fileIOException
@Nullable public String getElementText(@NotNull org.dom4j.Element parent, @NotNull String elementName)
protected static void closeQuietly(org.dom4j.io.XMLWriter writer)
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.