Class AssetHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler<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.AssetHandler<B>
- Type Parameters:
B- class that represents the asset
AssetHandler manages B objects and optionally connections in the property server. It runs server-side in
the OMAG Server Platform and retrieves Assets and Connections through the OMRSRepositoryConnector.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler
OpenMetadataAPIAnchorHandler.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
ConstructorsConstructorDescriptionAssetHandler(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 with information needed to work with B objects. -
Method Summary
Modifier and TypeMethodDescriptioncreateAssetInRepository(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String, String> additionalProperties, String typeName, Map<String, Object> extendedProperties, InstanceStatus instanceStatus, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) Add a simple asset description to the metadata repository.createAssetWithConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUIDParameterName, String assetQualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String, String> additionalProperties, String assetTypeName, Map<String, Object> extendedProperties, InstanceStatus instanceStatus, boolean anchorEndpointToAsset, Map<String, Object> configurationProperties, String connectorProviderClassName, String networkAddress, String protocol, String encryptionMethod, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Add a simple asset description to the metadata repository.getAssetWithConnection(String userId, String assetGUID, String assetGUIDParameterName, String assetTypeName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Return an asset along with any associated connection.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler
getBeanGUIDByQualifiedName, getBeanGUIDByQualifiedName, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, setVendorPropertiesMethods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler
createBeanFromTemplate, createBeanFromTemplateMethods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, archiveBeanInRepository, createBeanInRepository, createBeanInRepository, deleteAnchoredBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteIfAppropriatelyAnchoredEntity, findAttachmentLinks, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntity, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByValue, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanHistory, getBeansByValue, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getRelationshipHistory, getSpecification, getUniqueAttachmentLink, getValidatedBeans, getValidatedEntities, getValidatedEntities, linkElementToElement, linkElementToElement, linkElementToElement, multiLinkElementToElement, removeClassificationFromRepository, removeCollectionMembers, removeDataStructureMembers, removeDeployedAssets, removeFolderContents, removeLinkedDatabaseSchemas, removeLinkedDataClasses, removeNestedComments, removeNestedDataFields, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, unlinkAllElements, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorGUID, validateEntitiesAndAnchorsForRead, validateEntityAndAnchorForRead, validateEntityAndAnchorForRead, validateRelationship, validateUniquePropertyMethods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler
addAnchorsClassification, getAnchorGUIDForEntity, getAnchorScopeGUIDFromAnchorsClassification, getAnchorsFromAnchorsClassification, getDomainName, getDomainName, setUpAnchorsClassificationFromAnchor, setUpAnchorsClassificationFromParentMethods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
getConverter, getElementStub, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getSupportedZones, getTypeDefByName, setSecurityVerifier
-
Constructor Details
-
AssetHandler
public AssetHandler(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 with information needed to work with B objects.- 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 B instances from.defaultZones- list of zones that the access service should set in all new B instances.publishZones- list of zones that the access service sets up in published B instances.auditLog- destination for audit log events.
-
-
Method Details
-
createAssetInRepository
public String createAssetInRepository(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String, String> additionalProperties, String typeName, Map<String, throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionObject> extendedProperties, InstanceStatus instanceStatus, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) Add a simple asset description to the metadata repository. Null values for requested typename, ownership, zone membership and latest change are filled in with default values.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerqualifiedName- unique name for this assetname- the stored name property for the assetresourceName- the full name from the resourceversionIdentifier- the stored versionIdentifier property for the assetresourceDescription- the stored description property associated with the assetdeployedImplementationType- type of technologyadditionalProperties- any arbitrary properties not part of the type systemtypeName- name of the type that is a subtype of asset - or null to create standard typeextendedProperties- properties from any subtypeinstanceStatus- initial status of the Asset in the metadata repositoryeffectiveFrom- starting time for this relationship (null for all time)effectiveTo- ending time for this relationship (null for all time)effectiveTime- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName- calling method- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
createAssetWithConnection
public String createAssetWithConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUIDParameterName, String assetQualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String, String> additionalProperties, String assetTypeName, Map<String, throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionObject> extendedProperties, InstanceStatus instanceStatus, boolean anchorEndpointToAsset, Map<String, Object> configurationProperties, String connectorProviderClassName, String networkAddress, String protocol, String encryptionMethod, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Add a simple asset description to the metadata repository. Null values for requested typename, ownership, zone membership and latest change are filled in with default values.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerassetGUIDParameterName- parameter name of the resulting asset's GUIDassetQualifiedName- unique name for this assetname- the stored name property for the assetversionIdentifier- the stored versionIdentifier property for the assetresourceDescription- the stored description property associated with the assetdeployedImplementationType- type of technologyadditionalProperties- any arbitrary properties not part of the type systemassetTypeName- name of the type that is a subtype of asset - or null to create standard typeextendedProperties- properties from any subtypeinstanceStatus- initial status of the Asset in the metadata repositoryanchorEndpointToAsset- set to true if the network address is unique for the asset and should not be reused. False if this is an endpoint that is relevant for multiple assets.configurationProperties- configuration properties for the connectionconnectorProviderClassName- Java class name for the connector providernetworkAddress- the network address (typically the URL but this depends on the protocol)protocol- the name of the protocol to use to connect to the endpointencryptionMethod- encryption method to use when passing data to this endpointeffectiveFrom- starting time for this relationship (null for all time)effectiveTo- ending time for this relationship (null for all time)forLineage- return elements marked with the Memento classification?forDuplicateProcessing- do not merge elements marked as duplicates?serviceSupportedZones- supported zones for this serviceeffectiveTime- the time that the retrieved elements must be effective formethodName- calling method- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getAssetWithConnection
public B getAssetWithConnection(String userId, String assetGUID, String assetGUIDParameterName, String assetTypeName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return an asset along with any associated connection.- Parameters:
userId- calling userassetGUID- unique identifier of the assetassetGUIDParameterName- name of parameter supplying assetGUIDassetTypeName- type name of assetforLineage- 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 deduplicateserviceSupportedZones- supported zones for this serviceeffectiveTime- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName- calling method- Returns:
- an asset bean (with embedded connection details if available)
- Throws:
InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- there is a problem retrieving information from the property server(s).UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-