public class PermissionCheckingSynchronyDataService extends Object implements SynchronyDataService
SynchronyDataService
, which allows only Confluence administrator to launch the operation.Constructor and Description |
---|
PermissionCheckingSynchronyDataService(SynchronyDataService delegate,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
SynchronyRowsCount |
currentSynchronyDatasetSize(Long contentId)
If the parameter is not null, returns size of Synchrony history for that entity.
|
void |
hardRemoveHistoryOlderThan(int thresholdHours)
Remove all events from content entities, which have any data older than .
|
void |
removeApplicationCredentials(String applicationId)
Remove application credentials from Synchrony tables
|
void |
softRemoveHistoryOlderThan(int thresholdHours,
int contentCount)
Remove approximately content records from Synchrony history, which are older than
and are safe for removal.
|
public PermissionCheckingSynchronyDataService(SynchronyDataService delegate, PermissionManager permissionManager)
public SynchronyRowsCount currentSynchronyDatasetSize(Long contentId)
currentSynchronyDatasetSize
in interface SynchronyDataService
NotAuthorizedException
- if the user performing operation is not Confluence administratorpublic void softRemoveHistoryOlderThan(int thresholdHours, int contentCount)
SynchronyDataService.hardRemoveHistoryOlderThan(int)
.
The main purpose of this method is disk space cleanup in collab editing tables. Parameter allows to shift trade-off between removal efficiency (disk reclaiming) and the degree of intrusiveness.
The method is executed synchronously in the same thread. If exception is thrown somewhere in the middle, it is possible to have only a part of data removed, because the removal might happen in several transactions, but remaining data will always stay consistent (e.g. synchrony data consistent with content properties). This implementation adds permission check on top of actual functionality. Only Confluence administrator can perform the operation.
softRemoveHistoryOlderThan
in interface SynchronyDataService
NotAuthorizedException
- if the user performing operation is not Confluence administratorpublic void hardRemoveHistoryOlderThan(int thresholdHours)
The method guarantees to remove old personal data in order to be compliant with regulations. If the customer doesn't
care about any regulations, it shouldn't generally call the method, instead less intrusive
SynchronyDataService.softRemoveHistoryOlderThan(int, int)
should be used.
The method is executed synchronously in the same thread. If exception is thrown somewhere in the middle, it is possible to have only a part of data removed, because the removal might happen in several transactions, but remaining data will always stay consistent (e.g. synchrony data consistent with content properties). This implementation adds permission check on top of actual functionality. Only Confluence administrator can perform the operation.
hardRemoveHistoryOlderThan
in interface SynchronyDataService
NotAuthorizedException
- if the user performing operation is not Confluence administratorpublic void removeApplicationCredentials(String applicationId)
SynchronyDataService
removeApplicationCredentials
in interface SynchronyDataService
applicationId
- if of application to removeCopyright © 2003–2020 Atlassian. All rights reserved.