UPGRADE_SHOW_WARNING_MESSAGE
instead.
*/
UPGRADE_SHOW_INFO_MESSAGE,
/**
* Indicates that the reverter tool will show a message to the
* administrator. Use this effect when you want to have the
* reverter show the user an informational message during upgrade
* but the message does not dictate that an action be performed.
*
* If you want the message to be scarier, use
* REVERSION_SHOW_WARNING_MESSAGE
instead.
*/
REVERSION_SHOW_INFO_MESSAGE,
/**
* Indicates that the upgrader will show a message to the
* administrator. Use this effect when you want to have the
* upgrader show the user an informational message during upgrade
* but the message does not dictate that an action be performed.
* For instance you might want to let the user know that due to
* a data format incompatibility, it will be more difficult to
* revert this build to its previous version following this upgrade.
*
* If you want the message to be less scary, use
* UPGRADE_SHOW_INFO_MESSAGE
instead.
*/
UPGRADE_SHOW_WARNING_MESSAGE,
/**
* Indicates that the reverter tool will show a message to the
* administrator. Use this effect when you want to have the
* reverter show the user an informational message during upgrade
* but the message does not dictate that an action be performed.
*
* If you want the message to be less scary, use
* REVERSION_SHOW_INFO_MESSAGE
instead.
*/
REVERSION_SHOW_WARNING_MESSAGE,
/**
* Indicates that the user needs to perform some manual action
* (for which there is not effect currently defined such as
* UPGRADE_DATA_EXPORT_AND_REIMPORT_REQUIRED
) in order for
* the operation to be successful. The action itself should
* be described in detail in the upgrade message.
*/
UPGRADE_MANUAL_ACTION_REQUIRED,
/**
* Indicates that the user needs to perform some manual action
* (for which there is not effect currently defined such as
* REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED
) in order for
* the operation to be successful. The action itself should
* be described in detail in the reversion message.
*/
REVERSION_MANUAL_ACTION_REQUIRED,
/**
* Indicates that it is not possible to upgrade between to builds
* between which lies a flag day. The upgrader will refuse to
* operate in this case.
*/
UPGRADE_NOT_POSSIBLE,
/**
* Indicates that it is not possible to revert between to builds
* between which lies a flag day. The reverter will refuse to run
* in this case.
*/
REVERSION_NOT_POSSIBLE,
/**
* Indicates that for some reason the server should not be restarted
* following a reversion. There might be situations where the admin
* needs to perform some actions before the server restarts (such as
* the database format being incompatible and the data needing an
* export followed by a re-import). This effect need not be included
* with UPGRADE_DATA_EXPORT_AND_REIMPORT_REQUIRED
and
* REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED
as this
* is assumed.
*/
NO_SERVER_RESTART_FOLLOWING_REVERSION,
}
//***************************************************
//
// TO DEFINE A NEW ISSUE:
//
// STEP 1: [scroll up]
//
// STEP 2: Define an cause below. A cause must be a specific
// event. For instance 'upgrade of the database libraries'
// on 12/17/2006. A cause associates the effect you selected
// in Step 1, detailed reversion and/or upgrade messages and
// a unique ID.
//
// A single issue may be apply to multiple branches of the
// code-base. For instance a single event might cause a flag
// day between upgrade/reversions from 1.0 to 2.0 as well as
// upgrading from 1.0 to 1.1. Therefore you must make sure
// that causes that appear in multiple branches have the same
// ID. Also, IDs should be unique among all causes in the
// code-base.
//
// STEP 3: [scroll down]
//
//***************************************************
/**
* Unique descriptor of an event that created a flag day for one
* or more versions of the OpenDJ codebase.
*/
public enum Cause {
/**
* Incompatible changes in ds-sync-hist normalization. This causes
* ds-sync-hist attribute indexes to be invalidated.
*/
DS_SYNC_HIST_NORMALIZATION_CHANGE_1(
10, // Unique ID. See javadoc for more information.
INFO_7635_UPGRADE.get(),
INFO_7635_REVERSION.get(),
Effect.REVERSION_MANUAL_ACTION_REQUIRED,
Effect.UPGRADE_MANUAL_ACTION_REQUIRED),
/**
* We not support the revert to the previous version.
*/
REVERT_NOT_SUPPORTED_1(
9, // Unique ID. See javadoc for more information.
INFO_5278_REVERSION.get(),
INFO_5278_REVERSION.get(),
Effect.REVERSION_NOT_POSSIBLE,
Effect.UPGRADE_SHOW_INFO_MESSAGE),
/**
* Incompatible changes in attribute value normalization. This causes
* indexes to be invalidated.
*/
STRINGPREP_NORMALIZATION_CHANGE_1(
8, // Unique ID. See javadoc for more information.
INFO_5134_UPGRADE.get(),
INFO_5134_REVERSION.get(),
Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED,
Effect.UPGRADE_DATA_EXPORT_AND_REIMPORT_REQUIRED),
/**
* Incompatible changes in DN normalization. This causes dn2id and
* RDN / DN syntax based attribute indexes to be invalidated.
*/
DN_NORMALIZATION_CHANGE_1(
7, // Unique ID. See javadoc for more information.
INFO_3873_UPGRADE.get(),
INFO_3873_REVERSION.get(),
Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED,
Effect.UPGRADE_DATA_EXPORT_AND_REIMPORT_REQUIRED),
/**
* Incompatible changes in the backend configuration (the db directory
* attribute has been modified).
*/
BACKEND_CONFIGURATION_CHANGE_1(
6, // Unique ID. See javadoc for more information.
INFO_3708_UPGRADE.get(),
INFO_3708_REVERSION.get(),
Effect.REVERSION_NOT_POSSIBLE,
Effect.UPGRADE_NOT_POSSIBLE),
/**
* Incompatible changes in the cryptomanager and specially in the way
* replication works. These changes were committed on several revisions
* and the flagday that has been chosen corresponds to revision 3294
* (opends 1.0.0 build 6 of 16/10/2007)
*/
REPLICATION_SECURITY_CHANGE_1(
5, // Unique ID. See javadoc for more information.
INFO_3294_UPGRADE.get(),
INFO_3294_REVERSION.get(),
Effect.REVERSION_NOT_POSSIBLE,
Effect.UPGRADE_NOT_POSSIBLE),
/**
* Incompatible property name change committed on 09/05/2007
* and described in the SVN log for rev 2974.
*/
PROPERTY_CHANGE_1(
4, // Unique ID. See javadoc for more information.
INFO_2974_UPGRADE.get(),
INFO_2974_REVERSION.get(),
Effect.REVERSION_NOT_POSSIBLE,
Effect.UPGRADE_NOT_POSSIBLE),
/**
* Database format change committed on 6/7/2007
* and described in the SVN log for rev 2049.
*/
DB_FORMAT_CHANGE_2(
3, // Unique ID. See javadoc for more information.
INFO_2049_UPGRADE.get(),
INFO_2049_REVERSION.get(),
Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED,
Effect.UPGRADE_SHOW_WARNING_MESSAGE),
/**
* Database format change committed on 4/6/2007
* and described in the SVN log for rev 1582.
*/
DB_FORMAT_CHANGE_1(
2, // Unique ID. See javadoc for more information.
INFO_1582_UPGRADE.get(),
INFO_1582_REVERSION.get(),
Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED,
Effect.UPGRADE_SHOW_WARNING_MESSAGE),
/**
* Upgrade of Berkley DB library to 3.2.13 on
* 12/17/2006.
*/
BERKLEY_UPGRADE_1(
1, // Unique ID. See javadoc for more information.
INFO_890_UPGRADE.get(),
INFO_890_REVERSION.get(),
Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED,
Effect.UPGRADE_SHOW_WARNING_MESSAGE);
/**
* Gets a Cause
from its unique ID. If no cause
* is associated with id
this method returns null.
* @param id of a cause
* @return Cause with id
*/
static Cause fromId(int id) {
Cause cause = null;
EnumSet* So if an issue exists in the 1.0 branch, an upgrade from 2.0 * to 3.0 will suppress the issue since it would presumably already * been dealt with when 2.0 was installed or upgraded to. Likewise * if an issue is assocated with a particular minor version (1.1 for * instance) major upgrades (1.0 to 2.0) will avoid presenting the * issue. * *
UPGRADE_MANUAL_ACTION_REQUIRED
) or give the
* user a warning message (when used with
* UPGRADE_SHOW_WARNING_MESSAGE
). If a message is
* present but no effects that would dictate how message is to
* be presented UPGRADE_SHOW_INFO_MESSAGE
is
* assumed. This parameter may also be null in which case no
* action will be taken during upgrade.
*
* @param reversionMessage a message to be shown to the user during a
* reversion between two different version between which this issue
* lies. This message might detail instructions for manual actions
* that must be performed (when used with the
* REVERSION_MANUAL_ACTION_REQUIRED
) or give the
* user a warning message (when used with
* REVERSION_SHOW_WARNING_MESSAGE
). If a message is
* present but no effects that would dictate how message is to
* be presented REVERSION_SHOW_INFO_MESSAGE
is
* assumed. This parameter may also be null in which case no
* action will be taken during reversion.
*
* @param effects of this cause which cause the upgrade/reversion tools
* to behave in particular ways
*/
private Cause(int id, Message upgradeMessage, Message reversionMessage,
Effect... effects) {
this.id = id;
this.upgradeMsg = upgradeMessage;
this.reversionMsg = reversionMessage;
if (effects != null) {
for (Effect c : effects) {
this.effects.add(c);
}
}
}
/**
* Gets the ID of this cause.
* @return id of this cause
*/
public int getId() {
return this.id;
}
/**
* Gets the set of effects that cause the upgrade/reversion
* tools to behave in particular ways.
*
* @return set of effects
*/
public SetUPGRADE_MANUAL_ACTION_REQUIRED
) or just give the
* user useful information (when used with
* UPGRADE_SHOW_INFO_MESSAGE
)
*/
public Message getLocalizedUpgradeMessage() {
return upgradeMsg;
}
/**
* Gets a localized message to be shown to the user during
* the reversion process.
*
* @return a message to be shown to the user during an
* upgrade between two different version between which this issue
* lies. This message might detail instructions for manual actions
* that must be performed (when used with the
* REVERSION_MANUAL_ACTION_REQUIRED
) or just give the
* user useful information (when used with
* REVERSION_SHOW_INFO_MESSAGE
)
*/
public Message getLocalizedReversionMessage() {
return reversionMsg;
}
}
/**
* Container for registered issues.
*/
static private final SetexcludeIds
.
*
* @param excludeIds collection of IDs representing issues
* that will not be returned in the list
* @param current build version
* @param neu build version
*
* @return list of issues sorted by build version in which
* they appear
*/
static public List