Class DataProviderService

java.lang.Object
com.priint.pubserver.plugin.PluginControlDefault
com.priint.pubserver.entitydata.service.AbstractService
com.priint.pubserver.entitydata.service.DataProviderService
All Implemented Interfaces:
com.priint.pubserver.plugin.interfaces.PluginControl

@Consumes({"application/json","application/xml"}) @Produces({"application/json","application/xml"}) @Path("/dataprovider") public class DataProviderService extends AbstractService
RESTful service interface for querying entity model manager of publishing server.

Supports through its URIs some helper methods from EntityManagerRemote interface.

You may use either XML or JSON as serialization method.

In case of errors a ServerResult object will be returned along with the HTTP status code (in most cases 500) containing exception details.

Since:
4.0.5
  • Field Details

    • MAPPED_NAME

      public static final String MAPPED_NAME
      The mapped name for the `DataProviderService` class.

      This constant is used to uniquely identify the `DataProviderService` in the application server's JNDI registry. It provides a reference for accessing the service within the application.

      See Also:
  • Constructor Details

    • DataProviderService

      public DataProviderService()
  • Method Details

    • get

      @GET @Path("/{identifier}") public com.priint.pubserver.webservice.ServiceResult get(@PathParam("identifier") String identifier, @QueryParam("model") String model, @QueryParam("entity") String entity, @QueryParam("resultEntity") String resultEntity, @QueryParam("record") String record, @QueryParam("recordGroup") String recordGroup, @QueryParam("searchString") String searchString, @QueryParam("assortment") String assortment, @QueryParam("country") String country, @QueryParam("language") String language, @QueryParam("well") String well, @QueryParam("publication") String publication, @QueryParam("targetGroup") String targetGroup, @QueryParam("market") String market, @QueryParam("documentId") String documentId, @QueryParam("resultClass") String className) throws com.priint.pubserver.exception.PubServerException
      Retrieves data for a specified identifier, applying various optional filters such as model, entity, and other parameters like country, language, and target group.

      This method handles a GET request to fetch data based on an identifier and various optional query parameters. It processes the query and returns the resulting data in the specified class format. If the class name provided in the resultClass parameter is valid, it is used to cast the result data; otherwise, an error is returned.

      Parameters:
      identifier - The unique identifier for the data to be retrieved.
      model - The model name used to query the data.
      entity - The name of the entity to fetch data for.
      resultEntity - The specific result entity type to be returned.
      record - The record identifier, if applicable.
      recordGroup - The group of records, if applicable.
      searchString - The search string for filtering results.
      assortment - The assortment parameter used for filtering.
      country - The country parameter for filtering results.
      language - The language parameter for filtering results.
      well - The well parameter used for additional filtering.
      publication - The publication filter, if any.
      targetGroup - The target group for the data.
      market - The market parameter used for filtering.
      documentId - The document ID for querying related data.
      className - The class name to which the result data should be cast. If null, Object.class is used.
      Returns:
      A ServiceResult instance containing the query result. The result is returned as a collection of objects matching the resultClass. If an error occurs (e.g., invalid class name), an error instance is returned.
      Throws:
      com.priint.pubserver.exception.PubServerException - If there is an error retrieving the data or processing the request.