public class ReplaceOperation extends AbstractXmlJobcopyOperation implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ReplaceOperation.DescriptorImpl
The internal class to work with views.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
ReplaceOperation(String fromStr,
boolean expandFromStr,
String toStr,
boolean expandToStr)
Constructor to instantiate from parameters in the job configuration page.
|
Modifier and Type | Method and Description |
---|---|
String |
getFromStr()
Returns the string to be replaced.
|
String |
getToStr()
Returns the string to be replaced with.
|
boolean |
isExpandFromStr()
Returns whether expand variables in fromStr.
|
boolean |
isExpandToStr()
Returns whether expand variables in toStr.
|
Document |
perform(Document doc,
EnvVars env,
PrintStream logger)
Returns modified XML Document of the job configuration.
|
getNode, getNodeList, getXpath, perform
all
getDescriptor
@DataBoundConstructor public ReplaceOperation(String fromStr, boolean expandFromStr, String toStr, boolean expandToStr)
fromStr
- the string to be replaced.expandFromStr
- whether expand variables in fromStr.toStr
- the string to be replaced with.expandToStr
- whether expand variables in toStr.public String getFromStr()
public boolean isExpandFromStr()
public String getToStr()
public boolean isExpandToStr()
public Document perform(Document doc, EnvVars env, PrintStream logger)
perform
in class AbstractXmlJobcopyOperation
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.AbstractXmlJobcopyOperation.perform(org.w3c.dom.Document, hudson.EnvVars, java.io.PrintStream)
Copyright © 2016–2023. All rights reserved.