Class LicenseRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.assetowner.server.LicenseRESTServices
LicenseRESTServices is the java client for managing license types and the license of elements.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLicensedElements
(String serverName, String userId, String licenseTypeGUID, int startFrom, int pageSize) Return information about the elements linked to a license.getLicenses
(String serverName, String userId, String elementGUID, int startFrom, int pageSize) Return information about the licenses linked to an element.getLicenseTypeByDocId
(String serverName, String userId, String documentIdentifier) Retrieve the license type by its assigned unique document identifier.getLicenseTypeByDomainId
(String serverName, String userId, int domainIdentifier, int startFrom, int pageSize) Retrieve all the license type definitions for a specific governance domain.getLicenseTypeByGUID
(String serverName, String userId, String licenseTypeGUID) Retrieve the license type by the unique identifier assigned by this service when it was created.getLicenseTypesByTitle
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve all the license types for a particular title.licenseElement
(String serverName, String userId, String elementGUID, String licenseTypeGUID, RelationshipRequestBody requestBody) Link an element to a license type and include details of the license in the relationship properties.unlicenseElement
(String serverName, String userId, String licenseGUID, RelationshipRequestBody requestBody) Remove the license for an element.updateLicense
(String serverName, String userId, String licenseGUID, boolean isMergeUpdate, RelationshipRequestBody requestBody) Update the properties of a license.
-
Constructor Details
-
LicenseRESTServices
public LicenseRESTServices()Default constructor
-
-
Method Details
-
getLicenseTypeByGUID
public LicenseTypeResponse getLicenseTypeByGUID(String serverName, String userId, String licenseTypeGUID) Retrieve the license type by the unique identifier assigned by this service when it was created.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userlicenseTypeGUID
- identifier of the governance definition to retrieve- Returns:
- properties of the license type or InvalidParameterException guid or userId is null; guid is not recognized PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLicenseTypeByDocId
public LicenseTypeResponse getLicenseTypeByDocId(String serverName, String userId, String documentIdentifier) Retrieve the license type by its assigned unique document identifier.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdocumentIdentifier
- identifier to search for- Returns:
- properties of the matching license type or InvalidParameterException documentIdentifier or userId is null; documentIdentifier is not recognized PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLicenseTypesByTitle
public LicenseTypesResponse getLicenseTypesByTitle(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve all the license types for a particular title. The title can include regEx wildcards.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userrequestBody
- short description of the licensestartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- list of matching license types (null if no matching elements) or InvalidParameterException title or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLicenseTypeByDomainId
public LicenseTypesResponse getLicenseTypeByDomainId(String serverName, String userId, int domainIdentifier, int startFrom, int pageSize) Retrieve all the license type definitions for a specific governance domain.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdomainIdentifier
- identifier to search forstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- properties of the matching license type definitions or InvalidParameterException domainIdentifier or userId is null; domainIdentifier is not recognized PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
licenseElement
public GUIDResponse licenseElement(String serverName, String userId, String elementGUID, String licenseTypeGUID, RelationshipRequestBody requestBody) Link an element to a license type and include details of the license in the relationship properties.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userelementGUID
- unique identifier of the element being licensedlicenseTypeGUID
- unique identifier for the license typerequestBody
- the properties of the license- Returns:
- guid or InvalidParameterException one of the properties is invalid PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updateLicense
public VoidResponse updateLicense(String serverName, String userId, String licenseGUID, boolean isMergeUpdate, RelationshipRequestBody requestBody) Update the properties of a license. Remember to include the licenseId in the properties if the element has multiple licenses for the same license type.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userlicenseGUID
- unique identifier for the license typeisMergeUpdate
- should the supplied properties overlay the existing properties or replace themrequestBody
- the properties of the license- Returns:
- void or InvalidParameterException one of the properties is invalid PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlicenseElement
public VoidResponse unlicenseElement(String serverName, String userId, String licenseGUID, RelationshipRequestBody requestBody) Remove the license for an element.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userlicenseGUID
- unique identifier for the license typerequestBody
- external source information.- Returns:
- void or InvalidParameterException one of the properties is invalid PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLicensedElements
public RelatedElementsResponse getLicensedElements(String serverName, String userId, String licenseTypeGUID, int startFrom, int pageSize) Return information about the elements linked to a license.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userlicenseTypeGUID
- unique identifier for the licensestartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the license or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLicenses
public RelatedElementsResponse getLicenses(String serverName, String userId, String elementGUID, int startFrom, int pageSize) Return information about the licenses linked to an element.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userelementGUID
- unique identifier for the licensestartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the license or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-