@Extension public class Snippetizer extends Object implements RootAction, DescriptorByNameOwner
Step
as configured through the UI and tries to produce equivalent Groovy code.Modifier and Type | Class and Description |
---|---|
static class |
Snippetizer.LocalAction
May be added to various contexts to offer the Pipeline Groovy link where it is appropriate.
|
static class |
Snippetizer.PerJobAdder |
static class |
Snippetizer.QuasiDescriptor
Represents a step or other step-like objects that should appear in
Snippetizer ’s main dropdown list
and can generate some fragment of Pipeline script. |
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_URL |
static String |
GENERATE_URL |
Constructor and Description |
---|
Snippetizer() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doGenerateSnippet(org.kohsuke.stapler.StaplerRequest req,
String json) |
Descriptor |
getDescriptorByName(String id) |
String |
getDisplayName() |
Iterable<GlobalVariable> |
getGlobalVariables() |
String |
getIconFileName() |
Item |
getItem(org.kohsuke.stapler.StaplerRequest req) |
Collection<Snippetizer.QuasiDescriptor> |
getQuasiDescriptors(boolean advanced) |
List<SnippetizerLink> |
getSnippetizerLinks()
Used to generate the list of links on the sidepanel.
|
String |
getUrlName() |
static String |
object2Groovy(Object o)
Publicly accessible version of
object2Groovy(StringBuilder, Object, boolean) that translates an object into
the equivalent Pipeline Groovy string. |
static String |
object2Groovy(Object o,
boolean nestedExp)
Publicly accessible version of
object2Groovy(StringBuilder, Object, boolean) that translates an object into
the equivalent Pipeline Groovy string. |
public static final String ACTION_URL
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final String GENERATE_URL
public static String object2Groovy(Object o) throws UnsupportedOperationException
object2Groovy(StringBuilder, Object, boolean)
that translates an object into
the equivalent Pipeline Groovy string.o
- The object to translate.UnsupportedOperationException
public static String object2Groovy(Object o, boolean nestedExp) throws UnsupportedOperationException
object2Groovy(StringBuilder, Object, boolean)
that translates an object into
the equivalent Pipeline Groovy string.o
- The object to translate.nestedExp
- true if this object is written as a nested expression (in which case we always produce parentheses for readability)UnsupportedOperationException
public String getUrlName()
getUrlName
in interface Action
public String getIconFileName()
getIconFileName
in interface Action
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public Descriptor getDescriptorByName(String id)
getDescriptorByName
in interface DescriptorByNameOwner
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Collection<Snippetizer.QuasiDescriptor> getQuasiDescriptors(boolean advanced)
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public Iterable<GlobalVariable> getGlobalVariables()
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse doGenerateSnippet(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String json) throws Exception
Exception
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @CheckForNull public Item getItem(org.kohsuke.stapler.StaplerRequest req)
@Nonnull public List<SnippetizerLink> getSnippetizerLinks()
Copyright © 2016–2020. All rights reserved.