public class ConfigurationAdminMigratable extends Object implements Migratable
ConfigurationAdmin configurations. This includes importing
configuration files from a configuration directory and creating Configuration objects for
those and exporting Configuration objects to configuration files.| Constructor and Description |
|---|
ConfigurationAdminMigratable(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
List<PersistenceStrategy> strategies,
String defaultFileExtension) |
| Modifier and Type | Method and Description |
|---|---|
void |
doExport(ExportMigrationContext context)
Exports all required migratable data to the specified context.
|
void |
doImport(ImportMigrationContext context)
Imports all exported migratable data provided by the specified context when the current version
of this migratable (see
Migratable.getVersion()) matches the exported version. |
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Gets the current export version handled by this migratable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoIncompatibleImport, doMissingImportpublic ConfigurationAdminMigratable(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
List<PersistenceStrategy> strategies,
String defaultFileExtension)
public String getVersion()
MigratableWhen exporting data, the migration framework will export this version information and
provide it back to the Migratable.doIncompatibleImport(org.codice.ddf.migration.ImportMigrationContext, java.lang.String) method if the exported version string
doesn't match the one provided by this method when importing the data for this migratable.
The format of the version string is migratable-dependent.
getVersion in interface MigratablegetVersion in interface Describablepublic String getId()
DescribableFormat should be [product].[component] such as ddf.metacards, or ddf.platform;
while the [component] within a [product] may simply be a module or bundle name,
the [product] itself should be the unique name of the plug-in or integration that
belongs to the organization listed in Describable.getOrganization(). Note that 'ddf' as
a [product] is reserved for core features only.
getId in interface Describablepublic String getTitle()
DescribablegetTitle in interface Describablepublic String getDescription()
DescribablegetDescription in interface Describablepublic String getOrganization()
DescribablegetOrganization in interface Describablepublic void doExport(ExportMigrationContext context)
MigratableErrors, warnings, and/or information messages can be recorded along with the context's report. Doing so will not abort the operation.
doExport in interface Migratablecontext - a migration context to export all migratable data topublic void doImport(ImportMigrationContext context)
MigratableMigratable.getVersion()) matches the exported version.
Errors, warnings, and/or information messages can be recorded along with the context's report. Doing so will not abort the operation.
doImport in interface Migratablecontext - a migration context to import all exported migratable data fromThis work is licensed under a Creative Commons Attribution 4.0 International License.