Class EndpointHandler
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.RootHandler
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.handlers.EndpointHandler
-
public class EndpointHandler extends RootHandler
EndpointHandler manages the Endpoint entity found within a connection object. The Endpoint entity describes the network location of a specific asset. It may belong to multiple connections as well as being part of a SoftWareServer definition. 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 EndpointHandler(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 EndpointgetEndpoint(String userId, String endpointGUID)Retrieve the requested endpoint object.List<Endpoint>getEndpointsByNetworkAddress(String userId, String networkAddress, int startFrom, int pageSize, String methodName)Retrieve the list of endpoint objects that have the supplied network address.voidremoveEndpoint(String userId, String externalSourceGUID, String externalSourceName, String endpointGUID)Remove the requested Endpoint if it is no longer connected to any other connection or server definition.StringsaveEndpoint(String userId, String externalSourceGUID, String externalSourceName, Endpoint endpoint)Verify that the Endpoint 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
-
EndpointHandler
public EndpointHandler(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
-
saveEndpoint
public String saveEndpoint(String userId, String externalSourceGUID, String externalSourceName, Endpoint endpoint) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Verify that the Endpoint object is stored in the repository and create it if it is not. If the endpoint is located, there is no check that the endpoint values are equal to those in the supplied endpoint 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 sourceendpoint- object to add- Returns:
- unique identifier of the endpoint in the repository.
- Throws:
InvalidParameterException- the endpoint bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
removeEndpoint
public void removeEndpoint(String userId, String externalSourceGUID, String externalSourceName, String endpointGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Remove the requested Endpoint 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 sourceendpointGUID- object to delete- Throws:
InvalidParameterException- the entity guid is not knownUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getEndpoint
public Endpoint getEndpoint(String userId, String endpointGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Retrieve the requested endpoint object.- Parameters:
userId- calling userendpointGUID- unique identifier of the endpoint object.- Returns:
- Endpoint bean
- Throws:
InvalidParameterException- the parameters are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getEndpointsByNetworkAddress
public List<Endpoint> getEndpointsByNetworkAddress(String userId, String networkAddress, int startFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Retrieve the list of endpoint objects that have the supplied network address.- Parameters:
userId- calling usernetworkAddress- address to query onstartFrom- place to start in querypageSize- number of results to returnmethodName- calling method- Returns:
- list of matching Endpoint beans
- Throws:
InvalidParameterException- the parameters are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
-