public class Catalog
extends java.lang.Object
Constructor and Description |
---|
Catalog(ViPRCatalogClient parent,
RestClient client) |
Modifier and Type | Method and Description |
---|---|
CategoryInfo |
browse()
Browse the root of the service catalog.
|
CategoryInfo |
browseCategory(java.lang.String path)
Browse the service catalog by path to a cateogy (Path separated with slashes).
|
ServiceInfo |
browseService(java.lang.String path)
Browse the service catalog by path to a service (Path separated with slashes).
|
java.util.List<Reference> |
getAssetDependencies(java.lang.String asset,
java.lang.String service)
Retrieves asset option dependencies for the defined asset.
|
java.util.List<Option> |
getAssetOptions(java.lang.String asset)
Retrieves asset options for the defined asset with no parameters.
|
java.util.List<Option> |
getAssetOptions(java.lang.String asset,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Retrieves asset options for the defined asset.
|
CategoryInfo |
getCategory(java.lang.String id)
Retrieves a category by identifier.
|
ServiceInfo |
getService(java.lang.String id)
Retrieves a service by identifier.
|
java.lang.String |
getServiceDescriptor(java.lang.String id)
Retrieves a service descriptor for the identifier.
|
OrderInfo |
order(java.lang.String serviceId,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Places an order for the service with the given service identifier.
|
OrderInfo |
order(java.lang.String serviceId,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parameters)
Places an order for the service with the given service identifier.
|
OrderInfo |
orderByPath(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Places an order for the service with the given service path.
|
OrderInfo |
orderByPath(java.lang.String path,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parameters)
Places an order for the service with the given service identifier.
|
public Catalog(ViPRCatalogClient parent, RestClient client)
public java.util.List<Option> getAssetOptions(java.lang.String asset)
API Call: GET /api/options/{asset}
asset
- Name of the asset to retrieve options for.public java.util.List<Option> getAssetOptions(java.lang.String asset, java.util.Map<java.lang.String,java.lang.Object> parameters)
API Call: GET /api/options/{asset}
asset
- Name of the asset to retrieve options for.parameters
- Parameters used to match for asset dependencies.public java.util.List<Reference> getAssetDependencies(java.lang.String asset, java.lang.String service)
API Call: GET /api/options/{asset}/dependencies?service={service}
asset
- Name of the asset to retrieve dependencies for.service
- The serviceId of the service descriptor or ID of the catalog service.
The service is used to compute dependencies for a particular service form.public CategoryInfo getCategory(java.lang.String id)
API Call: GET /api/categories/{id}
id
- Category identifier.public ServiceInfo getService(java.lang.String id)
API Call: GET /api/services/{id}
id
- Service identifier.public java.lang.String getServiceDescriptor(java.lang.String id)
API Call: GET /api/services/{id}/descriptor
id
- Service identifier.public CategoryInfo browse()
API Call: GET /api/catalog
public CategoryInfo browseCategory(java.lang.String path)
API Call: GET /api/catalog/{ ... path ...}
path
- Slash separate path to the category.public ServiceInfo browseService(java.lang.String path)
API Call: GET /api/catalog/{ ... path ...}
path
- Slash separate path to the service.public OrderInfo order(java.lang.String serviceId, java.util.Map<java.lang.String,java.lang.Object> parameters) throws ValidationException
API Call: POST /api/services/{serviceId}
serviceId
- Service identifier.parameters
- Map containing key-value parameter pairs.ValidationException
public OrderInfo order(java.lang.String serviceId, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parameters) throws ValidationException
API Call: POST /api/services/{serviceId}
serviceId
- Service identifier.parameters
- MultivaluedMap containing key-value parameter pairs.ValidationException
public OrderInfo orderByPath(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> parameters) throws ValidationException
API Call: POST /api/catalog/{ ... path ...}
path
- Slash separate path to the category.parameters
- Map containing key-value parameter pairs.ValidationException
public OrderInfo orderByPath(java.lang.String path, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parameters) throws ValidationException
API Call: POST /api/catalog/{ ... path ...}
path
- Slash separate path to the category.parameters
- MultivaluedMap containing key-value parameter pairs.ValidationException