public class ConnectionHandler extends RootHandler
invalidParameterHandler, repositoryHandler, repositoryHelper, serverName, serviceName| Constructor and Description |
|---|
ConnectionHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper)
Construct the connection handler with information needed to work with Connection objects.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection(String userId,
String connectionGUID)
Retrieve the requested connection object.
|
Connection |
getConnectionByName(String userId,
String name,
String methodName)
Returns the connection object corresponding to the supplied connection name.
|
void |
removeConnection(String userId,
String externalSourceGUID,
String externalSourceName,
String connectionGUID)
Remove the requested Connection and any associated objects if they are no longer connected to
anything else.
|
String |
saveConnection(String userId,
String externalSourceGUID,
String externalSourceName,
Connection connection)
Determine if the Connection object is stored in the repository and create it if it is not.
|
getRepositoryHelper, getServiceNamepublic ConnectionHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper)
serviceName - name of this serviceserverName - name of the local serverinvalidParameterHandler - handler for managing parameter errorsrepositoryHandler - handler for interfacing with the repository servicesrepositoryHelper - helper utilities for managing repository services objectspublic String saveConnection(String userId, String externalSourceGUID, String externalSourceName, Connection connection) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
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 sourceconnection - object to addInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic void removeConnection(String userId, String externalSourceGUID, String externalSourceName, String connectionGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
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 sourceconnectionGUID - object to deleteInvalidParameterException - the entity guid is not knownUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic Connection getConnection(String userId, String connectionGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userconnectionGUID - unique identifier of the connection object.InvalidParameterException - the parameters are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic Connection getConnectionByName(String userId, String name, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - String - userId of user making request.name - this may be the qualifiedName or displayName of the connection.methodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem retrieving information from the property (metadata) server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.Copyright © 2018–2020 ODPi. All rights reserved.