mirror of https://github.com/apache/jclouds.git
clients impl of publishCatalog
This commit is contained in:
parent
845ce649cc
commit
13a2917d9b
|
@ -23,6 +23,7 @@ import java.net.URI;
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
import javax.ws.rs.DELETE;
|
import javax.ws.rs.DELETE;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.PUT;
|
import javax.ws.rs.PUT;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
|
@ -36,6 +37,7 @@ import org.jclouds.rest.binders.BindToXMLPayload;
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
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.domain.Owner;
|
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -99,6 +101,15 @@ public interface AdminCatalogAsyncClient {
|
||||||
ListenableFuture<Void> setOwner(@EndpointParam URI catalogRef,
|
ListenableFuture<Void> setOwner(@EndpointParam URI catalogRef,
|
||||||
@BinderParam(BindToXMLPayload.class) Owner newOwner);
|
@BinderParam(BindToXMLPayload.class) Owner newOwner);
|
||||||
|
|
||||||
// DELETE /admin/catalog/{id}
|
/**
|
||||||
// POST /admin/catalog/{id}/action/publish
|
* @see AdminClient#AdminClient(URI, PublishCatalogParams)
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/action/publish")
|
||||||
|
@Consumes
|
||||||
|
@Produces(VCloudDirectorMediaType.PUBLISH_CATALOG_PARAMS)
|
||||||
|
@JAXBResponseParser
|
||||||
|
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||||
|
ListenableFuture<Void> publishCatalog(@EndpointParam URI catalogRef,
|
||||||
|
@BinderParam(BindToXMLPayload.class) PublishCatalogParams params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import org.jclouds.concurrent.Timeout;
|
import org.jclouds.concurrent.Timeout;
|
||||||
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.domain.Owner;
|
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides synchronous access to {@link AdminCatalog} objects.
|
* Provides synchronous access to {@link AdminCatalog} objects.
|
||||||
|
@ -86,4 +87,9 @@ public interface AdminCatalogClient {
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
void setOwner(URI catalogRef, Owner newOwner);
|
void setOwner(URI catalogRef, Owner newOwner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publish a catalog. Publishing a catalog makes the catalog visible to all organizations in a vCloud.
|
||||||
|
*/
|
||||||
|
void publishCatalog(URI catalogRef, PublishCatalogParams params);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue