@Path(value="/subscription") public class CswSubscriptionEndpoint extends Object implements CswSubscribe, Subscriber
Constructor and Description |
---|
CswSubscriptionEndpoint(EventProcessor eventProcessor,
TransformerManager mimeTypeTransformerManager,
TransformerManager schemaTransformerManager,
TransformerManager inputTransformerManager,
Validator validator,
CswQueryFactory queryFactory) |
Modifier and Type | Method and Description |
---|---|
String |
addOrUpdateSubscription(GetRecordsType request,
boolean persistSubscription) |
javax.ws.rs.core.Response |
createEvent(GetRecordsResponseType recordsResponse)
Consume a create event
|
javax.ws.rs.core.Response |
createOrUpdateSubscription(GetRecordsType request,
String requestId) |
javax.ws.rs.core.Response |
createOrUpdateSubscription(GetRecordsType request,
String requestId,
boolean persist) |
javax.ws.rs.core.Response |
createRecordsSubscription(GetRecordsRequest request)
Create a subscription
|
javax.ws.rs.core.Response |
createRecordsSubscription(GetRecordsType request)
Create a subscription
|
CswSubscription |
createSubscription(GetRecordsType request) |
javax.ws.rs.core.Response |
deleteEvent(GetRecordsResponseType recordsResponse)
Consume a delete event
|
javax.ws.rs.core.Response |
deleteRecordsSubscription(String requestId)
Deletes an active subscription
|
boolean |
deleteSubscription(String subscriptionId)
Deletes a subscription with the specified ID.
|
javax.ws.rs.core.Response |
getRecordsSubscription(String requestId)
Get an active subscription
|
boolean |
hasSubscription(String subscriptionId) |
javax.ws.rs.core.Response |
ping()
Consume a ping event
|
javax.ws.rs.core.Response |
updateEvent(GetRecordsResponseType recordsResponse)
Consume an update event
|
javax.ws.rs.core.Response |
updateRecordsSubscription(String requestId,
GetRecordsType request)
Updates an active subscription
|
public CswSubscriptionEndpoint(EventProcessor eventProcessor, TransformerManager mimeTypeTransformerManager, TransformerManager schemaTransformerManager, TransformerManager inputTransformerManager, Validator validator, CswQueryFactory queryFactory)
@DELETE @Path(value="/{requestId}") @Produces(value="*/*") public javax.ws.rs.core.Response deleteRecordsSubscription(@PathParam(value="requestId") String requestId) throws CswException
deleteRecordsSubscription
in interface CswSubscribe
requestId
- the requestId of the subscription to be removedCswException
@GET @Path(value="/{requestId}") @Produces(value="*/*") public javax.ws.rs.core.Response getRecordsSubscription(@PathParam(value="requestId") String requestId)
getRecordsSubscription
in interface CswSubscribe
requestId
- the requestId of the subscription to getCswException
@PUT @Path(value="/{requestId}") @Consumes(value={"text/xml","application/xml"}) @Produces(value="*/*") public javax.ws.rs.core.Response updateRecordsSubscription(@PathParam(value="requestId") String requestId, GetRecordsType request) throws CswException
updateRecordsSubscription
in interface CswSubscribe
requestId
- the requestId of the subscription to getrequest
- the GetRocordsType request which contains the filter that the subscription is
subscribing too and a ResponseHandler URL that will handle the CswRecordCollection response
messages. When an create, update or delete event is received a CswRecordCollection will be
sent via a POST, PUT or DELETE to the ResponseHandler URL.CswException
@GET @Produces(value="*/*") public javax.ws.rs.core.Response createRecordsSubscription(@QueryParam(value="") GetRecordsRequest request) throws CswException
createRecordsSubscription
in interface CswSubscribe
request
- the GetRecordsRequest request which contains the filter that the subscription is
subscribing too and a ResponseHandler URL that will handle the CswRecordCollection response
messages. When an create, update or delete event is received a CswRecordCollection will be
sent via a POST, PUT or DELETE to the ResponseHandler URL.CswException
@POST @Consumes(value={"text/xml","application/xml"}) @Produces(value="*/*") public javax.ws.rs.core.Response createRecordsSubscription(GetRecordsType request) throws CswException
createRecordsSubscription
in interface CswSubscribe
request
- the GetRecordsType request which contains the filter that the subscription is
subscribing too and a ResponseHandler URL that will handle the CswRecordCollection response
messages. When an create, update or delete event is received a CswRecordCollection will be
sent via a POST, PUT or DELETE to the ResponseHandler URLCswException
public javax.ws.rs.core.Response createOrUpdateSubscription(GetRecordsType request, String requestId) throws CswException
CswException
public javax.ws.rs.core.Response createOrUpdateSubscription(GetRecordsType request, String requestId, boolean persist) throws CswException
CswException
@POST @Path(value="/event") @Consumes(value={"text/xml","application/xml"}) @Produces(value={"text/xml","application/xml"}) public javax.ws.rs.core.Response createEvent(GetRecordsResponseType recordsResponse) throws CswException
CswSubscribe
createEvent
in interface CswSubscribe
recordsResponse
- the GetRecordsResponseType search results must be urn:catalog:metacard
formatCswException
- for validation errors returns a 400@PUT @Path(value="/event") @Consumes(value={"text/xml","application/xml"}) @Produces(value={"text/xml","application/xml"}) public javax.ws.rs.core.Response updateEvent(GetRecordsResponseType recordsResponse) throws CswException
CswSubscribe
updateEvent
in interface CswSubscribe
recordsResponse
- the GetRecordsResponseType search results must be urn:catalog:metacard
format with two metacards the updated one being the first and the previous version being
the secondsCswException
- for validation errors returns a 400@DELETE @Path(value="/event") @Consumes(value={"text/xml","application/xml"}) @Produces(value={"text/xml","application/xml"}) public javax.ws.rs.core.Response deleteEvent(GetRecordsResponseType recordsResponse) throws CswException
CswSubscribe
deleteEvent
in interface CswSubscribe
recordsResponse
- the GetRecordsResponseType search results must be urn:catalog:metacard
formatCswException
- for validation errors returns a 400@HEAD @Path(value="/event") public javax.ws.rs.core.Response ping()
CswSubscribe
ping
in interface CswSubscribe
public boolean hasSubscription(String subscriptionId)
public CswSubscription createSubscription(GetRecordsType request) throws CswException
CswException
public String addOrUpdateSubscription(GetRecordsType request, boolean persistSubscription) throws CswException
CswException
public boolean deleteSubscription(String subscriptionId)
Subscriber
deleteSubscription
in interface Subscriber
subscriptionId
- the globally unique UUID for a subscriptionThis work is licensed under a Creative Commons Attribution 4.0 International License.