public class ConnectionHandler extends AttachmentHandlerBase
invalidParameterHandler, lastAttachmentHandler, repositoryHandler, repositoryHelper, serverName, serviceName| Constructor and Description |
|---|
ConnectionHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper,
LastAttachmentHandler lastAttachmentHandler)
Construct the connection handler with information needed to work with Connection objects.
|
| Modifier and Type | Method and Description |
|---|---|
int |
countAttachedConnections(String userId,
String anchorGUID,
String methodName)
Count the number of connection attached to an anchor asset.
|
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.
|
List<Connection> |
getConnections(String userId,
String anchorGUID,
int startingFrom,
int pageSize,
String methodName)
Return the connections attached to an anchor entity.
|
void |
removeConnection(String userId,
String connectionGUID)
Remove the requested Connection and any associated objects if they are no longer connected to
anything else.
|
String |
saveConnection(String userId,
Connection connection)
Determine if the Connection object is stored in the repository and create it if it is not.
|
void |
setSecurityVerifier(OpenMetadataServerSecurityVerifier securityVerifier)
Set up a new security verifier (the handler runs with a default verifier until this
method is called).
|
countAttachments, getAttachmentLinks, getAttachmentspublic ConnectionHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, LastAttachmentHandler lastAttachmentHandler)
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 objectslastAttachmentHandler - handler for recording last attachmentpublic void setSecurityVerifier(OpenMetadataServerSecurityVerifier securityVerifier)
securityVerifier - new security verifierpublic int countAttachedConnections(String userId, String anchorGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - identifier for the entity that the object is attached tomethodName - calling methodInvalidParameterException - the parameters are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic List<Connection> getConnections(String userId, String anchorGUID, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - identifier for the entity that the feedback is attached tostartingFrom - where to start from in the listpageSize - maximum number of results that can be returnedmethodName - calling methodInvalidParameterException - the input properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String saveConnection(String userId, Connection connection) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userIdconnection - 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 connectionGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userconnectionGUID - 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.