diff options
author | Thomas <> | 2021-03-24 12:16:25 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-24 12:16:25 +0100 |
commit | 835a395f3ecb7477b5b67e9da9bf3af58c86473a (patch) | |
tree | 916fa7705879063f6b83517d80197c37dc53caf8 /moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java | |
parent | a972fba0402eca3c5fcfcd1eef1979808fd716a1 (diff) | |
parent | 666d8c9f8cec7573e60a14ab039c0874f6a9ec53 (diff) | |
download | moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.tar.gz moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.tar.bz2 moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.zip |
Merge branch 'master' of gitlab.iaik.tugraz.at:egiz/moa-sig
# Conflicts:
# moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
# moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java index 59db7b5..f2d3b89 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java @@ -21,17 +21,17 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.api; import at.gv.egovernment.moa.spss.MOAException; import at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl; +import at.gv.egovernment.moa.spss.server.init.StartupConfigurationHolder; /** * Configures the SP/SS API. - * - * Also handles dynamic configuration updates. - * + * + * Also handles dynamic configuration updates. + * * @author Patrick Peck * @version $Id$ */ @@ -39,7 +39,7 @@ public abstract class Configurator { /** The default implementation class. */ private static final String DEFAULT_IMPLEMENTATION = - "at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl"; + "at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl"; /** The single instance of this class. */ private static Configurator instance = null; @@ -47,14 +47,13 @@ public abstract class Configurator { public static synchronized Configurator getInstance() { if (instance == null) { try { - /*DiscoverClass discover = new DiscoverClass(); - instance = - (Configurator) discover.newInstance( - Configurator.class, - DEFAULT_IMPLEMENTATION);*/ - instance = new ConfiguratorImpl(); - } catch (Exception e) { - // this can not happen since we provide a valid default + /* + * DiscoverClass discover = new DiscoverClass(); instance = (Configurator) + * discover.newInstance( Configurator.class, DEFAULT_IMPLEMENTATION); + */ + instance = new ConfiguratorImpl(); + } catch (final Exception e) { + // this can not happen since we provide a valid default // implementation } } @@ -62,23 +61,35 @@ public abstract class Configurator { } /** + * Get current configuration object. + * + * @return Configuration or <code>null</code> if it was not initialized yet + */ + public abstract StartupConfigurationHolder getCurrentConfiguration(); + + /** * Initialize the SP/SS configuration. - * - * Only a single call to this method will have an effect. Use - * <code>update()</code> for reflecting changes in the configuration instead. - * + * + * Only a single call to this method will have an effect. Use + * <code>update()</code> for reflecting changes in the configuration instead. + * + * @return Configuration holder + * * @throws MOAException An error occurred updating the SP/SS configuration. - */ - public abstract void init() throws MOAException; - + */ + public abstract StartupConfigurationHolder init() throws MOAException; + /** * Update the SP/SS configuration. - * + * * This will only have an effect after the system has been initialized once * using <code>init()</code>. - * + * + * @return Updated Configuration holder, or <code>null</code> if it was not + * initialized + * * @throws MOAException An error occurred updating the SP/SS configuration. */ - public abstract void update() throws MOAException; + public abstract StartupConfigurationHolder update() throws MOAException; } |