public class JenkinsUtil extends Object
Constructor and Description |
---|
JenkinsUtil() |
Modifier and Type | Method and Description |
---|---|
static <T extends hudson.model.Describable<T>> |
getDescriptorOrDie(Class<? extends T> type)
Generic type-safe wrapper for
Jenkins.getDescriptorOrDie(java.lang.Class<? extends hudson.model.Describable>) . |
static <S extends hudson.model.Describable<S>,T extends S,D extends hudson.model.Descriptor<S>> |
getDescriptorOrDie(Class<T> type,
Class<D> descriptorType)
Generic type-safe wrapper for
Jenkins.getDescriptorOrDie(java.lang.Class<? extends hudson.model.Describable>) to be
used when a concrete descriptor class is used. |
static jenkins.model.Jenkins |
getJenkinsInstance() |
static String |
unescape(String s)
Unescapes a string escaped by
Util.escape(java.lang.String) . |
static hudson.util.FormValidation |
validateRequired(String value)
Similar to
FormValidation.validateRequired(java.lang.String) , but uses the same
error message as <f:textbox clazz="required"/> . |
public static <T extends hudson.model.Describable<T>> hudson.model.Descriptor<T> getDescriptorOrDie(Class<? extends T> type)
Jenkins.getDescriptorOrDie(java.lang.Class<? extends hudson.model.Describable>)
.T
- type of the describabletype
- the type for the describableDescriptor
object with the specified typepublic static <S extends hudson.model.Describable<S>,T extends S,D extends hudson.model.Descriptor<S>> D getDescriptorOrDie(Class<T> type, Class<D> descriptorType)
Jenkins.getDescriptorOrDie(java.lang.Class<? extends hudson.model.Describable>)
to be
used when a concrete descriptor class is used.S
- the super of the describable typeD
- the type of the descriptorT
- the type of describabletype
- the type for the describabledescriptorType
- the Descriptor typeDescriptor
object with the specified typepublic static hudson.util.FormValidation validateRequired(String value)
FormValidation.validateRequired(java.lang.String)
, but uses the same
error message as <f:textbox clazz="required"/>
.value
- the value to validateFormValidation
object containing the resultant infopublic static String unescape(String s)
Util.escape(java.lang.String)
.s
- string to unescapepublic static jenkins.model.Jenkins getJenkinsInstance()
Copyright © 2016–2018. All rights reserved.