Class EntityModelService

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

@Consumes({"application/json","application/xml"}) @Produces({"application/json","application/xml"}) @Path("/entitymodel") public class EntityModelService 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

  • Constructor Details

    • EntityModelService

      public EntityModelService()
  • Method Details

    • modEntityModelIdentifiers

      @Path("/identifiers") @GET public com.priint.pubserver.webservice.ServiceResult modEntityModelIdentifiers() throws com.priint.pubserver.exception.PubServerException
      Get model names.
      Returns:
      ServiceResult
      Throws:
      com.priint.pubserver.exception.PubServerException
    • modModelEntity

      @GET @Path("/{model}/{entityType}/{identifier}") public com.priint.pubserver.entity.Entity modModelEntity(@PathParam("model") String entityModelIdentifier, @PathParam("entityType") String entityType, @PathParam("identifier") String identifier) throws com.priint.pubserver.exception.PubServerException
      Throws:
      com.priint.pubserver.exception.PubServerException
    • modModelEntityByConnectorEntity

      @GET @Path("/{model}/Entity/{identifier}/{entityType}") public com.priint.pubserver.entity.Entity modModelEntityByConnectorEntity(@PathParam("model") String entityModelIdentifier, @PathParam("entityType") String entityType, @PathParam("identifier") String identifier) throws com.priint.pubserver.exception.PubServerException
      Throws:
      com.priint.pubserver.exception.PubServerException
    • modExportModelToXML

      @GET @Path("/{model}") public com.priint.pubserver.entity.EntityModel modExportModelToXML(@PathParam("model") String entityModelIdentifier) throws com.priint.pubserver.exception.PubServerException
      Throws:
      com.priint.pubserver.exception.PubServerException
    • modExportModelConfiguration

      @GET @Path("/{entityModelIdentifier}/PluginConfigList") public jakarta.ws.rs.core.Response modExportModelConfiguration(@PathParam("entityModelIdentifier") String entityModelIdentifier) throws ServiceException
      Parameters:
      entityModelIdentifier -
      Returns:
      list of PluginConfig containing model as well as all entities and their relationships
      Throws:
      ServiceException
    • modImportModelConfiguration

      @POST @Path("/{entityModelIdentifier}/PluginConfigList") public jakarta.ws.rs.core.Response modImportModelConfiguration(@PathParam("entityModelIdentifier") String entityModelIdentifier, @QueryParam("mode") @DefaultValue("") String mode, @QueryParam("connectorIdentifier") @DefaultValue("") String connectorIdentifier, @QueryParam("connectorInstance") @DefaultValue("") String connectorInstance, com.priint.pubserver.webservice.ServiceResult serviceRequest) throws ServiceException
      Parameters:
      entityModelIdentifier -
      mode -
      connectorIdentifier -
      connectorInstance -
      serviceRequest -
      Returns:
      list of PluginConfig containing model as well as all entities and their relationships
      Throws:
      ServiceException
    • modDuplicateModel

      @POST @Path("/{modelId}/duplicate") public jakarta.ws.rs.core.Response modDuplicateModel(@PathParam("modelId") String oldModelId, @QueryParam("new-model") String newModelId, @QueryParam("tenant") String oldTenantName, @QueryParam("new-tenant") String newTenantName, @QueryParam("connector") String oldConnectorSpec, @QueryParam("new-connector") String newConnectorSpec) throws ServiceException
      Duplicate an EntityModel.

      This example shows how to duplicate existing model "aio" on tenant "WerkII" as model "ai2" on tenant "Default", while at the same time replacing all references to connector instance "com.priint.pubserver.connector.jpa.api.PublishingHubDBConnector:aio" by new reference to &newConnectorSpec=com.priint.pubserver.connector.rest.RestConnector:ai2"

      curl -X POST \ 'https://pubserver.example.com/EntityDataService/entitymodel/aio/duplicate?new-model=ai2&tenant=WerkII&new-tenant=Default&connector=com.priint.pubserver.connector.jpa.api.PublishingHubDBConnector:default&new-connector=com.priint.pubserver.connector.rest.RestConnector:ai2' \ -H 'Accept: application/xml'

      Parameters:
      oldModelId -
      newModelId -
      oldTenantName -
      newTenantName -
      oldConnectorSpec -
      newConnectorSpec -
      Returns:
      ServiceResult
      Throws:
      ServiceException
      Since:
      4.1.6
    • modReplaceConnector

      @POST @Path("/{modelId}/replace-connector") public jakarta.ws.rs.core.Response modReplaceConnector(@PathParam("modelId") String modelId, @QueryParam("connector") String oldConnectorSpec, @QueryParam("new-connector") String newConnectorSpec) throws ServiceException
      Replace connector references of a model.

      This example shows how to replace all references to connector instance "com.priint.pubserver.connector.jpa.api.PublishingHubDBConnector:aio" by new reference to &newConnectorSpec=com.priint.pubserver.connector.rest.RestConnector:xyz" on entity model "aio" on the default tenant.

      curl -X POST \ 'https://pubserver.example.com/EntityDataService/entitymodel/aio/replace-connector?connector=com.priint.pubserver.connector.jpa.api.PublishingHubDBConnector:aio&new-connector=com.priint.pubserver.connector.rest.RestConnector:xyz' \ -H 'Accept: application/xml'

      Parameters:
      modelId -
      oldConnectorSpec -
      newConnectorSpec -
      Returns:
      ServiceResult
      Throws:
      ServiceException
      Since:
      4.1.6