Class CocoClinicalTrialBaseService
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
org.odpi.openmetadata.frameworks.governanceaction.GeneralGovernanceActionService
org.odpi.openmetadata.samples.governanceactions.clinicaltrials.CocoClinicalTrialBaseService
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,GovernanceActionService
- Direct Known Subclasses:
CocoClinicalTrialCertifyHospitalService
,CocoClinicalTrialHospitalOnboardingService
,CocoClinicalTrialNominateHospitalService
,CocoClinicalTrialSetUpDataLakeService
,CocoClinicalTrialSetUpService
Provides shared functions for the clinical trial services.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.governanceaction.GeneralGovernanceActionService
governanceContext
Fields inherited from class org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
auditLog, governanceServiceName, propertyHelper
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetDetails, connectionBean, connectionDetails, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addActionTargetToProcess
(String processGUID, String actionTargetName, String actionTargetGUID) Link an action target to a process.protected void
addGovernedByRelationship
(String dataQualityCertificationTypeGUID, String sandboxSchemaGUID) Link the certification type to the schema.protected void
addResourceListRelationship
(String consumerGUID, String resourceGUID, ResourceUse resourceUse) Set up the ResourceList relationship between an implementation component and a solution component.protected void
addSolutionComponentRelationship
(String solutionComponentGUID, String implementationGUID, String informationSupplyChainQualifiedName, String role) Set up the ImplementedBy relationship between an implementation component and a solution component.protected void
checkCertificationValidForProject
(String projectGUID, String certificationTypeGUID) Check that the certification type is associated with the requested project.protected String
createGovernanceActionProcess
(String processQualifiedName, String processName, String processDescription, String topLevelProjectGUID) Create the governance action process asset.protected String
createPopulateSandboxDAG
(String airflowDAGName, String topLevelProjectGUID) Create a process to represent the Airflow DAG that populates the sandbox.protected String
createSandboxSchema
(String topLevelProjectGUID) Create the sandbox database schema - it is assumed that details of the schema are passed in the request parameters.getContactDetailsForPersonGUID
(String personGUID) Retrieve the email for a specific person.protected String
getInformationSupplyChainQualifiedName
(String informationSupplyChainGUID) Extract the qualified name for the information supply chain.protected ElementProperties
getResourceUseProperties
(ResourceUse resourceUse) Set up the properties for a resource use enum.Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.GeneralGovernanceActionService
disconnect, getProperty, setGovernanceContext, start
Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
getArrayRequestParameter, getBooleanRequestParameter, getConnectorComponentDescription, getIntRequestParameter, getLongRequestParameter, getStringRequestParameter, handleUnexpectedException, setAuditLog, setGovernanceServiceName, validateContext
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
CocoClinicalTrialBaseService
public CocoClinicalTrialBaseService()
-
-
Method Details
-
getInformationSupplyChainQualifiedName
protected String getInformationSupplyChainQualifiedName(String informationSupplyChainGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Extract the qualified name for the information supply chain.- Parameters:
informationSupplyChainGUID
- unique identifier of the information supply chain element- Returns:
- string
- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- problem accessing the metadata repository/serverUserNotAuthorizedException
- security problem
-
getContactDetailsForPersonGUID
protected CocoClinicalTrialBaseService.PersonContactDetails getContactDetailsForPersonGUID(String personGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the email for a specific person.- Parameters:
personGUID
- unique identifier of the person entity for the individual- Returns:
- email address for the individual; or null if it is not found
- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- problem accessing the metadata repository/serverUserNotAuthorizedException
- security problem
-
checkCertificationValidForProject
protected void checkCertificationValidForProject(String projectGUID, String certificationTypeGUID) throws ConnectorCheckedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException Check that the certification type is associated with the requested project. Otherwise, the certification does not make sense.- Parameters:
projectGUID
- unique identifier of the projectcertificationTypeGUID
- unique identifier of the certification type- Throws:
ConnectorCheckedException
- the certification type is not linked to the projectInvalidParameterException
- invalid parameter passed somehowPropertyServerException
- problem connecting to the open metadata repositoryUserNotAuthorizedException
- security problem
-
addActionTargetToProcess
protected void addActionTargetToProcess(String processGUID, String actionTargetName, String actionTargetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Link an action target to a process. This action target will be available for all steps in the process.- Parameters:
processGUID
- unique identifier of the processactionTargetName
- name of the target for action relationshipactionTargetGUID
- unique identifier of the target- Throws:
InvalidParameterException
- parameter errorPropertyServerException
- repository errorUserNotAuthorizedException
- authorization error
-
createGovernanceActionProcess
protected String createGovernanceActionProcess(String processQualifiedName, String processName, String processDescription, String topLevelProjectGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create the governance action process asset.- Parameters:
processQualifiedName
- new qualified name for the processprocessName
- new name for the processprocessDescription
- new description for the processtopLevelProjectGUID
- unique identifier for the top level project - used as a search scope- Returns:
- unique identifier of new governance action process
- Throws:
InvalidParameterException
- parameter errorPropertyServerException
- repository errorUserNotAuthorizedException
- authorization error
-
addSolutionComponentRelationship
protected void addSolutionComponentRelationship(String solutionComponentGUID, String implementationGUID, String informationSupplyChainQualifiedName, String role) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Set up the ImplementedBy relationship between an implementation component and a solution component. The information supply chain qualified names ensures that the appropriate assets are returned on a specific ISC lineage query.- Parameters:
solutionComponentGUID
- unique identifier of the solution componentimplementationGUID
- unique identifier of the newly set up governance action processinformationSupplyChainQualifiedName
- option name of information supply chain - used to identify solution component implementations that are specific to a particular information supply chainrole
- optional role of the implementation- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- repository errorUserNotAuthorizedException
- security error
-
addResourceListRelationship
protected void addResourceListRelationship(String consumerGUID, String resourceGUID, ResourceUse resourceUse) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Set up the ResourceList relationship between an implementation component and a solution component.- Parameters:
consumerGUID
- unique identifier of the element that is to use the elementresourceGUID
- unique identifier of the resourceresourceUse
- how is the resource to be used?- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- repository errorUserNotAuthorizedException
- security error
-
getResourceUseProperties
Set up the properties for a resource use enum.- Parameters:
resourceUse
- enum- Returns:
- element properties
-
addGovernedByRelationship
protected void addGovernedByRelationship(String dataQualityCertificationTypeGUID, String sandboxSchemaGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Link the certification type to the schema.- Parameters:
dataQualityCertificationTypeGUID
- certification typesandboxSchemaGUID
- database schema for the sandbox- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- repository errorUserNotAuthorizedException
- security error
-
createPopulateSandboxDAG
protected String createPopulateSandboxDAG(String airflowDAGName, String topLevelProjectGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a process to represent the Airflow DAG that populates the sandbox.- Parameters:
airflowDAGName
- nametopLevelProjectGUID
- unique identifier for the top level project - used as a search scope- Returns:
- guid
- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- repository errorUserNotAuthorizedException
- security error
-
createSandboxSchema
protected String createSandboxSchema(String topLevelProjectGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create the sandbox database schema - it is assumed that details of the schema are passed in the request parameters.- Parameters:
topLevelProjectGUID
- unique identifier for the top level project - used as a search scope- Returns:
- guid
- Throws:
InvalidParameterException
- invalid parameterPropertyServerException
- repository errorUserNotAuthorizedException
- security error
-