|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.Plugin
com.sonyericsson.jenkins.plugins.bfa.PluginImpl
public class PluginImpl
The main thing.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class hudson.Plugin |
---|
hudson.Plugin.DummyImpl |
Field Summary | |
---|---|
static String |
DEFAULT_ICON_NAME
Convenience constant for the default icon size. |
static String |
DEFAULT_ICON_SIZE
Convenience constant for the 24x24 icon size. |
static int |
DEFAULT_NR_OF_SCAN_THREADS
Default number of concurrent scan threads. |
protected static int |
MINIMUM_NR_OF_SCAN_THREADS
Minimum allowed value for nrOfScanThreads . |
static hudson.security.PermissionGroup |
PERMISSION_GROUP
The permission group for all permissions related to this plugin. |
static hudson.security.Permission |
REMOVE_PERMISSION
Permission to remove causes. |
static hudson.security.Permission |
UPDATE_PERMISSION
Permission to update the causes. |
Fields inherited from interface hudson.model.Saveable |
---|
NOOP |
Constructor Summary | |
---|---|
PluginImpl()
|
Method Summary | |
---|---|
void |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject o)
|
static String |
getDefaultIcon()
The default icon to be used throughout this plugin. |
static String |
getFullImageUrl(String size,
String name)
Get the full url to an image, including rootUrl and context path. |
static String |
getImageUrl(String name)
Provides a Jenkins relative url to a plugin internal image of DEFAULT_ICON_SIZE size. |
static String |
getImageUrl(String size,
String name)
Provides a Jenkins relative url to a plugin internal image. |
static PluginImpl |
getInstance()
Returns the singleton instance. |
KnowledgeBase |
getKnowledgeBase()
The knowledge base containing all causes. |
KnowledgeBase.KnowledgeBaseDescriptor |
getKnowledgeBaseDescriptor(String descString)
Gets the KnowledgeBaseDescriptor that matches the name descString. |
hudson.ExtensionList<KnowledgeBase.KnowledgeBaseDescriptor> |
getKnowledgeBaseDescriptors()
Convenience method to reach the list from jelly. |
String |
getNoCausesMessage()
Getter for the no causes message. |
int |
getNrOfScanThreads()
The number of threads to have in the pool for each build. |
ScanOnDemandVariables |
getSodVariables()
Getter sodVariable. |
static String |
getStaticImagesBase()
Returns the base relative URI for static images packaged in webapp. |
static String |
getStaticResourcesBase()
Returns the base relative URI for static resources packaged in webapp. |
boolean |
isGerritTriggerEnabled()
Send notifications to Gerrit-Trigger-plugin. |
boolean |
isGlobalEnabled()
If this feature is enabled or not. |
boolean |
isGraphsEnabled()
If graphs are enabled or not. |
void |
setGerritTriggerEnabled(Boolean gerritTriggerEnabled)
Sets if this feature is enabled or not. |
void |
setGlobalEnabled(Boolean globalEnabled)
Sets if this feature is enabled or not. |
void |
setNrOfScanThreads(int nrOfScanThreads)
The number of threads to have in the pool for each build. |
static boolean |
shouldScan(hudson.model.AbstractBuild build)
Checks if the specified build should be scanned or not. |
static boolean |
shouldScan(hudson.model.AbstractProject project)
Checks if the specified project should be scanned or not. |
void |
start()
|
void |
stop()
|
Methods inherited from class hudson.Plugin |
---|
configure, doDynamic, getConfigXml, getWrapper, load, postInitialize, save, setServletContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_ICON_SIZE
getImageUrl(String, String)
.
public static final String DEFAULT_ICON_NAME
getImageUrl(String, String)
.
public static final int DEFAULT_NR_OF_SCAN_THREADS
public static final hudson.security.PermissionGroup PERMISSION_GROUP
public static final hudson.security.Permission UPDATE_PERMISSION
CauseManagement
.
public static final hudson.security.Permission REMOVE_PERMISSION
protected static final int MINIMUM_NR_OF_SCAN_THREADS
nrOfScanThreads
.
Constructor Detail |
---|
public PluginImpl()
Method Detail |
---|
public void start() throws Exception
start
in class hudson.Plugin
Exception
public void stop() throws Exception
stop
in class hudson.Plugin
Exception
public static String getStaticResourcesBase()
public ScanOnDemandVariables getSodVariables()
public static String getStaticImagesBase()
getStaticResourcesBase()
public static String getImageUrl(String size, String name)
size
- the size of the image (the sub directory of images).name
- the name of the image file.
public static String getFullImageUrl(String size, String name)
size
- the size of the image (the sub directory of images).name
- the name of the image file.
public static String getImageUrl(String name)
DEFAULT_ICON_SIZE
size.
name
- the name of the image.
getImageUrl(String, String)
public static String getDefaultIcon()
getImageUrl(String)
,
getImageUrl(String, String)
public static PluginImpl getInstance()
public String getNoCausesMessage()
public boolean isGlobalEnabled()
public boolean isGraphsEnabled()
public void setGlobalEnabled(Boolean globalEnabled)
globalEnabled
- on or off. null == on.public boolean isGerritTriggerEnabled()
public void setGerritTriggerEnabled(Boolean gerritTriggerEnabled)
gerritTriggerEnabled
- on or off. null == on.public int getNrOfScanThreads()
BuildFailureScanner
.
Will return nothing less than MINIMUM_NR_OF_SCAN_THREADS
.
public void setNrOfScanThreads(int nrOfScanThreads)
BuildFailureScanner
.
Will throw an IllegalArgumentException
if the parameter is less than MINIMUM_NR_OF_SCAN_THREADS
.
nrOfScanThreads
- the number of scan threads.public static boolean shouldScan(hudson.model.AbstractBuild build)
build
- the build
#shouldScan(AbstractProject)}
public static boolean shouldScan(hudson.model.AbstractProject project)
isGlobalEnabled()
and if the
project has ScannerJobProperty.isDoNotScan()
.
project
- the project
public KnowledgeBase getKnowledgeBase()
public hudson.ExtensionList<KnowledgeBase.KnowledgeBaseDescriptor> getKnowledgeBaseDescriptors()
public KnowledgeBase.KnowledgeBaseDescriptor getKnowledgeBaseDescriptor(String descString)
descString
- either name of a KnowledgeBaseDescriptor or the fully qualified name.
public void configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject o) throws hudson.model.Descriptor.FormException, IOException
configure
in class hudson.Plugin
hudson.model.Descriptor.FormException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |