Class CswSubscriptionEndpoint
java.lang.Object
org.codice.ddf.spatial.ogc.csw.catalog.endpoint.CswSubscriptionEndpoint
- All Implemented Interfaces:
ddf.catalog.event.Subscriber,CswSubscribe
@Path("/subscription")
public class CswSubscriptionEndpoint
extends Object
implements CswSubscribe, ddf.catalog.event.Subscriber
-
Constructor Summary
ConstructorsConstructorDescriptionCswSubscriptionEndpoint(ddf.catalog.event.EventProcessor eventProcessor, TransformerManager mimeTypeTransformerManager, TransformerManager schemaTransformerManager, TransformerManager inputTransformerManager, Validator validator, CswQueryFactory queryFactory, org.codice.ddf.cxf.client.ClientBuilderFactory clientBuilderFactory, org.codice.ddf.security.Security security) -
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, boolean persistSubscription) javax.ws.rs.core.ResponsecreateEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) javax.ws.rs.core.ResponsecreateOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, String requestId) javax.ws.rs.core.ResponsecreateOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, String requestId, boolean persist) javax.ws.rs.core.ResponsecreateRecordsSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request) Create a subscriptionjavax.ws.rs.core.ResponseCreate a subscriptioncreateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request) javax.ws.rs.core.ResponsedeleteEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) javax.ws.rs.core.ResponsedeleteRecordsSubscription(String requestId) Deletes an active subscriptionbooleandeleteSubscription(String subscriptionId) javax.ws.rs.core.ResponsegetRecordsSubscription(String requestId) Get an active subscriptionbooleanhasSubscription(String subscriptionId) javax.ws.rs.core.Responseping()javax.ws.rs.core.ResponseupdateEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) javax.ws.rs.core.ResponseupdateRecordsSubscription(String requestId, net.opengis.cat.csw.v_2_0_2.GetRecordsType request) Updates an active subscription
-
Constructor Details
-
CswSubscriptionEndpoint
public CswSubscriptionEndpoint(ddf.catalog.event.EventProcessor eventProcessor, TransformerManager mimeTypeTransformerManager, TransformerManager schemaTransformerManager, TransformerManager inputTransformerManager, Validator validator, CswQueryFactory queryFactory, org.codice.ddf.cxf.client.ClientBuilderFactory clientBuilderFactory, org.codice.ddf.security.Security security)
-
-
Method Details
-
deleteRecordsSubscription
@DELETE @Path("/{requestId}") @Produces("*/*") public javax.ws.rs.core.Response deleteRecordsSubscription(@PathParam("requestId") String requestId) throws CswException Deletes an active subscription- Specified by:
deleteRecordsSubscriptionin interfaceCswSubscribe- Parameters:
requestId- the requestId of the subscription to be removed- Returns:
- Acknowledgment returns a CSW Acknowledgment message with the subscription that was deleted or an empty 404 if none are found
- Throws:
CswException
-
getRecordsSubscription
@GET @Path("/{requestId}") @Produces("*/*") public javax.ws.rs.core.Response getRecordsSubscription(@PathParam("requestId") String requestId) Get an active subscription- Specified by:
getRecordsSubscriptionin interfaceCswSubscribe- Parameters:
requestId- the requestId of the subscription to get- Returns:
- Acknowledgment returns a CSW Acknowledgment message with the subscription that was found or an empty 404 if none are found
- Throws:
CswException
-
updateRecordsSubscription
@PUT @Path("/{requestId}") @Consumes({"text/xml","application/xml"}) @Produces("*/*") public javax.ws.rs.core.Response updateRecordsSubscription(@PathParam("requestId") String requestId, net.opengis.cat.csw.v_2_0_2.GetRecordsType request) throws CswException Updates an active subscription- Specified by:
updateRecordsSubscriptionin interfaceCswSubscribe- Parameters:
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.- Returns:
- Acknowledgment returns a CSW Acknowledgment message with the subscription that was updated or added
- Throws:
CswException
-
createRecordsSubscription
@GET @Produces("*/*") public javax.ws.rs.core.Response createRecordsSubscription(@QueryParam("") GetRecordsRequest request) throws CswException Create a subscription- Specified by:
createRecordsSubscriptionin interfaceCswSubscribe- Parameters:
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.- Returns:
- Acknowledgment returns a CSW Acknowledgment message with the subscription that was added
- Throws:
CswException
-
createRecordsSubscription
@POST @Consumes({"text/xml","application/xml"}) @Produces("*/*") public javax.ws.rs.core.Response createRecordsSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request) throws CswException Create a subscription- Specified by:
createRecordsSubscriptionin interfaceCswSubscribe- Parameters:
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 URL- Returns:
- Acknowledgment returns a CSW Acknowledgment message with the subscription that was added
- Throws:
CswException
-
createOrUpdateSubscription
public javax.ws.rs.core.Response createOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, String requestId) throws CswException - Throws:
CswException
-
createOrUpdateSubscription
public javax.ws.rs.core.Response createOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, String requestId, boolean persist) throws CswException - Throws:
CswException
-
createEvent
@POST @Path("/event") @Consumes({"text/xml","application/xml"}) @Produces({"text/xml","application/xml"}) public javax.ws.rs.core.Response createEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) throws CswException - Specified by:
createEventin interfaceCswSubscribe- Throws:
CswException
-
updateEvent
@PUT @Path("/event") @Consumes({"text/xml","application/xml"}) @Produces({"text/xml","application/xml"}) public javax.ws.rs.core.Response updateEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) throws CswException - Specified by:
updateEventin interfaceCswSubscribe- Throws:
CswException
-
deleteEvent
@DELETE @Path("/event") @Consumes({"text/xml","application/xml"}) @Produces({"text/xml","application/xml"}) public javax.ws.rs.core.Response deleteEvent(net.opengis.cat.csw.v_2_0_2.GetRecordsResponseType recordsResponse) throws CswException - Specified by:
deleteEventin interfaceCswSubscribe- Throws:
CswException
-
ping
@HEAD @Path("/event") public javax.ws.rs.core.Response ping()- Specified by:
pingin interfaceCswSubscribe
-
hasSubscription
-
createSubscription
public CswSubscription createSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request) throws CswException - Throws:
CswException
-
addOrUpdateSubscription
public String addOrUpdateSubscription(net.opengis.cat.csw.v_2_0_2.GetRecordsType request, boolean persistSubscription) throws CswException - Throws:
CswException
-
deleteSubscription
- Specified by:
deleteSubscriptionin interfaceddf.catalog.event.Subscriber
-