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 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:
      deleteRecordsSubscription in interface CswSubscribe
      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:
      getRecordsSubscription in interface CswSubscribe
      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:
      updateRecordsSubscription in interface CswSubscribe
      Parameters:
      requestId - the requestId of the subscription to get
      request - 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:
      createRecordsSubscription in interface CswSubscribe
      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:
      createRecordsSubscription in interface CswSubscribe
      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:
      createEvent in interface CswSubscribe
      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:
      updateEvent in interface CswSubscribe
      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:
      deleteEvent in interface CswSubscribe
      Throws:
      CswException
    • ping

      @HEAD @Path("/event") public javax.ws.rs.core.Response ping()
      Specified by:
      ping in interface CswSubscribe
    • hasSubscription

      public boolean hasSubscription(String subscriptionId)
    • 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

      public boolean deleteSubscription(String subscriptionId)
      Specified by:
      deleteSubscription in interface ddf.catalog.event.Subscriber