public class ExtrinsicsResource extends Object
Constructor and Description |
---|
ExtrinsicsResource(javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.Request request,
RegistryService registryService) |
Modifier and Type | Method and Description |
---|---|
protected static void |
addApproveExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
ExtrinsicObject extrinsic) |
protected static void |
addDeprecateExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
ExtrinsicObject extrinsic) |
protected static void |
addEarliestExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
RegistryService registryService,
ExtrinsicObject extrinsic) |
protected static void |
addLatestExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
RegistryService registryService,
ExtrinsicObject extrinsic) |
protected static void |
addNextExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
RegistryService registryService,
ExtrinsicObject extrinsic) |
protected static void |
addPreviousExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder,
javax.ws.rs.core.UriInfo uriInfo,
RegistryService registryService,
ExtrinsicObject extrinsic) |
javax.ws.rs.core.Response |
changeStatus(String guid,
ObjectAction action)
Updates the status of the extrinsic with the given global identifier.
|
javax.ws.rs.core.Response |
deleteExtrinsic(String guid)
Removes the extrinsic with the given global identifier.
|
javax.ws.rs.core.Response |
getEarliestVersion(String lid)
Retrieves the earliest extrinsic from the registry.
|
javax.ws.rs.core.Response |
getExtrinsic(String guid)
Retrieves a single extrinsic from the registry.
|
javax.ws.rs.core.Response |
getExtrinsics(Integer start,
Integer rows,
String guid,
String name,
String lid,
String versionName,
String objectType,
String contentVersion,
String mimeType,
ObjectStatus status,
QueryOperator operator,
List<String> sort)
Allows access to all the extrinsics managed by the registry.
|
protected static URI |
getExtrinsicUri(ExtrinsicObject extrinsic,
javax.ws.rs.core.UriInfo uriInfo) |
PagedResponse<ExtrinsicObject> |
getExtrinsicVersions(String lid)
Retrieves the collection of extrinsics that share the same logical
identifier.
|
javax.ws.rs.core.Response |
getLatestVersion(String lid)
Retrieves the latest extrinsic from the registry.
|
javax.ws.rs.core.Response |
publishExtrinsic(ExtrinsicObject extrinsic,
String packageGuid)
Publishes an extrinsic object to the registry.
|
javax.ws.rs.core.Response |
updateExtrinsic(String guid,
ExtrinsicObject extrinsic)
Updates the existing extrinsic with the given logical identifier and
version.
|
javax.ws.rs.core.Response |
versionExtrinsic(ExtrinsicObject extrinsic,
String lid,
boolean major,
String packageGuid)
Creates a new version of an extrinsic in the registry.
|
public ExtrinsicsResource(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, RegistryService registryService)
public javax.ws.rs.core.Response getExtrinsics(Integer start, Integer rows, String guid, String name, String lid, String versionName, String objectType, String contentVersion, String mimeType, ObjectStatus status, QueryOperator operator, List<String> sort)
start
- the index at which to start the result list fromrows
- how many results to returnguid
- filter to apply on the global unique id, supports wildcard (*)name
- filter to apply to name, support wildcard (*)lid
- filter to apply to logical id, supports wildcard (*)versionName
- filter to apply to registry object version, supports wildcard (*)objectType
- filter to apply on the user defined registry object types,supports
wildcard (*)status
- filter to apply on the object status, maps to ObjectStatus
enumoperator
- to apply to filters, valid values are AND or OR. Defaults to AND.sort
- defines what parameters to sort on. The format is
"parameter order" the order is optional. The default is "guid ASC"
and if unspecified the ordering is ASC.public javax.ws.rs.core.Response publishExtrinsic(ExtrinsicObject extrinsic, String packageGuid)
extrinsic
- to publish to registrypackageGuid
- optional package guid which this registry object will be a member ofpublic javax.ws.rs.core.Response versionExtrinsic(ExtrinsicObject extrinsic, String lid, boolean major, String packageGuid)
extrinsic
- to update tolid
- the logical identifier to the extrinsicmajor
- if true indicates a major revision otherwise considered minorpackageGuid
- optional package guid which this registry object will be a member ofpublic PagedResponse<ExtrinsicObject> getExtrinsicVersions(String lid)
lid
- local identifier of set extrinsics to retrievepublic javax.ws.rs.core.Response getEarliestVersion(String lid)
lid
- local identifier of product to retrievepublic javax.ws.rs.core.Response getLatestVersion(String lid)
lid
- the logical identifier to the extrinsicpublic javax.ws.rs.core.Response getExtrinsic(String guid)
guid
- unique identifier of registry itempublic javax.ws.rs.core.Response updateExtrinsic(String guid, ExtrinsicObject extrinsic)
guid
- unique identifier of registry itemextrinsic
- to update topublic javax.ws.rs.core.Response deleteExtrinsic(String guid)
guid
- unique identifier of registry itempublic javax.ws.rs.core.Response changeStatus(String guid, ObjectAction action)
guid
- unique identifier of registry itemaction
- to take on extrinsic which will result in an update of status
ObjectAction
protected static void addPreviousExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, RegistryService registryService, ExtrinsicObject extrinsic)
protected static void addNextExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, RegistryService registryService, ExtrinsicObject extrinsic)
protected static void addEarliestExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, RegistryService registryService, ExtrinsicObject extrinsic)
protected static void addLatestExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, RegistryService registryService, ExtrinsicObject extrinsic)
protected static void addDeprecateExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, ExtrinsicObject extrinsic)
protected static void addApproveExtrinsicLink(javax.ws.rs.core.Response.ResponseBuilder builder, javax.ws.rs.core.UriInfo uriInfo, ExtrinsicObject extrinsic)
protected static URI getExtrinsicUri(ExtrinsicObject extrinsic, javax.ws.rs.core.UriInfo uriInfo)
Copyright © 2010–2018 Planetary Data System. All rights reserved.