Class ConnectionHandler<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.ConnectionHandler<B>
ConnectionHandler manages Connection objects.  These describe the network addresses where services are running.  They are used by connection
 objects to describe the service that the connector should call.  They are linked to servers to show their network address where the services that
 they are hosting are running.
 
Most OMASs that work with Connection objects use the Open Connector Framework (OCF) Bean since this can be passed to the OCF Connector Broker to create an instance of a connector to the attached asset. Therefore, this handler has a default bean and converter which is the one that works with the OCF bean. The call can either use these values or override with their own bean/converter implementations.
ConnectionHandler runs server-side in the OMAG Server Platform and retrieves Connection entities through the OMRSRepositoryConnector via the generic handler and repository handler.
Most OMASs that work with Connection objects use the Open Connector Framework (OCF) Bean since this can be passed to the OCF Connector Broker to create an instance of a connector to the attached asset. Therefore, this handler has a default bean and converter which is the one that works with the OCF bean. The call can either use these values or override with their own bean/converter implementations.
ConnectionHandler runs server-side in the OMAG Server Platform and retrieves Connection entities through the OMRSRepositoryConnector via the generic handler and repository handler.
- 
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
ConstructorsConstructorDescriptionConnectionHandler(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 TypeMethodDescriptionvoidaddAssetConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUID, String assetGUIDParameterName, String assetTypeName, String assetQualifiedName, 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) If possible, create a connection for the supplied asset.voidcreateConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUID, String assetGUIDParameterName, String qualifiedName, String displayName, String description, Map<String, String> additionalProperties, Map<String, String> securedProperties, Map<String, Object> configurationProperties, String connectorUserId, String clearPassword, String encryptedPassword, String suppliedConnectionTypeName, Map<String, Object> extendedProperties, String connectorTypeGUID, String connectorTypeGUIDParameterName, String endpointGUID, String endpointGUIDParameterName, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Creates a new connection and returns the unique identifier for it.getConnectionForAsset(String userId, String assetGUID, String assetGUIDParameterName, List<String> serviceSupportedZones, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the list of connection objects attached to the requested asset object.saveConnection(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String assetGUID, String assetGUIDParameterName, String assetTypeName, String parentQualifiedName, Connection connection, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Determine if the Connection object is stored in the repository and create it if it is not.voidupdateConnection(String userId, String externalSourceGUID, String externalSourceName, String connectionGUID, String connectionGUIDParameterName, String qualifiedName, String displayName, String description, Map<String, String> additionalProperties, Map<String, String> securedProperties, Map<String, Object> configurationProperties, String connectorUserId, String clearPassword, String encryptedPassword, String typeName, Map<String, Object> extendedProperties, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Updates the properties of an existing 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
- 
ConnectionHandler
public ConnectionHandler(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
- 
saveConnection
public String saveConnection(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String assetGUID, String assetGUIDParameterName, String assetTypeName, String parentQualifiedName, Connection connection, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Determine if the Connection object is stored in the repository and create it if it is not. If the connection is located, there is no check that the connection values are equal to those in the supplied object.- Parameters:
 userId- calling userIdexternalSourceGUID- guid of the software capability entity that represented the external source - null for localexternalSourceName- name of the software capability entity that represented the external sourceanchorGUID- unique identifier of the anchor to add to the connectionassetGUID- unique identifier of linked asset (or null)assetGUIDParameterName- parameter name supplying assetGUIDassetTypeName- type of assetparentQualifiedName- qualified name of associated asset/connectionconnection- object to addforLineage- 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 for (null for any time, new Date() for now)methodName- calling method- Returns:
 - unique identifier of the connection in the repository.
 - Throws:
 InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
 - 
addAssetConnection
public void addAssetConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUID, String assetGUIDParameterName, String assetTypeName, String assetQualifiedName, 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) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionIf possible, create a connection for the supplied asset. The new connection is linked to the asset.- Parameters:
 userId- userId of user making requestexternalSourceGUID- guid of the software capability entity that represented the external source - null for localexternalSourceName- name of the software capability entity that represented the external sourceassetGUID- unique identifier of the assetassetGUIDParameterName- parameter name supplying the asset guidassetTypeName- type of asset being createdassetQualifiedName- fully qualified path name of the assetanchorEndpointToAsset- 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- Throws:
 InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- there is a problem adding the connectorType properties to the property server.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
 - 
createConnection
public void createConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUID, String assetGUIDParameterName, String qualifiedName, String displayName, String description, Map<String, String> additionalProperties, Map<String, throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionString> securedProperties, Map<String, Object> configurationProperties, String connectorUserId, String clearPassword, String encryptedPassword, String suppliedConnectionTypeName, Map<String, Object> extendedProperties, String connectorTypeGUID, String connectorTypeGUIDParameterName, String endpointGUID, String endpointGUIDParameterName, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Creates a new connection and returns the unique identifier for it.- Parameters:
 userId- userId of user making requestexternalSourceGUID- guid of the software capability entity that represented the external source - null for localexternalSourceName- name of the software capability entity that represented the external sourceassetGUID- the unique identifier for the asset entity (null for standalone connections)assetGUIDParameterName- the parameter supplying assetGUIDqualifiedName- unique namedisplayName- new value for the display name.description- new description for the connection.additionalProperties- additional propertiessecuredProperties- protected propertiesconfigurationProperties- properties passed to configure underlying technologiesconnectorUserId- user identity that the connector should useclearPassword- password for the userId in clear textencryptedPassword- encrypted password that the connector needs to decrypt before usesuppliedConnectionTypeName- type name for the connectionextendedProperties- parameters from a subtypeconnectorTypeGUID- unique identifier of the connector type to used for this connectionconnectorTypeGUIDParameterName- the parameter supplying connectorTypeGUIDendpointGUID- unique identifier of the endpoint to used for this connectionendpointGUIDParameterName- the parameter supplying endpointGUIDeffectiveFrom- 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- Throws:
 InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- there is a problem adding the connection properties to the property server.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
 - 
updateConnection
public void updateConnection(String userId, String externalSourceGUID, String externalSourceName, String connectionGUID, String connectionGUIDParameterName, String qualifiedName, String displayName, String description, Map<String, String> additionalProperties, Map<String, throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionString> securedProperties, Map<String, Object> configurationProperties, String connectorUserId, String clearPassword, String encryptedPassword, String typeName, Map<String, Object> extendedProperties, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Updates the properties of an existing connection.- Parameters:
 userId- userId of user making request.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 sourceconnectionGUID- unique identifier for the connectionconnectionGUIDParameterName- parameter providing connectionGUIDqualifiedName- unique namedisplayName- new value for the display name.description- new description for the connection.additionalProperties- additional propertiessecuredProperties- protected propertiesconfigurationProperties- properties passed to configure underlying technologiesconnectorUserId- user identity that the connector should useclearPassword- password for the userId in clear textencryptedPassword- encrypted password that the connector needs to decrypt before usetypeName- name of the type that is a subtype of connection - or null to create standard typeextendedProperties- additional properties for the subtypeisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?effectiveFrom- 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?effectiveTime- the time that the retrieved elements must be effective formethodName- calling method- Throws:
 InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- there is a problem adding the connection properties to the property server.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
 - 
getConnectionForAsset
public B getConnectionForAsset(String userId, String assetGUID, String assetGUIDParameterName, List<String> serviceSupportedZones, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the list of connection objects attached to the requested asset object. This includes the endpoint and connector type.- Parameters:
 userId- calling userassetGUID- unique identifier of the asset objectassetGUIDParameterName- parameter name supplying assetGUIDserviceSupportedZones- list of supported zones for the calling serviceforLineage- 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 formethodName- calling method- Returns:
 - Connection bean
 - Throws:
 InvalidParameterException- the parameters are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
 
 -