Class POMDocument
java.lang.Object
io.codemodder.plugins.maven.operator.POMDocument
Data Class to Keep track of an entire POM File, including:
Path (pomPath)
DOM Contents (pomDocument) - original DOM Contents (resultPom) - modified
Charset (ditto) Indent (ditto) Preamble (ditto) Suffix (ditto) Line Endings (endl)
Original Content (originalPom) Modified Content (resultPomBytes)
-
Constructor Summary
ConstructorsConstructorDescriptionPOMDocument
(byte[] originalPom, URL pomPath, org.dom4j.Document pomDocument) Constructs a new `POMDocument` with the specified original POM bytes, path (if available), and DOM contents.POMDocument
(byte[] originalPom, org.dom4j.Document pomDocument) Constructs a new `POMDocument` with the specified original POM bytes and DOM contents. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getDirty()
getEndl()
byte[]
getPath()
org.dom4j.Document
org.dom4j.Document
byte[]
boolean
isDirty()
void
setCharset
(Charset charset) void
setDirty
(boolean dirty) void
void
void
setOriginalPom
(byte[] originalPom) void
void
setPomDocument
(org.dom4j.Document pomDocument) void
setPomPath
(URL pomPath) void
setPreamble
(String preamble) void
setResultPom
(org.dom4j.Document resultPom) void
setResultPomBytes
(byte[] resultPomBytes) void
toString()
-
Constructor Details
-
POMDocument
public POMDocument(byte[] originalPom, URL pomPath, org.dom4j.Document pomDocument) throws URISyntaxException Constructs a new `POMDocument` with the specified original POM bytes, path (if available), and DOM contents.- Parameters:
originalPom
- The byte array representing the original content of the POM.pomPath
- The URL or file path to the POM.pomDocument
- The DOM (Document Object Model) representation of the POM.- Throws:
URISyntaxException
- If there is an issue with the provided URL.
-
POMDocument
Constructs a new `POMDocument` with the specified original POM bytes and DOM contents.- Parameters:
originalPom
- The byte array representing the original content of the POM.pomDocument
- The DOM (Document Object Model) representation of the POM.- Throws:
URISyntaxException
- If there is an issue with the provided URL.
-
-
Method Details
-
toString
-
getDirty
public boolean getDirty() -
getOriginalPom
public byte[] getOriginalPom() -
setOriginalPom
public void setOriginalPom(byte[] originalPom) -
getPomPath
-
setPomPath
-
getPomDocument
public org.dom4j.Document getPomDocument() -
setPomDocument
public void setPomDocument(org.dom4j.Document pomDocument) -
getResultPom
public org.dom4j.Document getResultPom() -
setResultPom
public void setResultPom(org.dom4j.Document resultPom) -
getPath
-
setPath
-
getCharset
-
setCharset
-
getEndl
-
setEndl
-
getIndent
-
setIndent
-
getResultPomBytes
public byte[] getResultPomBytes() -
setResultPomBytes
public void setResultPomBytes(byte[] resultPomBytes) -
getPreamble
-
setPreamble
-
getSuffix
-
setSuffix
-
isDirty
public boolean isDirty() -
setDirty
public void setDirty(boolean dirty)
-