public abstract class AbstractXmlJobcopyOperation extends JobcopyOperation
JobcopyOperationExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
AbstractXmlJobcopyOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
getNode(Document doc,
String xpath)
Retrieve a XML node using XPath.
|
protected NodeList |
getNodeList(Document doc,
String xpathExpression)
Retrieve a XML node list using XPath.
|
protected String |
getXpath(Node targetNode)
Retrieve a XPath expression of a node.
|
abstract Document |
perform(Document doc,
EnvVars env,
PrintStream logger)
Performs modifications to job configure XML Document.
|
String |
perform(String xmlString,
String encoding,
EnvVars env,
PrintStream logger)
Returns modified XML string of the job configuration.
|
allgetDescriptorpublic abstract Document perform(Document doc, EnvVars env, PrintStream logger)
doc - XML Document of the job to be copied (job/NAME/config.xml)env - Variables defined in the build.logger - The output stream to log.public String perform(String xmlString, String encoding, EnvVars env, PrintStream logger)
perform in class JobcopyOperationxmlString - the XML string of the job to be copied (job/NAME/config.xml)encoding - the encoding of the XML.env - Variables defined in the build.logger - The output stream to log.JobcopyOperation.perform(java.lang.String, java.lang.String, hudson.EnvVars, java.io.PrintStream)protected Node getNode(Document doc, String xpath) throws XPathExpressionException
doc - the XML Document object.xpath - a XPath specifying the retrieving node.XPathExpressionException - problems in xpathprotected NodeList getNodeList(Document doc, String xpathExpression) throws XPathExpressionException
doc - the XML Document object.xpathExpression - a XPath specifying the retrieving nodes.XPathExpressionException - problems in xpathExpressionprotected String getXpath(Node targetNode)
targetNode - a node whose XPath expression is retrieved.Copyright © 2016–2023. All rights reserved.