public final class UpgradeTasks extends Object
Modifier and Type | Method and Description |
---|---|
static org.opends.server.tools.upgrade.UpgradeTask |
addConfigEntry(LocalizableMessage summary,
String... ldif)
Returns a new upgrade task which adds a config entry to the underlying
config file.
|
static org.opends.server.tools.upgrade.UpgradeTask |
addConfigEntry(String... ldif)
Returns a new upgrade task which adds a config entry to the underlying
config file.
|
static org.opends.server.tools.upgrade.UpgradeTask |
addConfigFile(String fileName)
This task copies the file placed in parameter within the config folder.
|
static org.opends.server.tools.upgrade.UpgradeTask |
copySchemaFile(String fileName)
This task copies the file placed in parameter within the config / schema
folder.
|
static org.opends.server.tools.upgrade.UpgradeTask |
deleteConfigEntry(LocalizableMessage summary,
String... dnsInLDIF)
Returns a new upgrade task which deletes a config entry from the underlying config file.
|
static org.opends.server.tools.upgrade.UpgradeTask |
deleteFile(File file)
Removes the specified file from the file-system.
|
static org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.UpgradeTask |
newAttributeTypes(LocalizableMessage summary,
String fileName,
String... attributeOids)
This task adds or updates an attribute type (must exist in the original file)
to the file specified in
fileName . |
static org.opends.server.tools.upgrade.UpgradeTask |
newObjectClasses(LocalizableMessage summary,
String fileName,
String... objectClassesOids)
This task adds or updates an object class (must exist in the original file)
to the file specified in
fileName . |
static org.opends.server.tools.upgrade.UpgradeTask |
postUpgradeRebuildIndexes()
This task is processed at the end of the upgrade, rebuilding indexes.
|
static org.opends.server.tools.upgrade.UpgradeTask |
rebuildAllIndexes(LocalizableMessage summary)
Creates a rebuild all indexes task.
|
static org.opends.server.tools.upgrade.UpgradeTask |
rebuildIndexesNamed(LocalizableMessage summary,
String... indexNames)
Creates a rebuild index task for a given single index.
|
static org.opends.server.tools.upgrade.UpgradeTask |
regressionInVersion(String versionString,
org.opends.server.tools.upgrade.UpgradeTask... tasks)
Creates a group of tasks which will only be invoked if the current version
is more recent than the provided version.
|
static org.opends.server.tools.upgrade.UpgradeTask |
renameSnmpSecurityConfig(LocalizableMessage summary)
Renames the SNMP security config file if it exists.
|
static org.opends.server.tools.upgrade.UpgradeTask |
rerunJavaPropertiesTool(LocalizableMessage summary)
Re-run the dsjavaproperties tool to rewrite the set-java-home script/batch file.
|
static org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.UpgradeTask addConfigEntry(String... ldif)
ldif
- The LDIF record which will be applied to matching entries.public static org.opends.server.tools.upgrade.UpgradeTask copySchemaFile(String fileName)
fileName
- The name of the file which need to be copied.public static org.opends.server.tools.upgrade.UpgradeTask addConfigFile(String fileName)
fileName
- The name of the file which need to be copied.public static org.opends.server.tools.upgrade.UpgradeTask deleteConfigEntry(LocalizableMessage summary, String... dnsInLDIF)
summary
- The summary of this upgrade task.dnsInLDIF
- The dns to delete in the form of LDIF.public static org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.UpgradeTask newAttributeTypes(LocalizableMessage summary, String fileName, String... attributeOids)
fileName
. The destination must be a file
contained in the config/schema folder. The attribute type is updated if an
attribute with the same OID exists.
e.g : This example adds a new attribute type named 'etag' in the 00-core.ldif.
The 'etag' attribute already exists in the 00-core.ldif template schema file.
register("2.5.0", 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 definitions. This file must be
contained in the configuration/schema folder.attributeOids
- The OIDs of the attributes to add or update.fileName
public static org.opends.server.tools.upgrade.UpgradeTask newObjectClasses(LocalizableMessage summary, String fileName, String... objectClassesOids)
fileName
. The destination must be a file
contained in the config/schema folder. The object class will be updated if
a definition with the same OID exists, and added otherwise.summary
- The summary of the task.fileName
- The file where to add the new definitions. This file must be
contained in the configuration/schema folder.objectClassesOids
- The OIDs of the object classes to add or update.fileName
public static org.opends.server.tools.upgrade.UpgradeTask rerunJavaPropertiesTool(LocalizableMessage summary)
summary
- The summary of the task.public static org.opends.server.tools.upgrade.UpgradeTask regressionInVersion(String versionString, org.opends.server.tools.upgrade.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 org.opends.server.tools.upgrade.UpgradeTask rebuildAllIndexes(LocalizableMessage summary)
summary
- The summary of this upgrade task.public static org.opends.server.tools.upgrade.UpgradeTask rebuildIndexesNamed(LocalizableMessage summary, String... indexNames)
summary
- A message describing why the index needs to be rebuilt and asking
them whether they wish to perform this task after the upgrade.indexNames
- The indexes to rebuild.public static org.opends.server.tools.upgrade.UpgradeTask postUpgradeRebuildIndexes()
public static org.opends.server.tools.upgrade.UpgradeTask updateConfigUpgradeFolder()
public static org.opends.server.tools.upgrade.UpgradeTask renameSnmpSecurityConfig(LocalizableMessage summary)
summary
- The summary of this upgrade task.public static org.opends.server.tools.upgrade.UpgradeTask deleteFile(File file)
file
- The file to be removed.public static org.opends.server.tools.upgrade.UpgradeTask migrateLocalDBBackendsToJEBackends()
Copyright 2010-2017 ForgeRock AS.