mirror of https://github.com/apache/jclouds.git
Refactor clients to be more consistent
This commit is contained in:
parent
eef98d85d3
commit
5bb34f4599
|
@ -135,7 +135,7 @@ public class CustomizationSection extends SectionType {
|
|||
// For JAXB
|
||||
}
|
||||
|
||||
@XmlElement(name = "CustomizeOnInstantiate")
|
||||
@XmlElement(name = "CustomizeOnInstantiate", required = true)
|
||||
protected boolean customizeOnInstantiate;
|
||||
@XmlElement(name = "Link")
|
||||
protected Set<Link> links = Sets.newLinkedHashSet();
|
||||
|
|
|
@ -53,6 +53,7 @@ public interface AdminOrgClient extends OrgClient {
|
|||
* @param orgRef the reference for the admin org
|
||||
* @return the admin org
|
||||
*/
|
||||
@Override
|
||||
AdminOrg getOrg(URI orgRef);
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,5 +47,6 @@ public interface AdminVdcAsyncClient extends VdcAsyncClient {
|
|||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
@Override
|
||||
ListenableFuture<AdminVdc> getVdc(@EndpointParam URI vdcRef);
|
||||
}
|
||||
|
|
|
@ -44,5 +44,6 @@ public interface AdminVdcClient extends VdcClient {
|
|||
*
|
||||
* @return the admin vDC or null if not found
|
||||
*/
|
||||
@Override
|
||||
AdminVdc getVdc(URI vdcRef);
|
||||
}
|
||||
|
|
|
@ -60,21 +60,21 @@ public interface QueryAsyncClient {
|
|||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> queryAll(@QueryParam("type") String type);
|
||||
ListenableFuture<QueryResultRecords<?>> queryAll(@QueryParam("type") String type);
|
||||
|
||||
@GET
|
||||
@Path("/query")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> query(@QueryParam("type") String type, @QueryParam("filter") String filter);
|
||||
ListenableFuture<QueryResultRecords<?>> query(@QueryParam("type") String type, @QueryParam("filter") String filter);
|
||||
|
||||
@GET
|
||||
@Path("/query")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> query(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize,
|
||||
ListenableFuture<QueryResultRecords<?>> query(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize,
|
||||
@QueryParam("format") String format, @QueryParam("type") String type, @QueryParam("filter") String filter);
|
||||
|
||||
/**
|
||||
|
@ -85,21 +85,21 @@ public interface QueryAsyncClient {
|
|||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> catalogsQueryAll();
|
||||
ListenableFuture<QueryResultRecords<?>> catalogsQueryAll();
|
||||
|
||||
@GET
|
||||
@Path("/catalogs/query")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> catalogsQuery(@QueryParam("filter") String filter);
|
||||
ListenableFuture<QueryResultRecords<?>> catalogsQuery(@QueryParam("filter") String filter);
|
||||
|
||||
@GET
|
||||
@Path("/catalogs/query")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<QueryResultRecords> catalogsQuery(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize,
|
||||
ListenableFuture<QueryResultRecords<?>> catalogsQuery(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize,
|
||||
@QueryParam("filter") String filter);
|
||||
|
||||
@GET
|
||||
|
|
|
@ -43,11 +43,11 @@ public interface QueryClient {
|
|||
*/
|
||||
QueryList queryList();
|
||||
|
||||
QueryResultRecords queryAll(String type);
|
||||
QueryResultRecords<?> queryAll(String type);
|
||||
|
||||
QueryResultRecords query(String type, String filter);
|
||||
QueryResultRecords<?> query(String type, String filter);
|
||||
|
||||
QueryResultRecords query(Integer page, Integer pageSize, String format, String type, String filter);
|
||||
QueryResultRecords<?> query(Integer page, Integer pageSize, String format, String type, String filter);
|
||||
|
||||
/**
|
||||
* Retrieves a list of Catalogs by using REST API general QueryHandler.
|
||||
|
@ -60,11 +60,11 @@ public interface QueryClient {
|
|||
* GET /catalogs/query
|
||||
* </pre>
|
||||
*/
|
||||
QueryResultRecords catalogsQueryAll();
|
||||
QueryResultRecords<?> catalogsQueryAll();
|
||||
|
||||
QueryResultRecords catalogsQuery(String filter);
|
||||
QueryResultRecords<?> catalogsQuery(String filter);
|
||||
|
||||
QueryResultRecords catalogsQuery(Integer page, Integer pageSize, String filter);
|
||||
QueryResultRecords<?> catalogsQuery(Integer page, Integer pageSize, String filter);
|
||||
|
||||
CatalogReferences catalogReferencesQueryAll();
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ public interface VAppAsyncClient {
|
|||
@BinderParam(BindToXMLPayload.class) MediaInsertOrEjectParams mediaParams);
|
||||
|
||||
/**
|
||||
* @return asynchronous access to {@link Writable} features
|
||||
* @return asynchronous access to {@link Metadata} features
|
||||
*/
|
||||
@Delegate
|
||||
MetadataAsyncClient.Writable getMetadataClient();
|
||||
|
|
|
@ -434,7 +434,7 @@ public interface VAppClient {
|
|||
Task insertMedia(URI vAppURI, MediaInsertOrEjectParams mediaParams);
|
||||
|
||||
/**
|
||||
* @return synchronous access to {@link Metadata.Writeable} features
|
||||
* @return synchronous access to {@link Metadata} features
|
||||
*/
|
||||
@Delegate
|
||||
MetadataClient.Writeable getMetadataClient();
|
||||
|
|
Loading…
Reference in New Issue