Class DiscoveryConfigurationHandler
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.discovery.DiscoveryConfigurationServer
-
- org.odpi.openmetadata.accessservices.discoveryengine.handlers.DiscoveryConfigurationHandler
-
public class DiscoveryConfigurationHandler extends DiscoveryConfigurationServer
DiscoveryConfigurationHandler provides the open metadata server side implementation of DiscoveryConfigurationServer which is part of the Open Discovery Framework (ODF).
-
-
Constructor Summary
Constructors Constructor Description DiscoveryConfigurationHandler(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 discovery engine configuration handler caching the objects needed to operate within a single server instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateDiscoveryEngine(String userId, String qualifiedName, String displayName, String description)Create a new discovery engine definition.StringcreateDiscoveryService(String userId, String qualifiedName, String displayName, String description, Connection connection)Create a discovery service definition.voiddeleteDiscoveryEngine(String userId, String guid, String qualifiedName)Remove the properties of the discovery engine.voiddeleteDiscoveryService(String userId, String guid, String qualifiedName)Remove the properties of the discovery service.List<DiscoveryEngineProperties>getAllDiscoveryEngines(String userId, int startingFrom, int maximumResults)Return the list of discovery engine definitions that are stored.List<DiscoveryServiceProperties>getAllDiscoveryServices(String userId, int startingFrom, int maximumResults)Return the list of discovery services definitions that are stored.DiscoveryEnginePropertiesgetDiscoveryEngineByGUID(String userId, String guid)Return the properties from a discovery engine definition.DiscoveryEnginePropertiesgetDiscoveryEngineByName(String userId, String name)Return the properties from a discovery engine definition.DiscoveryServicePropertiesgetDiscoveryServiceByGUID(String userId, String guid)Return the properties from a discovery service definition.DiscoveryServicePropertiesgetDiscoveryServiceByName(String userId, String name)Return the properties from a discovery service definition.List<String>getDiscoveryServiceRegistrations(String userId, String discoveryServiceGUID)Return the list of discovery engines that a specific discovery service is registered with.RegisteredDiscoveryServicegetRegisteredDiscoveryService(String userId, String discoveryEngineGUID, String discoveryServiceGUID)Retrieve a specific discovery service registered with a discovery engine.List<String>getRegisteredDiscoveryServices(String userId, String discoveryEngineGUID, int startingFrom, int maximumResults)Retrieve the identifiers of the discovery services registered with a discovery engine.voidregisterDiscoveryServiceWithEngine(String userId, String discoveryEngineGUID, String discoveryServiceGUID, String discoveryRequestType, Map<String,String> defaultAnalysisParameters)Register a discovery service with a specific discovery engine.voidunregisterDiscoveryServiceFromEngine(String userId, String discoveryEngineGUID, String discoveryServiceGUID)Unregister a discovery service from the discovery engine.voidupdateDiscoveryEngine(String userId, String guid, String qualifiedName, String displayName, String description, String typeDescription, String version, String patchLevel, String source, Map<String,String> additionalProperties, Map<String,Object> extendedProperties)Update the properties of an existing discovery engine definition.voidupdateDiscoveryService(String userId, String guid, String qualifiedName, String displayName, String description, Connection connection, Map<String,String> additionalProperties, Map<String,Object> extendedProperties)Update the properties of an existing discovery service definition.
-
-
-
Constructor Detail
-
DiscoveryConfigurationHandler
public DiscoveryConfigurationHandler(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 discovery engine configuration handler caching the objects needed to operate within a single server instance.- 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 objectslocalServerUserId- userId for this serversecurityVerifier- open metadata security services verifiersupportedZones- list of zones that the access service is allowed to serve B instances from.defaultZones- list of zones that the access service should set in all new B instances.publishZones- list of zones that the access service sets up in published B instances.auditLog- logging destination
-
-
Method Detail
-
createDiscoveryEngine
public String createDiscoveryEngine(String userId, String qualifiedName, String displayName, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new discovery engine definition.- Specified by:
createDiscoveryEnginein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userqualifiedName- unique name for the discovery engine.displayName- display name for messages and user interfaces.description- description of the types of discovery services that will be associated with this discovery engine.- Returns:
- unique identifier (guid) of the discovery engine definition. This is for use on other requests.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem storing the discovery engine definition.
-
getDiscoveryEngineByGUID
public DiscoveryEngineProperties getDiscoveryEngineByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the properties from a discovery engine definition. The discovery engine definition is completely contained in a single entity that can be retrieved from the repository services and converted to a bean.- Specified by:
getDiscoveryEngineByGUIDin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier (guid) of the discovery engine definition.- Returns:
- properties from the discovery engine definition.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery engine definition.
-
getDiscoveryEngineByName
public DiscoveryEngineProperties getDiscoveryEngineByName(String userId, String name) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the properties from a discovery engine definition. The discovery engine definition is completely contained in a single entity that can be retrieved from the repository services and converted to a bean.- Specified by:
getDiscoveryEngineByNamein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling username- qualified name or display name (if unique).- Returns:
- properties from the discovery engine definition.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery engine definition.
-
getAllDiscoveryEngines
public List<DiscoveryEngineProperties> getAllDiscoveryEngines(String userId, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the list of discovery engine definitions that are stored.- Specified by:
getAllDiscoveryEnginesin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userstartingFrom- initial position in the stored list.maximumResults- maximum number of definitions to return on this call.- Returns:
- list of discovery engine definitions.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery engine definitions.
-
updateDiscoveryEngine
public void updateDiscoveryEngine(String userId, String guid, String qualifiedName, String displayName, String description, String typeDescription, String version, String patchLevel, String source, Map<String,String> additionalProperties, Map<String,Object> extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of an existing discovery engine definition. Use the current value to keep a property value the same, or use the new value. Null means remove the property from the definition.- Specified by:
updateDiscoveryEnginein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier of the discovery engine - used to locate the definition.qualifiedName- new value for unique name of discovery engine.displayName- new value for the display name.description- new description for the discovery engine.typeDescription- new description of the type ofg discovery engine.version- new version number for the discovery engine implementation.patchLevel- new patch level for the discovery engine implementation.source- new source description for the implementation of the discovery engine.additionalProperties- additional properties for the discovery engine.extendedProperties- properties to populate the subtype of the discovery engine.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem storing the discovery engine definition.
-
deleteDiscoveryEngine
public void deleteDiscoveryEngine(String userId, String guid, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the properties of the discovery engine. Both the guid and the qualified name is supplied to validate that the correct discovery engine is being deleted.- Specified by:
deleteDiscoveryEnginein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier of the discovery engine - used to locate the definition.qualifiedName- unique name for the discovery engine.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery engine definition.
-
createDiscoveryService
public String createDiscoveryService(String userId, String qualifiedName, String displayName, String description, Connection connection) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a discovery service definition. The same discovery service can be associated with multiple discovery engines.- Specified by:
createDiscoveryServicein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userqualifiedName- unique name for the discovery service.displayName- display name for the discovery service.description- description of the analysis provided by the discovery service.connection- connection to instantiate the discovery service implementation.- Returns:
- unique identifier of the discovery service.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem storing the discovery service definition.
-
getDiscoveryServiceByGUID
public DiscoveryServiceProperties getDiscoveryServiceByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the properties from a discovery service definition.- Specified by:
getDiscoveryServiceByGUIDin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier (guid) of the discovery service definition.- Returns:
- properties of the discovery service.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service definition.
-
getDiscoveryServiceByName
public DiscoveryServiceProperties getDiscoveryServiceByName(String userId, String name) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the properties from a discovery service definition.- Specified by:
getDiscoveryServiceByNamein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling username- qualified name or display name (if unique).- Returns:
- properties from the discovery engine definition.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery engine definition.
-
getAllDiscoveryServices
public List<DiscoveryServiceProperties> getAllDiscoveryServices(String userId, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the list of discovery services definitions that are stored.- Specified by:
getAllDiscoveryServicesin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userstartingFrom- initial position in the stored list.maximumResults- maximum number of definitions to return on this call.- Returns:
- list of discovery service definitions.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service definitions.
-
getDiscoveryServiceRegistrations
public List<String> getDiscoveryServiceRegistrations(String userId, String discoveryServiceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the list of discovery engines that a specific discovery service is registered with.- Specified by:
getDiscoveryServiceRegistrationsin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userdiscoveryServiceGUID- discovery service to search for.- Returns:
- list of discovery engine unique identifiers (guids)
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service and/or discovery engine definitions.
-
updateDiscoveryService
public void updateDiscoveryService(String userId, String guid, String qualifiedName, String displayName, String description, Connection connection, Map<String,String> additionalProperties, Map<String,Object> extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of an existing discovery service definition. Use the current value to keep a property value the same, or use the new value. Null means remove the property from the definition.- Specified by:
updateDiscoveryServicein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier of the discovery service - used to locate the definition.qualifiedName- new value for unique name of discovery service.displayName- new value for the display name.description- new value for the description.connection- connection used to create an instance of this discovery service.additionalProperties- additional properties for the discovery engine.extendedProperties- properties to populate the subtype of the discovery service.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem storing the discovery service definition.
-
deleteDiscoveryService
public void deleteDiscoveryService(String userId, String guid, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the properties of the discovery service. Both the guid and the qualified name is supplied to validate that the correct discovery service is being deleted. The discovery service is also unregistered from its discovery engines.- Specified by:
deleteDiscoveryServicein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userguid- unique identifier of the discovery service - used to locate the definition.qualifiedName- unique name for the discovery service.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service definition.
-
registerDiscoveryServiceWithEngine
public void registerDiscoveryServiceWithEngine(String userId, String discoveryEngineGUID, String discoveryServiceGUID, String discoveryRequestType, Map<String,String> defaultAnalysisParameters) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Register a discovery service with a specific discovery engine. Both the discovery service and the discovery engine already exist so it is just a question of creating a relationship between them.- Specified by:
registerDiscoveryServiceWithEnginein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userdiscoveryEngineGUID- unique identifier of the discovery engine.discoveryServiceGUID- unique identifier of the discovery service.discoveryRequestType- list of discovery request types that this discovery service is able to process.defaultAnalysisParameters- list of analysis parameters that are passed the the discovery service (via the discovery context). These values can be overridden on the actual discovery request.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service and/or discovery engine definitions.
-
getRegisteredDiscoveryService
public RegisteredDiscoveryService getRegisteredDiscoveryService(String userId, String discoveryEngineGUID, String discoveryServiceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a specific discovery service registered with a discovery engine.- Specified by:
getRegisteredDiscoveryServicein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userdiscoveryEngineGUID- unique identifier of the discovery engine.discoveryServiceGUID- unique identifier of the discovery service.- Returns:
- details of the discovery service and the asset types it is registered for.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service and/or discovery engine definitions.
-
getRegisteredDiscoveryServices
public List<String> getRegisteredDiscoveryServices(String userId, String discoveryEngineGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the identifiers of the discovery services registered with a discovery engine.- Specified by:
getRegisteredDiscoveryServicesin classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userdiscoveryEngineGUID- unique identifier of the discovery engine.startingFrom- initial position in the stored list.maximumResults- maximum number of definitions to return on this call.- Returns:
- list of unique identifiers
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service and/or discovery engine definitions.
-
unregisterDiscoveryServiceFromEngine
public void unregisterDiscoveryServiceFromEngine(String userId, String discoveryEngineGUID, String discoveryServiceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Unregister a discovery service from the discovery engine.- Specified by:
unregisterDiscoveryServiceFromEnginein classDiscoveryConfigurationServer- Parameters:
userId- identifier of calling userdiscoveryEngineGUID- unique identifier of the discovery engine.discoveryServiceGUID- unique identifier of the discovery service.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- problem retrieving the discovery service and/or discovery engine definitions.
-
-