public final class UpgradeTasks extends Object
Modifier and Type | Method and Description |
---|---|
static UpgradeTask |
addConfigEntry(LocalizableMessage summary,
String... ldif)
Returns a new upgrade task which adds a config entry to the underlying
config file.
|
static UpgradeTask |
addConfigFile(String fileName)
This task copies the file placed in parameter within the config folder.
|
static UpgradeTask |
copySchemaFile(String fileName)
This task copies the file placed in parameter within the config / schema
folder.
|
static UpgradeTask |
deleteConfigEntry(LocalizableMessage summary,
String dnInLDIF)
Returns a new upgrade task which deletes a config entry from the underlying
config file.
|
static UpgradeTask |
deleteFile(File file)
Removes the specified file from the file-system.
|
static UpgradeTask |
migrateLocalDBBackendsToJEBackends()
Creates an upgrade task which is responsible for preparing local-db backend JE databases for a full rebuild once
they have been converted to pluggable JE backends.
|
static UpgradeTask |
modifyConfigEntry(LocalizableMessage summary,
String filter,
String... ldif)
Returns a new upgrade task which applies an LDIF record to all
configuration entries matching the provided filter.
|
static UpgradeTask |
newAttributeTypes(LocalizableMessage summary,
String fileName,
String... attributeOids)
This task adds a new attribute type (must exists in the original file) to
the specified file placed in parameter.
|
static UpgradeTask |
newObjectClasses(LocalizableMessage summary,
String fileName,
String... objectClassesOids)
This task adds a new object class (must exists in the original file) to the
specified file placed in parameter.
|
static UpgradeTask |
postUpgradeRebuildIndexes()
This task is processed at the end of the upgrade, rebuilding indexes.
|
static UpgradeTask |
rebuildAllIndexes(LocalizableMessage summary)
Creates a rebuild all indexes task.
|
static UpgradeTask |
rebuildSingleIndex(LocalizableMessage summary,
String index)
Creates a rebuild index task for a given single index.
|
static UpgradeTask |
regressionInVersion(String versionString,
UpgradeTask... tasks)
Creates a group of tasks which will only be invoked if the current version
is more recent than the provided version.
|
static UpgradeTask |
renameSnmpSecurityConfig(LocalizableMessage summary)
Renames the SNMP security config file if it exists.
|
static UpgradeTask |
rerunJavaPropertiesTool(LocalizableMessage summary)
Re-run the dsjavaproperties tool to rewrite the set-java-home script/batch file.
|
static UpgradeTask |
updateConfigUpgradeFolder()
Creates a file object representing config/upgrade/schema.ldif.current which
the server creates the first time it starts if there are schema
customizations.
|
public static UpgradeTask addConfigEntry(LocalizableMessage summary, String... ldif)
summary
- The summary of this upgrade task.ldif
- The LDIF record which will be applied to matching entries.public static UpgradeTask copySchemaFile(String fileName)
fileName
- The name of the file which need to be copied.public static UpgradeTask addConfigFile(String fileName)
fileName
- The name of the file which need to be copied.public static UpgradeTask deleteConfigEntry(LocalizableMessage summary, String dnInLDIF)
summary
- The summary of this upgrade task.dnInLDIF
- The dn to delete in the form of LDIF.public static UpgradeTask modifyConfigEntry(LocalizableMessage summary, String filter, String... ldif)
summary
- The summary of this upgrade task.filter
- The LDAP filter which configuration entries must match.ldif
- The LDIF record which will be applied to matching entries.public static UpgradeTask newAttributeTypes(LocalizableMessage summary, String fileName, String... attributeOids)
register("2.5.0.7192", newAttributeTypes(LocalizableMessage.raw("New attribute etag"), false, "00-core.ldif", "1.3.6.1.4.1.36733.2.1.1.59"));
summary
- The summary of the task.fileName
- The file where to add the new attribute types. This file must be
contained in the configuration/schema folder.attributeOids
- The OIDs of the new attributes to add to.public static UpgradeTask newObjectClasses(LocalizableMessage summary, String fileName, String... objectClassesOids)
summary
- The summary of the task.fileName
- The file where to add the new object classes. This file must be
contained in the configuration/schema folder.objectClassesOids
- The OIDs of the new object classes to add to.public static UpgradeTask rerunJavaPropertiesTool(LocalizableMessage summary)
summary
- The summary of the task.public static UpgradeTask regressionInVersion(String versionString, UpgradeTask... tasks)
versionString
- The lower bound version. The upgrade tasks will not be applied if
the current version is older than this version.tasks
- The group of tasks to invoke if the current version is equal to or
more recent than versionString
.public static UpgradeTask rebuildAllIndexes(LocalizableMessage summary)
summary
- The summary of this upgrade task.public static UpgradeTask rebuildSingleIndex(LocalizableMessage summary, String index)
summary
- A message describing why the index needs to be rebuilt and asking
them whether or not they wish to perform this task after the
upgrade.index
- The index to rebuild.public static UpgradeTask postUpgradeRebuildIndexes()
public static UpgradeTask updateConfigUpgradeFolder()
public static UpgradeTask renameSnmpSecurityConfig(LocalizableMessage summary)
summary
- The summary of this upgrade task.public static UpgradeTask deleteFile(File file)
file
- The file to be removed.public static UpgradeTask migrateLocalDBBackendsToJEBackends()
Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.