public class RightsManager extends Object implements RightsManagementInterface
| Constructor and Description |
|---|
RightsManager(String serverName,
String serverPlatformURLRoot)
Create a new client with no authentication embedded in the HTTP request.
|
RightsManager(String serverName,
String serverPlatformURLRoot,
GovernanceProgramRESTClient restClient,
int maxPageSize)
Create a new client that uses the supplied rest client.
|
RightsManager(String serverName,
String serverPlatformURLRoot,
int maxPageSize,
AuditLog auditLog)
Create a new client with no authentication embedded in the HTTP request.
|
RightsManager(String serverName,
String serverPlatformURLRoot,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
RightsManager(String serverName,
String serverPlatformURLRoot,
String userId,
String password,
int maxPageSize,
AuditLog auditLog)
Create a new client that passes userId and password in each HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createLicenseType(String userId,
LicenseTypeProperties properties)
Create a description of the license type.
|
void |
deleteLicenseType(String userId,
String licenseTypeGUID)
Delete the properties of the license type.
|
LicenseTypeElement |
getLicenseTypeByDocId(String userId,
String documentIdentifier)
Retrieve the license type by its assigned unique document identifier.
|
List<LicenseTypeElement> |
getLicenseTypeByDomainId(String userId,
int domainIdentifier,
int startFrom,
int pageSize)
Retrieve all of the license type definitions for a specific governance domain.
|
LicenseTypeElement |
getLicenseTypeByGUID(String userId,
String licenseTypeGUID)
Retrieve the license type by the unique identifier assigned by this service when it was created.
|
List<LicenseTypeElement> |
getLicenseTypesByTitle(String userId,
String title,
int startFrom,
int pageSize)
Retrieve all of the license types for a particular title.
|
void |
licenseElement(String userId,
String elementGUID,
String licenseTypeGUID,
LicenseProperties properties)
Link an element to a license type and include details of the license in the relationship properties.
|
void |
unlicenseElement(String userId,
String elementGUID,
String licenseTypeGUID,
String certificateId)
Remove the license for an element.
|
void |
updateLicense(String userId,
String elementGUID,
String licenseTypeGUID,
boolean isMergeUpdate,
LicenseProperties properties)
Update the properties of a license.
|
void |
updateLicenseType(String userId,
String licenseTypeGUID,
boolean isMergeUpdate,
LicenseTypeProperties properties)
Update the properties of the license type.
|
public RightsManager(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversInvalidParameterException - bad input parameterspublic RightsManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsInvalidParameterException - bad input parameterspublic RightsManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversmaxPageSize - pre-initialized parameter limitauditLog - logging destinationInvalidParameterException - bad input parameterspublic RightsManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsmaxPageSize - pre-initialized parameter limitauditLog - logging destinationInvalidParameterException - bad input parameterspublic RightsManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversrestClient - internal client for rest callsmaxPageSize - pre-initialized parameter limitInvalidParameterException - bad input parameterspublic String createLicenseType(String userId, LicenseTypeProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
createLicenseType in interface RightsManagementInterfaceuserId - calling userproperties - license propertiesInvalidParameterException - documentIdentifier or userId is null; documentIdentifier is not uniquePropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateLicenseType(String userId, String licenseTypeGUID, boolean isMergeUpdate, LicenseTypeProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateLicenseType in interface RightsManagementInterfaceuserId - calling userlicenseTypeGUID - identifier of the governance definition to changeisMergeUpdate - are unspecified properties unchanged (true) or replaced with null?properties - license propertiesInvalidParameterException - guid, documentIdentifier or userId is null; documentIdentifier is not uniquePropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void deleteLicenseType(String userId, String licenseTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteLicenseType in interface RightsManagementInterfaceuserId - calling userlicenseTypeGUID - identifier of the governance definition to deleteInvalidParameterException - guid or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic LicenseTypeElement getLicenseTypeByGUID(String userId, String licenseTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getLicenseTypeByGUID in interface RightsManagementInterfaceuserId - calling userlicenseTypeGUID - identifier of the governance definition to retrieveInvalidParameterException - guid or userId is null; guid is not recognizedPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic LicenseTypeElement getLicenseTypeByDocId(String userId, String documentIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getLicenseTypeByDocId in interface RightsManagementInterfaceuserId - calling userdocumentIdentifier - identifier to search forInvalidParameterException - documentIdentifier or userId is null; documentIdentifier is not recognizedPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<LicenseTypeElement> getLicenseTypesByTitle(String userId, String title, int startFrom, int pageSize) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException
getLicenseTypesByTitle in interface RightsManagementInterfaceuserId - calling usertitle - short description of the rolestartFrom - where to start from in the list of definitionspageSize - max number of results to return in one callInvalidParameterException - title or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<LicenseTypeElement> getLicenseTypeByDomainId(String userId, int domainIdentifier, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getLicenseTypeByDomainId in interface RightsManagementInterfaceuserId - calling userdomainIdentifier - identifier to search forstartFrom - where to start from in the list of definitionspageSize - max number of results to return in one callInvalidParameterException - domainIdentifier or userId is null; domainIdentifier is not recognizedPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void licenseElement(String userId, String elementGUID, String licenseTypeGUID, LicenseProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
licenseElement in interface RightsManagementInterfaceuserId - calling userelementGUID - unique identifier of the element being certifiedlicenseTypeGUID - unique identifier for the license typeproperties - the properties of the licenseInvalidParameterException - one of the properties is invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateLicense(String userId, String elementGUID, String licenseTypeGUID, boolean isMergeUpdate, LicenseProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateLicense in interface RightsManagementInterfaceuserId - calling userelementGUID - unique identifier of the element being certifiedlicenseTypeGUID - unique identifier for the license typeisMergeUpdate - should the supplied properties overlay the existing properties or replace themproperties - the properties of the licenseInvalidParameterException - one of the properties is invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void unlicenseElement(String userId, String elementGUID, String licenseTypeGUID, String certificateId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
unlicenseElement in interface RightsManagementInterfaceuserId - calling userelementGUID - unique identifier of the element being certifiedlicenseTypeGUID - unique identifier for the license typecertificateId - optional unique identifier from the license authority - it is used to disambiguate the licenses for the element.InvalidParameterException - one of the properties is invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problemCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.