public class Recipe extends hudson.model.AbstractDescribableImpl<Recipe> implements org.kohsuke.stapler.HttpResponse
Ingredient
s that represent a set of configured stuff
in Jenkins that gets transported from one Jenkins to another,
for example for one person to share how he set up something to other people.Modifier and Type | Class and Description |
---|---|
static class |
Recipe.DescriptorImpl |
class |
Recipe.ImportOptions |
Modifier and Type | Field and Description |
---|---|
static String |
EXTENSION
Common file extension for Jenkins recipe.
|
static Pattern |
ID_PATTERN |
static hudson.util.XStream2 |
XSTREAM |
Constructor and Description |
---|
Recipe(String id,
String version,
String displayName,
String description,
List<? extends Ingredient> ingredients) |
Modifier and Type | Method and Description |
---|---|
void |
apply(org.kohsuke.stapler.StaplerRequest req) |
void |
cook(ImportReportList reportList)
Imports this ingredient into the current Jenkins.
|
Recipe.ImportOptions |
createImportOptions() |
void |
generateResponse(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
Object node)
Writes this object as HTTP response.
|
String |
getDescription() |
String |
getDisplayName() |
String |
getFileName()
Returns the suggested file name for this recipe.
|
String |
getId() |
List<Ingredient> |
getIngredients() |
<T extends Ingredient> |
getIngredients(Class<T> type) |
List<Parameter> |
getParameters() |
String |
getVersion() |
static void |
init() |
static Recipe |
load(URL url)
Loads the recipe from URL.
|
void |
setDescription(String description) |
void |
setDisplayName(String displayName) |
void |
setId(String id) |
void |
setVersion(String version) |
void |
writeTo(OutputStream out) |
void |
writeTo(Writer out) |
public static hudson.util.XStream2 XSTREAM
public static final String EXTENSION
public static final Pattern ID_PATTERN
public String getId()
public void setId(String id)
public String getVersion()
public void setVersion(String version)
public String getDisplayName()
public void setDisplayName(String displayName)
public String getFileName()
public String getDescription()
public void setDescription(String description)
public List<Ingredient> getIngredients()
public <T extends Ingredient> List<T> getIngredients(Class<T> type)
public void writeTo(OutputStream out) throws IOException
IOException
public void writeTo(Writer out) throws IOException
IOException
public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException
generateResponse
in interface org.kohsuke.stapler.HttpResponse
IOException
javax.servlet.ServletException
public void apply(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException
javax.servlet.ServletException
public void cook(ImportReportList reportList) throws IOException, InterruptedException
IOException
InterruptedException
public Recipe.ImportOptions createImportOptions()
public static Recipe load(URL url) throws IOException
IOException
@Initializer(after=PLUGINS_STARTED) public static void init()
Copyright © 2004-2014. All Rights Reserved.