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 AbstractServiceRESTful service interface for querying entity model manager of publishing server.Supports through its URIs some helper methods from
EntityManagerRemoteinterface.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 Summary
Fields Modifier and Type Field Description static java.lang.StringMAPPED_NAMEThe mapped name for the `DataProviderService` class.-
Fields inherited from class com.priint.pubserver.entitydata.service.AbstractService
ERR_OBJECT_ALREADY_EXISTS, ERR_OBJECT_DOES_NOT_EXIST, httpServletRequest, httpServletResponse, logger, pluginLibrary, PUBLISHINGHUBDB_MAPPED_NAME, WILDCARD
-
-
Constructor Summary
Constructors Constructor Description DataProviderService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.priint.pubserver.webservice.ServiceResultget(java.lang.String identifier, java.lang.String model, java.lang.String entity, java.lang.String resultEntity, java.lang.String record, java.lang.String recordGroup, java.lang.String searchString, java.lang.String assortment, java.lang.String country, java.lang.String language, java.lang.String well, java.lang.String publication, java.lang.String targetGroup, java.lang.String market, java.lang.String documentId, java.lang.String className)Retrieves data for a specified identifier, applying various optional filters such as model, entity, and other parameters like country, language, and target group.-
Methods inherited from class com.priint.pubserver.entitydata.service.AbstractService
clean, clean, connectorEntityFromRequest, connectorEntityFromRequest, connectorEntityFromRequest, connectorEntityFromRequest, contextFromListField, contextFromListField, fillUpdateItem, fillUpdateRecords, findMethod, fromEntityDataList, fromEntityDataList, lookupBean, lookupConnector, lookupEntityManager, lookupPersistConnector, lookupPlugin, lookupPluginByJndi, lookupPluginByPluginManager, lookupPublishingHubDBConnector, lookupPublishingManagementConnector, preProcessData, setConnectorEntity, setConnectorEntity, toEntityDataList, toEntityDataMap, toEntityDataRecord, toEntityDataRecord4Update, toEntityDataRecord4UpdateList, toEntityDataRecordList, toEntityItem, toEntityItem4UpdateList, toEntityItemForUpdate, toEntityItemList, toPushData
-
Methods inherited from class com.priint.pubserver.plugin.PluginControlDefault
afterCreateConfigurations, afterDeleteConfigurations, afterUpdateConfigurations, createConfiguration, deleteConfigurations, getSession, getSessionId, initInstance, loadServerConfig, ping, readSessionAttribute, updateConfigurations, writeSessionAttribute
-
-
-
-
Field Detail
-
MAPPED_NAME
public static final java.lang.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:
- Constant Field Values
-
-
Method Detail
-
get
@GET @Path("/{identifier}") public com.priint.pubserver.webservice.ServiceResult get(@PathParam("identifier") java.lang.String identifier, @QueryParam("model") java.lang.String model, @QueryParam("entity") java.lang.String entity, @QueryParam("resultEntity") java.lang.String resultEntity, @QueryParam("record") java.lang.String record, @QueryParam("recordGroup") java.lang.String recordGroup, @QueryParam("searchString") java.lang.String searchString, @QueryParam("assortment") java.lang.String assortment, @QueryParam("country") java.lang.String country, @QueryParam("language") java.lang.String language, @QueryParam("well") java.lang.String well, @QueryParam("publication") java.lang.String publication, @QueryParam("targetGroup") java.lang.String targetGroup, @QueryParam("market") java.lang.String market, @QueryParam("documentId") java.lang.String documentId, @QueryParam("resultClass") java.lang.String className) throws com.priint.pubserver.exception.PubServerExceptionRetrieves 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
resultClassparameter 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. Ifnull,Object.classis used.- Returns:
- A
ServiceResultinstance containing the query result. The result is returned as a collection of objects matching theresultClass. 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.
-
-