com.sonyericsson.hudson.plugins.metadata.cli
Class HttpCliRootAction
java.lang.Object
com.sonyericsson.hudson.plugins.metadata.cli.HttpCliRootAction
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction
@Extension
public class HttpCliRootAction
- extends Object
- implements hudson.model.RootAction
Http interface for the CLI commands.
As some systems prefer to have a bit more intimate call API towards other systems than what
CLICommand
s provide.
This action exposes GetMetadataCommand
and UpdateMetadataCommand
to
a standard HTTP post or GET.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary |
protected static String |
URL
The URL to this action. |
Method Summary |
void |
doGet(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Get the metadata in a container. |
void |
doUpdate(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Update the metadata in a container. |
String |
getDisplayName()
|
String |
getIconFileName()
|
String |
getUrlName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URL
protected static final String URL
- The URL to this action.
- See Also:
- Constant Field Values
HttpCliRootAction
public HttpCliRootAction()
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interface hudson.model.Action
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interface hudson.model.Action
- Specified by:
getDisplayName
in interface hudson.model.ModelObject
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interface hudson.model.Action
doUpdate
public void doUpdate(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
throws Exception
- Update the metadata in a container. Valid http parameters are : data and (node or job or (job and build)). Ex:
http://jenkinshost/metadata-httpcli/update?node=bobby&data={metadata-type: "metadata-string" name="owner"
value="bobby"}
would update the metadata in on the node named "bobby" with a metadata string with the
name owner and the value "bobby".
- Parameters:
request
- the request.response
- the response
- Throws:
Exception
- if something unknown happened.- See Also:
UpdateMetadataCommand
doGet
public void doGet(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
throws Exception
- Get the metadata in a container. Valid http parameters are : node or job or (job and build). Ex:
http://jenkinshost/metadata-httpcli/get?node=bobby
would give you the metadata in JSON format for
the node named "bobby"
- Parameters:
request
- the request.response
- the response
- Throws:
Exception
- if something unknown happened.- See Also:
GetMetadataCommand
Copyright © 2004-2013. All Rights Reserved.