Class ConfiguratorImpl
- All Implemented Interfaces:
org.codice.ddf.admin.configurator.Configurator
Sequentially processes Operations, committing their changes. If a failure occurs
during the processing, a rollback is attempted of those handlers that had already been committed.
When the commit() operation completes - either successfully, with a successful rollback,
or with a failure to rollback - it returns a OperationReport of the outcome. In the case
of rollback failures, callers of this class should inform users of those failures so they may
manually intercede.
This class does not guarantee that it can reliably rollback changes in the case of failure. It makes a best-effort to revert changes and reports the outcome.
To use this class, first instantiate then invoke the various methods for feature, bundle,
config, etc. updates in the order they should be applied. When all have been completed, call the
commit() method to write the changes to the system. The resulting OperationReport will have the outcome.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConfiguratorImpl
public ConfiguratorImpl(ddf.security.audit.SecurityLogger securityLogger)
-
-
Method Details
-
commit
public org.codice.ddf.admin.configurator.OperationReport commit(String auditMessage, String... auditParams) Sequentially invokes all theOperations, committing their changes. If a failure occurs during the processing, a rollback is attempted of those handlers that had already been committed.In the case of a successful commit, the
SecurityLoggerwill be invoked to log changes.- Specified by:
commitin interfaceorg.codice.ddf.admin.configurator.Configurator- Parameters:
auditMessage- In the case of a successful commit, the message to pass to theSecurityLoggerauditParams- In the case of a successful commit, the optional parameters to pass to theSecurityLoggerto be interpolated into the message- Returns:
- report of the commit status, whether successful, successfully rolled back, or partially rolled back with errors
-
add
- Specified by:
addin interfaceorg.codice.ddf.admin.configurator.Configurator
-