Class DataProviderService
- All Implemented Interfaces:
com.priint.pubserver.plugin.interfaces.PluginControl
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe 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 -
Method Summary
Modifier and TypeMethodDescriptioncom.priint.pubserver.webservice.ServiceResultget(String identifier, String model, String entity, String resultEntity, String record, String recordGroup, String searchString, String assortment, String country, String language, String well, String publication, String targetGroup, String market, String documentId, 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, toPushDataMethods inherited from class com.priint.pubserver.plugin.PluginControlDefault
afterCreateConfigurations, afterDeleteConfigurations, afterUpdateConfigurations, createConfiguration, deleteConfigurations, getSession, getSessionId, initInstance, loadServerConfig, ping, readSessionAttribute, updateConfigurations, writeSessionAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.priint.pubserver.plugin.interfaces.PluginControl
validateConfigurations
-
Field Details
-
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
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.
-