Package org.xwiki.tool.xar
Class Transformation
java.lang.Object
org.xwiki.tool.xar.Transformation
Hold Transformation configuration as specified by the user in its pom.xml.
- Since:
- 5.3M1
- Version:
- $Id: 80c5aa5f49b4b41b3b09bab83cfda7aacd6bb39b $
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFile()
getValue()
getXml()
getXpath()
void
setAction
(Transformation.Action action) void
setArtifact
(String artifact) void
setCharset
(String charset) void
setContent
(File content) void
void
void
void
-
Constructor Details
-
Transformation
public Transformation()
-
-
Method Details
-
getAction
- Returns:
- the action to apply
- Since:
- 9.5RC1
-
setAction
- Parameters:
action
- the action to apply- Since:
- 9.5RC1
-
getArtifact
- Returns:
- the optional id (in the format
groupId:artifactId
of the dependent XAR artifact where the page to be transformed is located. If not specified then the page is considered to be in the current project
-
setArtifact
- Parameters:
artifact
- seegetArtifact()
-
getFile
- Returns:
- the path relative to the
target/classes
directory of the XML file for which to apply a transformation
-
setFile
- Parameters:
file
- seegetFile()
-
getXpath
- Returns:
- the XPath expression to locate the node for which to change the text value
-
setXpath
- Parameters:
xpath
- seegetXpath()
-
getValue
- Returns:
- the new value to set for the node specified by the XPath expression. Note that
$1
tokens are replaced by the current value
-
setValue
- Parameters:
value
- seegetValue()
-
getXml
- Returns:
- the file containing the XML to insert
- Since:
- 9.5RC1
-
setXml
- Parameters:
xml
- the file containing the XML to insert- Since:
- 9.5RC1
-
getContent
- Returns:
- the file containing the text to insert (action INSERT_TEXT) or the blob to insert (action INSERT_FILE_BASE64).
- Since:
- 11.4RC1
-
setContent
- Parameters:
content
- the file containing the text or blob to insert- Since:
- 11.4RC1
-
getCharset
- Returns:
- the charset used to read the file containing the text to insert (for action INSERT_TEXT only, optional, default value UTF-8)
- Since:
- 11.4RC1
-
setCharset
- Parameters:
charset
- the charset used to read the file containing the text to insert (for action INSERT_TEXT only, optional, default value UTF-8)- Since:
- 11.4RC1
-