java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
org.odpi.openmetadata.accessservices.governanceprogram.client.RightsManager
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.governanceprogram.api.RelatedElementsManagementInterface, org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface

public class RightsManager extends GovernanceProgramBaseClient implements org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
RightsManager is the java client for managing license types and the licensing of elements.
  • Constructor Details

    • RightsManager

      public RightsManager(String serverName, String serverPlatformURLRoot) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • RightsManager

      public RightsManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • RightsManager

      public RightsManager(String serverName, String serverPlatformURLRoot, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - pre-initialized parameter limit
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • RightsManager

      public RightsManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - pre-initialized parameter limit
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • RightsManager

      public RightsManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that uses the supplied rest client. This is typically used when called from another OMAG Server.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - internal client for rest calls
      maxPageSize - pre-initialized parameter limit
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
  • Method Details

    • createLicenseType

      public String createLicenseType(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties properties, org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus initialStatus) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Create a description of the license type.
      Specified by:
      createLicenseType in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      properties - license properties
      initialStatus - what is the initial status for the license type definition - default value is DRAFT
      Returns:
      unique identifier of new definition
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - documentIdentifier or userId is null; documentIdentifier is not unique
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • updateLicenseType

      public void updateLicenseType(String userId, String licenseTypeGUID, boolean isMergeUpdate, org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update the properties of the license type.
      Specified by:
      updateLicenseType in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseTypeGUID - identifier of the governance definition to change
      isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
      properties - license properties
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid, documentIdentifier or userId is null; documentIdentifier is not unique
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • setLicenseTypeStatus

      public void setLicenseTypeStatus(String userId, String licenseTypeGUID, org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus newStatus) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update the status of a license type
      Specified by:
      setLicenseTypeStatus in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseTypeGUID - identifier of the governance definition to change
      newStatus - new status
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid, documentIdentifier or userId is null; documentIdentifier is not unique
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • deleteLicenseType

      public void deleteLicenseType(String userId, String licenseTypeGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Delete the properties of the license type.
      Specified by:
      deleteLicenseType in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseTypeGUID - identifier of the governance definition to delete
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid or userId is null
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicenseTypeByGUID

      public org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement getLicenseTypeByGUID(String userId, String licenseTypeGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the license type by the unique identifier assigned by this service when it was created.
      Specified by:
      getLicenseTypeByGUID in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseTypeGUID - identifier of the governance definition to retrieve
      Returns:
      properties of the license type
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid or userId is null; guid is not recognized
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicenseTypeByDocId

      public org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement getLicenseTypeByDocId(String userId, String documentIdentifier) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the license type by its assigned unique document identifier.
      Specified by:
      getLicenseTypeByDocId in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      documentIdentifier - identifier to search for
      Returns:
      properties of the matching license type
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - documentIdentifier or userId is null; documentIdentifier is not recognized
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicenseTypesByTitle

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement> getLicenseTypesByTitle(String userId, String title, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve all the license types for a particular title. The title can include regEx wildcards.
      Specified by:
      getLicenseTypesByTitle in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      title - short description of the license
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of matching roles (null if no matching elements)
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - title or userId is null
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicenseTypeByDomainId

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement> getLicenseTypeByDomainId(String userId, int domainIdentifier, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve all the license type definitions for a specific governance domain.
      Specified by:
      getLicenseTypeByDomainId in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      domainIdentifier - identifier to search for
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      properties of the matching license type definitions
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - domainIdentifier or userId is null; domainIdentifier is not recognized
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • licenseElement

      public String licenseElement(String userId, String elementGUID, String licenseTypeGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Link an element to a license type and include details of the license in the relationship properties.
      Specified by:
      licenseElement in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the element being certified
      licenseTypeGUID - unique identifier for the license type
      properties - the properties of the license
      Returns:
      unique identifier of the new relationship
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the properties is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • updateLicense

      public void updateLicense(String userId, String licenseGUID, boolean isMergeUpdate, org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update the properties of a license.
      Specified by:
      updateLicense in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseGUID - unique identifier for the license relationship
      isMergeUpdate - should the supplied properties overlay the existing properties or replace them
      properties - the properties of the license
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the properties is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • unlicenseElement

      public void unlicenseElement(String userId, String licenseGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Remove the license for an element.
      Specified by:
      unlicenseElement in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseGUID - unique identifier for the license relationship
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the properties is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicensedElements

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement> getLicensedElements(String userId, String licenseGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return information about the elements linked to a license.
      Specified by:
      getLicensedElements in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      licenseGUID - unique identifier for the license
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      properties of the subject area
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - qualifiedName or userId is null
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getLicenses

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseElement> getLicenses(String userId, String elementGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return information about the licenses linked to an element.
      Specified by:
      getLicenses in interface org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface
      Parameters:
      userId - calling user
      elementGUID - unique identifier for the license
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      properties of the subject area
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - qualifiedName or userId is null
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem