Class ConnectorTypeHandler
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.ConnectorTypeHandler
-
public class ConnectorTypeHandler extends RootHandler
ConnectorTypeHandler manages the ConnectorType entity found within a connection object. The ConnectorType entity describes the type of connector used to access a specific type of asset. It may belong to multiple connections. This means it must be handled assuming it may be part of many constructs. This is particularly important on delete.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
invalidParameterHandler, repositoryHandler, repositoryHelper, serverName, serviceName
-
-
Constructor Summary
Constructors Constructor Description ConnectorTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorTypegetConnectorType(String userId, String connectorTypeGUID)Retrieve the requested connectorType object.voidremoveConnectorType(String userId, String externalSourceGUID, String externalSourceName, String connectorTypeGUID)Remove the requested ConnectorType if it is no longer connected to any other connection or server definition.StringsaveConnectorType(String userId, String externalSourceGUID, String externalSourceName, ConnectorType connectorType)Verify that the ConnectorType object is stored in the repository and create it if it is not.-
Methods inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
getRepositoryHelper, getServiceName
-
-
-
-
Constructor Detail
-
ConnectorTypeHandler
public ConnectorTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper)
Construct the handler information needed to interact with the repository services- Parameters:
serviceName- 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 objects
-
-
Method Detail
-
saveConnectorType
public String saveConnectorType(String userId, String externalSourceGUID, String externalSourceName, ConnectorType connectorType) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Verify that the ConnectorType object is stored in the repository and create it if it is not. If the connectorType is located, there is no check that the connectorType values are equal to those in the supplied connectorType object.- Parameters:
userId- calling userIdexternalSourceGUID- guid of the software server capability entity that represented the external source - null for localexternalSourceName- name of the software server capability entity that represented the external sourceconnectorType- object to add- Returns:
- unique identifier of the connectorType in the repository.
- Throws:
InvalidParameterException- the connectorType bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
removeConnectorType
public void removeConnectorType(String userId, String externalSourceGUID, String externalSourceName, String connectorTypeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Remove the requested ConnectorType if it is no longer connected to any other connection or server definition.- Parameters:
userId- calling userexternalSourceGUID- guid of the software server capability entity that represented the external source - null for localexternalSourceName- name of the software server capability entity that represented the external sourceconnectorTypeGUID- object to delete- Throws:
InvalidParameterException- the entity guid is not knownUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getConnectorType
public ConnectorType getConnectorType(String userId, String connectorTypeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Retrieve the requested connectorType object.- Parameters:
userId- calling userconnectorTypeGUID- unique identifier of the connectorType object.- Returns:
- ConnectorType bean
- Throws:
InvalidParameterException- the parameters are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
-