Class UpgradeTask911MigrateOldEvents
java.lang.Object
com.atlassian.crowd.upgrade.tasks.UpgradeTask911MigrateOldEvents
- All Implemented Interfaces:
UpgradeTask
Crowd 3.2 introduces a new audit log event syntax where the event that an audit log represents is a combination of
an entity type (noun) and an event type (verb). Such an approach turned out to be problematic with events with
multiple entities (such as membership events), both for determining what happened in the given event and with querying.
This upgrade task migrates existing audit log events to the Crowd 3.2 format wherever possible. The migration affects
only events generated by Crowd. The mapping is as follows:
- events with entity type CONFIGURATION and event type MODIFIED become events with event type CONFIGURATION_MODIFIED
- events with entity type RESTORE and event type STARTED become events with event type RESTORE_STARTED
- events with entity type RESTORE and event type COMPLETED become events with event type RESTORE_FINISHED
- events with entity type APPLICATION and event type CREATED become events with event type APPLICATION_CREATED
- events with entity type APPLICATION and event type MODIFIED become events with event type APPLICATION_UPDATED
- events with entity type APPLICATION and event type DELETED become events with event type APPLICATION_DELETED
- events with entity type DIRECTORY and event type CREATED become events with event type DIRECTORY_CREATED
- events with entity type DIRECTORY and event type MODIFIED become events with event type DIRECTORY_UPDATED
- events with entity type DIRECTORY and event type DELETED become events with event type DIRECTORY_DELETED
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUpgradeTask911MigrateOldEvents
(UpgradeUtilityDAOHibernate upgradeUtilityDAOHibernate, org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform the upgrade.int
A short (less than 50 chars) description of the upgrade actionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.upgrade.tasks.UpgradeTask
getErrors
-
Field Details
-
EVENT_TYPE_PARAM
- See Also:
-
ENTITY_TYPE_PARAM
- See Also:
-
-
Constructor Details
-
UpgradeTask911MigrateOldEvents
public UpgradeTask911MigrateOldEvents(UpgradeUtilityDAOHibernate upgradeUtilityDAOHibernate, org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
getBuildNumber
public int getBuildNumber()- Specified by:
getBuildNumber
in interfaceUpgradeTask
- Returns:
- The build number that this upgrade is applicable to.
-
getShortDescription
Description copied from interface:UpgradeTask
A short (less than 50 chars) description of the upgrade action- Specified by:
getShortDescription
in interfaceUpgradeTask
- Returns:
- description of upgrade task.
-
doUpgrade
Description copied from interface:UpgradeTask
Perform the upgrade.- Specified by:
doUpgrade
in interfaceUpgradeTask
- Throws:
Exception
- is thrown if any errors occur during the upgrade process.
-