mirror of https://github.com/apache/jclouds.git
implement updateCatalog in clients
This commit is contained in:
parent
fb74964e61
commit
d3f741c132
|
@ -22,11 +22,16 @@ import java.net.URI;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.PUT;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
|
||||||
|
import org.jclouds.rest.annotations.BinderParam;
|
||||||
import org.jclouds.rest.annotations.EndpointParam;
|
import org.jclouds.rest.annotations.EndpointParam;
|
||||||
import org.jclouds.rest.annotations.ExceptionParser;
|
import org.jclouds.rest.annotations.ExceptionParser;
|
||||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||||
import org.jclouds.rest.annotations.RequestFilters;
|
import org.jclouds.rest.annotations.RequestFilters;
|
||||||
|
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||||
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
||||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||||
|
@ -41,7 +46,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
||||||
public interface AdminCatalogAsyncClient {
|
public interface AdminCatalogAsyncClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves an admin catalog.
|
* @see AdminClient#getCatalog(URI)
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Consumes
|
@Consumes
|
||||||
|
@ -49,7 +54,17 @@ public interface AdminCatalogAsyncClient {
|
||||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||||
ListenableFuture<AdminCatalog> getCatalog(@EndpointParam URI catalogRef);
|
ListenableFuture<AdminCatalog> getCatalog(@EndpointParam URI catalogRef);
|
||||||
|
|
||||||
// PUT /admin/catalog/{id}
|
/**
|
||||||
|
* @see AdminClient#getCatalog(URI)
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Consumes(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||||
|
@Produces(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||||
|
@JAXBResponseParser
|
||||||
|
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||||
|
ListenableFuture<AdminCatalog> updateCatalog(@EndpointParam URI catalogRef,
|
||||||
|
@BinderParam(BindToXMLPayload.class) AdminCatalog catalog);
|
||||||
|
|
||||||
// DELETE /admin/catalog/{id}
|
// DELETE /admin/catalog/{id}
|
||||||
// POST /admin/catalog/{id}/action/publish
|
// POST /admin/catalog/{id}/action/publish
|
||||||
// GET /admin/catalog/{id}/owner
|
// GET /admin/catalog/{id}/owner
|
||||||
|
|
|
@ -44,4 +44,16 @@ public interface AdminCatalogClient {
|
||||||
* @return a catalog
|
* @return a catalog
|
||||||
*/
|
*/
|
||||||
AdminCatalog getCatalog(URI catalogRef);
|
AdminCatalog getCatalog(URI catalogRef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modifies a catalog. A catalog could be published or unpublished. The IsPublished property is treated as a
|
||||||
|
* read only value by the server. In order to control publishing settings use the 'publish' action must be used.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* PUT /admin/catalog/{id}
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @return the updated catalog
|
||||||
|
*/
|
||||||
|
AdminCatalog updateCatalog(URI catalogRef, AdminCatalog catalog);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue