|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jenkinsci.plugins.pollmailboxtrigger.SafeJenkins
public final class SafeJenkins
This class provides a way for us to invoke the Jenkins.getInstance() method, during testing, without it throwing NoSuchMethod errors. Currently this method throws the following error: 'java.lang.NoSuchMethodError: hudson.util.XStream2.getConverterRegistry()Lcom/thoughtworks/xstream/converters/ConverterRegistry;'.
Unfortunately this method is invoked in many places, often nested within other static methods. This makes mocking very difficult/impossible. So, I've fashioned the following class to address these issues.
Method Summary | |
---|---|
static java.lang.String |
decrypt(java.lang.String encryptedMessage)
|
static java.lang.String |
encrypt(java.lang.String message)
|
static hudson.util.DescribableList<hudson.slaves.NodeProperty<?>,hudson.slaves.NodePropertyDescriptor> |
getGlobalNodeProperties()
|
static jenkins.model.Jenkins |
getJenkinsInstance()
|
static hudson.util.DescribableList<hudson.slaves.NodeProperty<?>,hudson.slaves.NodePropertyDescriptor> |
getNodeProperties()
|
static boolean |
isNull(java.lang.Object object)
|
static boolean |
nonNull(java.lang.Object object)
|
static void |
setLocalNodeProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a EnvironmentVariablesNodeProperty of environment properties, from the given Map . |
static void |
useNativeInstance(boolean useNativeInstance)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void useNativeInstance(boolean useNativeInstance)
public static jenkins.model.Jenkins getJenkinsInstance()
public static hudson.util.DescribableList<hudson.slaves.NodeProperty<?>,hudson.slaves.NodePropertyDescriptor> getGlobalNodeProperties()
public static hudson.util.DescribableList<hudson.slaves.NodeProperty<?>,hudson.slaves.NodePropertyDescriptor> getNodeProperties()
public static void setLocalNodeProperties(java.util.Map<java.lang.String,java.lang.String> properties)
EnvironmentVariablesNodeProperty
of environment properties, from the given Map
.
public static java.lang.String encrypt(java.lang.String message)
public static java.lang.String decrypt(java.lang.String encryptedMessage)
public static boolean isNull(java.lang.Object object)
public static boolean nonNull(java.lang.Object object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |