Plugin.DummyImpl
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVER_NAME
the default server name.
|
static String |
DISPLAY_NAME
What to call this plug-in to humans.
|
static Permission |
MANUAL_TRIGGER
The permission that allows users to perform the
ManualTriggerAction . |
static PermissionGroup |
PERMISSION_GROUP
Any special permissions needed by this plugin are grouped into this.
|
static Permission |
RETRIGGER
The permission that allows users to perform the
RetriggerAction . |
static String |
TEST_SSH_KEYFILE_LOCATION_PROPERTY
System property used during testing to replace the location of the public key for mock connections.
|
Constructor and Description |
---|
PluginImpl() |
Modifier and Type | Method and Description |
---|---|
List<GerritServer> |
addServer(GerritServer s)
Add a server to the list.
|
static boolean |
containsServer_(String serverName)
Static shorthand for
containsServer(String) . |
boolean |
containsServer(String serverName)
Check whether the list of servers contains a GerritServer object of a specific name.
|
protected static void |
doXStreamRegistrations()
Registers XStream alias and converters to handle backwards compatibility with old data.
|
Api |
getApi()
Gets api.
|
static List<Job> |
getConfiguredJobs_(String serverName)
Static shorthand for
getConfiguredJobs(String) . |
List<Job> |
getConfiguredJobs(String serverName)
Return the list of jobs configured with a server.
|
static GerritServer |
getFirstServer_()
Static shorthand for
getFirstServer() . |
GerritServer |
getFirstServer()
Gets the first server in the server list.
|
static com.sonymobile.tools.gerrit.gerritevents.GerritHandler |
getHandler_()
Static shorthand for
getHandler() . |
com.sonymobile.tools.gerrit.gerritevents.GerritHandler |
getHandler()
Returns the GerritHandler object.
|
static PluginImpl |
getInstance()
Returns the instance of this class.
|
static PluginConfig |
getPluginConfig_()
Gets the global config.
|
PluginConfig |
getPluginConfig()
Gets the global config.
|
static GerritServer |
getServer_(String name)
Get a GerritServer object by its name.
|
GerritServer |
getServer(String name)
Get a GerritServer object by its name.
|
static IGerritHudsonTriggerConfig |
getServerConfig(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Finds the server config for the event's provider.
|
static List<String> |
getServerNames_()
Static shorthand for
getServerNames() . |
List<String> |
getServerNames()
Get the list of Gerrit server names.
|
static List<GerritServer> |
getServers_()
Get the list of Gerrit servers.
|
List<GerritServer> |
getServers()
Get the list of Gerrit servers.
|
boolean |
isActive()
Check if this plugin is active.
|
void |
load() |
void |
postInitialize() |
List<GerritServer> |
removeServer(GerritServer s)
Remove a server from the list.
|
static void |
save_()
Static shorthand for
Plugin.save() . |
void |
setServers(List<GerritServer> servers)
Set the list of Gerrit servers.
|
void |
start() |
void |
stop() |
configure, configure, doDynamic, getConfigXml, getWrapper, save, setServletContext
public static final String DISPLAY_NAME
public static final PermissionGroup PERMISSION_GROUP
public static final Permission MANUAL_TRIGGER
ManualTriggerAction
.public static final Permission RETRIGGER
RetriggerAction
.public static final String DEFAULT_SERVER_NAME
public static final String TEST_SSH_KEYFILE_LOCATION_PROPERTY
public Api getApi()
@CheckForNull public static PluginImpl getInstance()
Jenkins.getInstance()
isn't available
or the plugin class isn't registered null will be returned.public boolean isActive()
@Exported public List<GerritServer> getServers()
@Nonnull public static List<GerritServer> getServers_()
getServers()
.
If the plugin instance is not available, and empty list is returned.public List<String> getServerNames()
@Nonnull public static List<String> getServerNames_()
getServerNames()
.public GerritServer getServer(String name)
name
- the name of the server to get.@CheckForNull public static GerritServer getServer_(String name)
getServer(String)
.name
- the name of the server to get.getServer(String)
@CheckForNull public GerritServer getFirstServer()
@CheckForNull public static GerritServer getFirstServer_()
getFirstServer()
.public void setServers(List<GerritServer> servers)
servers
- the list to be set.public List<GerritServer> addServer(GerritServer s)
s
- the server to be added.public List<GerritServer> removeServer(GerritServer s)
s
- the server to be removed.public boolean containsServer(String serverName)
serverName
- to check.public static boolean containsServer_(String serverName)
containsServer(String)
.serverName
- to check.public static IGerritHudsonTriggerConfig getServerConfig(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the eventGerritTriggeredEvent.getProvider()
public PluginConfig getPluginConfig()
@CheckForNull public static PluginConfig getPluginConfig_()
getPluginConfig()
.public static void save_() throws IOException
Plugin.save()
.IOException
- if save does so.public com.sonymobile.tools.gerrit.gerritevents.GerritHandler getHandler()
@CheckForNull public static com.sonymobile.tools.gerrit.gerritevents.GerritHandler getHandler_()
getHandler()
.public List<Job> getConfiguredJobs(String serverName)
serverName
- the name of the Gerrit server.@Nonnull public static List<Job> getConfiguredJobs_(String serverName)
getConfiguredJobs(String)
.
Will return an empty list if plugin instance is null.serverName
- the name of the Gerrit server.public void postInitialize() throws Exception
postInitialize
in class Plugin
Exception
public void load() throws IOException
load
in class Plugin
IOException
protected static void doXStreamRegistrations()
Copyright © 2016–2019. All rights reserved.