public class RestorePluginStateStoreTransactionCallbackDecorator extends Object implements org.springframework.transaction.support.TransactionCallback
PluginPersistentStateStore
before
execution and restore it after execution.
The assumption here is that the given callback is performing a site import which leads to
BackupImporter.deleteAllDatabaseContent()
thus deleting the persisted state of the implementation. The
restoration has to be performed before any #doImportInternal
upgrades are performed, as any state changes in
the plugin system would cause the MemoryPluginPersistentStateStore
from the ConfluencePluginManager
to be synchronised. Thus an implementation like this is necessary instead of implementing the PostImportTask
or reacting on ImportFinishedEvent
as they happen after the upgrades have been performed.
Constructor and Description |
---|
RestorePluginStateStoreTransactionCallbackDecorator(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore,
org.springframework.transaction.support.TransactionCallback delegate) |
Modifier and Type | Method and Description |
---|---|
Object |
doInTransaction(org.springframework.transaction.TransactionStatus status) |
public RestorePluginStateStoreTransactionCallbackDecorator(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, org.springframework.transaction.support.TransactionCallback delegate)
public Object doInTransaction(org.springframework.transaction.TransactionStatus status)
doInTransaction
in interface org.springframework.transaction.support.TransactionCallback
Copyright © 2003–2016 Atlassian. All rights reserved.