Package org.xwiki.tool.xar
Class Transformation
- java.lang.Object
-
- org.xwiki.tool.xar.Transformation
-
public class Transformation extends Object
Hold Transformation configuration as specified by the user in its pom.xml.- Since:
- 5.3M1
- Version:
- $Id: 80c5aa5f49b4b41b3b09bab83cfda7aacd6bb39b $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Transformation.Action
The action to apply.
-
Constructor Summary
Constructors Constructor Description Transformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transformation.Action
getAction()
String
getArtifact()
String
getCharset()
File
getContent()
String
getFile()
String
getValue()
File
getXml()
String
getXpath()
void
setAction(Transformation.Action action)
void
setArtifact(String artifact)
void
setCharset(String charset)
void
setContent(File content)
void
setFile(String file)
void
setValue(String value)
void
setXml(File xml)
void
setXpath(String xpath)
-
-
-
Method Detail
-
getAction
public Transformation.Action getAction()
- Returns:
- the action to apply
- Since:
- 9.5RC1
-
setAction
public void setAction(Transformation.Action action)
- Parameters:
action
- the action to apply- Since:
- 9.5RC1
-
getArtifact
public String 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
public void setArtifact(String artifact)
- Parameters:
artifact
- seegetArtifact()
-
getFile
public String getFile()
- Returns:
- the path relative to the
target/classes
directory of the XML file for which to apply a transformation
-
getXpath
public String getXpath()
- Returns:
- the XPath expression to locate the node for which to change the text value
-
setXpath
public void setXpath(String xpath)
- Parameters:
xpath
- seegetXpath()
-
getValue
public String 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
public void setValue(String value)
- Parameters:
value
- seegetValue()
-
getXml
public File getXml()
- Returns:
- the file containing the XML to insert
- Since:
- 9.5RC1
-
setXml
public void setXml(File xml)
- Parameters:
xml
- the file containing the XML to insert- Since:
- 9.5RC1
-
getContent
public File 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
public void setContent(File content)
- Parameters:
content
- the file containing the text or blob to insert- Since:
- 11.4RC1
-
getCharset
public String 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
public void setCharset(String charset)
- 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
-
-