From 1febc6b19e50bfa0c14c1c63653f3c62e208253e Mon Sep 17 00:00:00 2001 From: adriancole Date: Mon, 4 Feb 2013 08:50:42 -0800 Subject: [PATCH] issue #1184 command names for jenkins --- .../main/java/org/jclouds/jenkins/v1/JenkinsAsyncApi.java | 2 ++ .../org/jclouds/jenkins/v1/features/ComputerAsyncApi.java | 3 +++ .../java/org/jclouds/jenkins/v1/features/JobAsyncApi.java | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsAsyncApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsAsyncApi.java index 22f080725d..d097195d43 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsAsyncApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.jenkins.v1; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -48,6 +49,7 @@ public interface JenkinsAsyncApi { /** * @see JenkinsApi#getMaster */ + @Named("GetMaster") @GET @Path("/api/json") @Consumes(MediaType.APPLICATION_JSON) diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerAsyncApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerAsyncApi.java index b0f8ed1d78..81607f74b9 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerAsyncApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.jenkins.v1.features; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -48,6 +49,7 @@ public interface ComputerAsyncApi { /** * @see ComputerApi#getView */ + @Named("ListComputers") @GET @Path("/computer/api/json") @Consumes(MediaType.APPLICATION_JSON) @@ -56,6 +58,7 @@ public interface ComputerAsyncApi { /** * @see ComputerApi#get */ + @Named("GetComputer") @GET @Path("/computer/{displayName}/api/json") @Consumes(MediaType.APPLICATION_JSON) diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobAsyncApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobAsyncApi.java index 0d257a5f49..4dd8ea15c9 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobAsyncApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.jenkins.v1.features; import java.util.Map; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; @@ -55,6 +56,7 @@ public interface JobAsyncApi { /** * @see JobApi#createFromXML */ + @Named("CreateItem") @POST @Path("/createItem") @Produces(MediaType.TEXT_XML) @@ -63,6 +65,7 @@ public interface JobAsyncApi { /** * @see JobApi#get */ + @Named("GetJob") @GET @Path("/job/{displayName}/api/json") @Consumes(MediaType.APPLICATION_JSON) @@ -72,6 +75,7 @@ public interface JobAsyncApi { /** * @see JobApi#delete */ + @Named("DeleteJob") @POST @Path("/job/{displayName}/doDelete") @Fallback(VoidOn302Or404.class) @@ -80,6 +84,7 @@ public interface JobAsyncApi { /** * @see JobApi#buildJob */ + @Named("Build") @POST @Path("/job/{displayName}/build") @Fallback(NullOnNotFoundOr404.class) @@ -88,6 +93,7 @@ public interface JobAsyncApi { /** * @see JobApi#buildJobWithParameters */ + @Named("BuildWithParameters") @POST @Path("/job/{displayName}/buildWithParameters") @Fallback(NullOnNotFoundOr404.class) @@ -97,6 +103,7 @@ public interface JobAsyncApi { /** * @see JobApi#fetchConfigXML */ + @Named("GetConfigXML") @GET @Path("/job/{displayName}/config.xml") @Fallback(NullOnNotFoundOr404.class) @@ -105,6 +112,7 @@ public interface JobAsyncApi { /** * @see JobApi#lastBuild */ + @Named("GetLastBuild") @GET @Path("/job/{displayName}/lastBuild/api/json") @Consumes(MediaType.APPLICATION_JSON)