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
serverNameFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the config filegetFileNames(String templateString, String methodName) Get filenames from the file system that match the store template.voidRemove the server configuration.Retrieve all the stored server configurationsRetrieve the configuration saved from a previous run of the server.voidsaveServerConfig(OMAGServerConfig omagServerConfig) Save the server configuration.voidstart()Set up the name of the file storeMethods inherited from class org.odpi.openmetadata.adminservices.store.OMAGServerConfigStoreConnectorBase
getStoreName, setServerNameMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestampMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
startin classConnectorBase- Throws:
ConnectorCheckedException- something went wrongUserNotAuthorizedException- the connector was disconnected before/during start
-
saveServerConfig
Save the server configuration.- Specified by:
saveServerConfigin interfaceOMAGServerConfigStore- Parameters:
omagServerConfig- - configuration properties to save
-
retrieveServerConfig
Retrieve the configuration saved from a previous run of the server.- Specified by:
retrieveServerConfigin interfaceOMAGServerConfigStore- Returns:
- server configuration
-
removeServerConfig
public void removeServerConfig()Remove the server configuration.- Specified by:
removeServerConfigin interfaceOMAGServerConfigStore
-
retrieveAllServerConfigs
Retrieve all the stored server configurations- Specified by:
retrieveAllServerConfigsin 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:
disconnectin classConnectorBase
-