Class AnalyticsModelingRestServices


  • public class AnalyticsModelingRestServices
    extends Object
    Server-side implementation of the Analytics Modeling OMAS interface for modeling.
    • Constructor Detail

      • AnalyticsModelingRestServices

        public AnalyticsModelingRestServices()
    • Method Detail

      • getDatabases

        public AnalyticsModelingOMASAPIResponse getDatabases​(String serverName,
                                                             String userId,
                                                             Integer startFrom,
                                                             Integer pageSize)
        Get databases available on the server for the user.
        Parameters:
        serverName - of the server.
        userId - of the user.
        startFrom - starting element (used in paging through large result sets)
        pageSize - maximum number of results to return
        Returns:
        list of databases for the requested server/user.
      • getSchemas

        public AnalyticsModelingOMASAPIResponse getSchemas​(String serverName,
                                                           String userId,
                                                           String databaseGuid,
                                                           Integer startFrom,
                                                           Integer pageSize)
        Get schema defined by database GUID.
        Parameters:
        serverName - of the request.
        userId - of the request.
        databaseGuid - of the requested database.
        startFrom - starting element (used in paging through large result sets)
        pageSize - maximum number of results to return
        Returns:
        list of schemas for the requested database.
      • getTables

        public AnalyticsModelingOMASAPIResponse getTables​(String serverName,
                                                          String userId,
                                                          String databaseGuid,
                                                          String schema)
        Get tables for the schema.
        Parameters:
        serverName - of the request.
        userId - of the request.
        databaseGuid - of the requested database.
        schema - schema name on the database.
        Returns:
        list of tables for the requested schema.
      • getModule

        public AnalyticsModelingOMASAPIResponse getModule​(String serverName,
                                                          String userId,
                                                          String databaseGuid,
                                                          String catalog,
                                                          String schema,
                                                          ModuleTableFilter request)
        Build module for the schema.
        Parameters:
        serverName - of the request.
        userId - of the request.
        databaseGuid - of the requested database.
        catalog - catalog name of the database.
        schema - schema name of the database.
        request - table filter
        Returns:
        module for the requested schema.
      • createArtifact

        public AnalyticsModelingOMASAPIResponse createArtifact​(String serverName,
                                                               String userId,
                                                               String serverCapability,
                                                               String serverCapabilityGUID,
                                                               AnalyticsAsset artifact)
        Create analytics artifact defined as json input.
        Parameters:
        serverName - where to create artifact.
        userId - requested the operation.
        serverCapability - source where artifact persist.
        serverCapabilityGUID - source where artifact persist.
        artifact - definition.
        Returns:
        response with artifact or error description.
      • updateArtifact

        public AnalyticsModelingOMASAPIResponse updateArtifact​(String serverName,
                                                               String userId,
                                                               String serverCapability,
                                                               String serverCapabilityGUID,
                                                               AnalyticsAsset artifact)
        Update analytics artifact defined as json input.
        Parameters:
        serverName - where to create artifact.
        userId - requested the operation.
        serverCapability - source where artifact persist.
        serverCapabilityGUID - source where artifact persist.
        artifact - definition.
        Returns:
        response with artifact or error description.
      • deleteArtifact

        public AnalyticsModelingOMASAPIResponse deleteArtifact​(String serverName,
                                                               String userId,
                                                               String serverCapability,
                                                               String serverCapabilityGUID,
                                                               String identifier)
        Delete analytics artifact defined by unique identifier.
        Parameters:
        serverName - where to create artifact.
        userId - requested the operation.
        serverCapability - source where artifact persist.
        serverCapabilityGUID - source where artifact persist.
        identifier - of the artifact in the 3rd party system.
        Returns:
        response with status of the operation.
      • validateUrlParameters

        public void validateUrlParameters​(String serverName,
                                          String userId,
                                          String guid,
                                          String guidParamName,
                                          Integer startFrom,
                                          Integer pageSize,
                                          String methodName)
                                   throws InvalidParameterException
        Validate path and query parameters from URL.
        Parameters:
        serverName - mandatory path parameter of the base URL.
        userId - mandatory path parameter of the base URL.
        guid - optional path parameter.
        guidParamName - name of GUID parameter in URL.
        startFrom - optional query parameter.
        pageSize - optional query parameter.
        methodName - for message.
        Throws:
        InvalidParameterException - if validation failed. To validate guid the guidParamName must not be null.