Class FileBasedServerConfigStoreConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adminservices.store.OMAGServerConfigStoreConnectorBase
org.odpi.openmetadata.adapters.adminservices.configurationstore.file.FileBasedServerConfigStoreConnector
- All Implemented Interfaces:
OMAGServerConfigStore
,OMAGServerConfigStoreRetrieveAll
,SecureConnectorExtension
,VirtualConnectorExtension
public class FileBasedServerConfigStoreConnector
extends OMAGServerConfigStoreConnectorBase
implements OMAGServerConfigStoreRetrieveAll
FileBasedServerConfigStoreConnector provides a connector that manages a configuration document for an OMAG Server in a file
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.adminservices.store.OMAGServerConfigStoreConnectorBase
serverName
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the config filegetFileNames
(String templateString, String methodName) Get filenames from the file system that match the store template.void
Remove the server configuration.Retrieve all the stored server configurationsRetrieve the configuration saved from a previous run of the server.void
saveServerConfig
(OMAGServerConfig omagServerConfig) Save the server configuration.void
start()
Set up the name of the file storeMethods inherited from class org.odpi.openmetadata.adminservices.store.OMAGServerConfigStoreConnectorBase
getStoreName, setServerName
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.adminservices.store.OMAGServerConfigStore
setServerName
-
Constructor Details
-
FileBasedServerConfigStoreConnector
public FileBasedServerConfigStoreConnector()Default constructor
-
-
Method Details
-
start
Set up the name of the file store- Overrides:
start
in classConnectorBase
- Throws:
ConnectorCheckedException
- something went wrong
-
saveServerConfig
Save the server configuration.- Specified by:
saveServerConfig
in interfaceOMAGServerConfigStore
- Parameters:
omagServerConfig
- - configuration properties to save
-
retrieveServerConfig
Retrieve the configuration saved from a previous run of the server.- Specified by:
retrieveServerConfig
in interfaceOMAGServerConfigStore
- Returns:
- server configuration
-
removeServerConfig
public void removeServerConfig()Remove the server configuration.- Specified by:
removeServerConfig
in interfaceOMAGServerConfigStore
-
retrieveAllServerConfigs
Retrieve all the stored server configurations- Specified by:
retrieveAllServerConfigs
in interfaceOMAGServerConfigStoreRetrieveAll
- Returns:
- the set of server configurations present in this OMAG Server Config store
-
getFileNames
Get filenames from the file system that match the store template. Only supports 1 or 2 inserts in the template and they need to be in different url segments. When a file is matched on the file system, the match for the insert is the serverName.- Parameters:
templateString
- string that defines the shape of the file namemethodName
- callers name for diagnostics- Returns:
- set of filenames from the file System that match the template
-
disconnect
public void disconnect()Close the config file- Overrides:
disconnect
in classConnectorBase
-