Class LicenseHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.LicenseHandler<B>
LicenseHandler manages License objects. It runs server-side in
the OMAG Server Platform and retrieves License entities through the OMRSRepositoryConnector.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
OpenMetadataAPIGenericHandler.AnchorIdentifiers
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
assetActionDescription, auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, qualifiedNamePropertyNamesList, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones
-
Constructor Summary
ConstructorDescriptionLicenseHandler
(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptiongetLicenses
(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the Licenses attached to an anchor entity.getLicenses
(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, List<String> serviceSupportedZones, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the Licenses attached to an element.licenseElement
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, String elementTypeName, String licenseTypeGUID, String licenseTypeGUIDParameterName, String licenseTypeGUIDTypeName, String licenseGUID, Date start, Date end, String conditions, String licensedBy, String licensedByTypeName, String licensedByPropertyName, String custodian, String custodianTypeName, String custodianPropertyName, String licensee, String licenseeTypeName, String licenseePropertyName, String notes, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create a link between a license type and an element that has achieved the license.void
unlicenseElement
(String userId, String externalSourceGUID, String externalSourceName, String licenseGUID, String licenseGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Remove a relationship between two definitions.void
updateLicense
(String userId, String externalSourceGUID, String externalSourceName, String licenseGUID, String licenseGUIDParameterName, String licenseId, Date start, Date end, String conditions, String licensedBy, String licensedByTypeName, String licensedByPropertyName, String custodian, String custodianTypeName, String custodianPropertyName, String licensee, String licenseeTypeName, String licenseePropertyName, String notes, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Update the license relationship.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler
clearDefinitionRelationship, createGovernanceDefinition, findGovernanceDefinitions, getGovernanceDefinitionByGUID, getGovernanceDefinitionInContext, getGovernanceDefinitions, getGovernanceDefinitionsByDomain, getGovernanceDefinitionsByName, getGovernanceDefinitionsByStringParameter, getGovernanceResponsibilitiesForRole, getGoverningDefinitionLinks, getGoverningDefinitions, getLinkedDefinitions, getScopedGovernanceDefinitions, removeGovernanceDefinition, setupDelegationRelationship, setupPeerRelationship, updateGovernanceDefinition
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler
addAssignmentScope, addDataFieldValuesClassification, addGovernanceActionClassification, addGovernanceDefinitionScope, addGovernanceExpectationsClassification, addGovernanceMeasurementsClassification, addGovernedBy, addImplementedBy, addMoreInformation, addOwner, addRetentionClassification, addSecurityTags, addStakeholder, addSubjectAreaClassification, addTemplateClassification, clearBusinessSignificant, findBeanGUIDsByQualifiedName, findBeansByQualifiedName, findBeansByQualifiedName, getAssignedActors, getAssignmentScope, getBeanByQualifiedName, getBeanByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDsByQualifiedName, getBeanGUIDsByQualifiedName, getBeansByQualifiedName, getBeansByQualifiedName, getCatalogTemplateList, getCollectionMembers, getCommissionedByStakeholder, getDataFieldValuesClassifiedElement, getDescriptiveElements, getElementsSourceFrom, getEntityByUniqueQualifiedName, getGovernanceActionClassifiedElements, getGovernanceDefinitionScope, getGovernedElements, getMeanings, getMoreInformation, getMoreInformation, getOwnersElements, getReferenceValueAssignees, getResourceList, getRetentionClassifiedElements, getSecurityTagsClassifiedElements, getSemanticAssignments, getSourceElements, getStakeholders, getSubjectAreaMembers, getSubjectAreaMembers, getSupportedByResource, getSupportedByTemplate, getValidValueConsumers, getVendorProperties, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, removeAssignmentScope, removeCatalogTemplate, removeDataFieldValuesClassification, removeGovernanceActionClassification, removeGovernanceDefinitionScope, removeGovernanceExpectationsClassification, removeGovernanceMeasurementsClassification, removeGovernedBy, removeImplementedBy, removeMoreInformation, removeOwner, removeResourceListMember, removeRetentionClassification, removeSecurityTags, removeSemanticAssignment, removeStakeholder, removeSubjectAreaClassification, removeTemplateClassification, saveCatalogTemplate, saveResourceListMember, saveSemanticAssignment, saveSemanticAssignment, saveSemanticAssignments, setBusinessSignificant, setVendorProperties, unlinkElementsAsPeerDuplicates
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler
createBeanFromTemplate, createBeanFromTemplate
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, addAnchorsClassification, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanInRepository, createBeanInRepository, deleteAnchoredEntity, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteRelationship, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAnchorGUIDFromAnchorsClassification, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntities, getAttachedEntitiesFromUser, getAttachedEntity, getAttachedEntity, getAttachedEntityFromUser, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getAttachmentsForType, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanHistory, getBeansByClassification, getBeansByCreator, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getDomainName, getDomainName, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getSpecification, getSupplementaryProperties, getUniqueAttachmentLink, getUniqueAttachmentLink, isBeanIsolated, isEntityATypeOf, linkElementToElement, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, multiLinkElementToElement, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, undoBeanUpdateInRepository, undoBeanUpdateInRepository, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipEffectivityDates, updateRelationshipProperties, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, validateUniqueProperty, verifyExternalSourceIdentity
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
getConverter, getElementStub, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getSupportedZones, getTypeDefByName, setSecurityVerifier
-
Constructor Details
-
LicenseHandler
public LicenseHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services- Parameters:
converter
- specific converter for this bean classbeanClass
- name of bean class that is represented by the generic class BserviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrepositoryHandler
- manages calls to the repository servicesrepositoryHelper
- provides utilities for manipulating the repository services objectslocalServerUserId
- userId for this serversecurityVerifier
- open metadata security services verifiersupportedZones
- list of zones that the access service is allowed to serve Asset instances from.defaultZones
- list of zones that the access service should set in all new Asset instances.publishZones
- list of zones that the access service sets up in published Asset instances.auditLog
- destination for audit log events.
-
-
Method Details
-
getLicenses
public List<B> getLicenses(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the Licenses attached to an anchor entity.- Parameters:
userId
- calling userelementGUID
- identifier for the entity that the license is attached toelementGUIDParameterName
- name of parameter supplying the GUIDelementTypeName
- name of the type of object being attached tostartFrom
- where to start from in the listpageSize
- maximum number of results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- what is the effective time for related queries needed to do the updatemethodName
- calling method- Returns:
- list of licenses or null if none found
- Throws:
InvalidParameterException
- the input properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
getLicenses
public List<B> getLicenses(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, List<String> serviceSupportedZones, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the Licenses attached to an element.- Parameters:
userId
- calling userelementGUID
- identifier for the entity that the license is attached toelementGUIDParameterName
- name of parameter supplying the GUIDelementTypeName
- name of the type of object being attached toserviceSupportedZones
- supported zones for calling servicestartFrom
- where to start from in the listpageSize
- maximum number of results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of licenses or null if none found
- Throws:
InvalidParameterException
- the input properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
licenseElement
public String licenseElement(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, String elementTypeName, String licenseTypeGUID, String licenseTypeGUIDParameterName, String licenseTypeGUIDTypeName, String licenseGUID, Date start, Date end, String conditions, String licensedBy, String licensedByTypeName, String licensedByPropertyName, String custodian, String custodianTypeName, String custodianPropertyName, String licensee, String licenseeTypeName, String licenseePropertyName, String notes, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a link between a license type and an element that has achieved the license.- Parameters:
userId
- calling userexternalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourceelementGUID
- unique identifier of the elementelementGUIDParameterName
- parameter supplying the elementGUIDelementTypeName
- typename of super-definitionlicenseTypeGUID
- unique identifier of the license typelicenseTypeGUIDParameterName
- parameter supplying licenseTypeGUIDlicenseTypeGUIDTypeName
- type name of the licenseTypeGUIDlicenseGUID
- unique identifier of the license (maybe from an external system)start
- when did the license startend
- when will the license endconditions
- any conditions added to the licenselicensedBy
- unique name/identifier of the element for the person/organization licensing the elementlicensedByTypeName
- type of the licensedBy elementlicensedByPropertyName
- property name for the unique identifier from the licensedBy elementcustodian
- unique name/identifier of the element for the person/organization responsible for maintaining the license statuscustodianTypeName
- type of the custodian elementcustodianPropertyName
- property name for the unique identifier from the custodian elementlicensee
- unique name/identifier of the element for the person/organization receiving the licenselicenseeTypeName
- type of the licensee elementlicenseePropertyName
- property name for the unique identifier from the licensee elementnotes
- additional information, endorsements etceffectiveFrom
- starting time for this relationship (null for all time)effectiveTo
- ending time for this relationship (null for all time)forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- guid of license relationship
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateLicense
public void updateLicense(String userId, String externalSourceGUID, String externalSourceName, String licenseGUID, String licenseGUIDParameterName, String licenseId, Date start, Date end, String conditions, String licensedBy, String licensedByTypeName, String licensedByPropertyName, String custodian, String custodianTypeName, String custodianPropertyName, String licensee, String licenseeTypeName, String licenseePropertyName, String notes, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the license relationship.- Parameters:
userId
- calling userexternalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourcelicenseGUID
- unique identifier for the relationshiplicenseGUIDParameterName
- parameterlicenseId
- unique identifier of the license (maybe from an external system)start
- when did the license startend
- when will the license endconditions
- any conditions added to the licenselicensedBy
- unique name/identifier of the element for the person/organization licensing the elementlicensedByTypeName
- type of the licensedBy elementlicensedByPropertyName
- property name for the unique identifier from the licensedBy elementcustodian
- unique name/identifier of the element for the person/organization responsible for maintaining the license statuscustodianTypeName
- type of the custodian elementcustodianPropertyName
- property name for the unique identifier from the custodian elementlicensee
- unique name/identifier of the element for the person/organization receiving the licenselicenseeTypeName
- type of the licensee elementlicenseePropertyName
- property name for the unique identifier from the licensee elementnotes
- additional information, endorsements etcisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?effectiveFrom
- starting time for this relationship (null for all time)effectiveTo
- ending time for this relationship (null for all time)forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
unlicenseElement
public void unlicenseElement(String userId, String externalSourceGUID, String externalSourceName, String licenseGUID, String licenseGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a relationship between two definitions.- Parameters:
externalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourceuserId
- calling userlicenseGUID
- unique identifier of the license relationshiplicenseGUIDParameterName
- parameter supplying licenseGUIDforLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-