public class PurgeVersionsManager extends AbstractLogEnabled implements Component, Serviceable
| Modifier and Type | Class and Description |
|---|---|
protected class |
PurgeVersionsManager.VersionInfo
Version information.
|
| Modifier and Type | Field and Description |
|---|---|
private static String |
__CURRENT_STEP_ID_PROPERTY
The current step ID property.
|
static String |
ROLE
The avalon component role.
|
| Constructor and Description |
|---|
PurgeVersionsManager() |
| Modifier and Type | Method and Description |
|---|---|
protected List<PurgeVersionsManager.VersionInfo> |
getAllVersions(VersionHistory versionHistory)
Get all versions of a version history.
|
int |
purgeContent(WorkflowAwareContent content,
long validationStepId,
int firstVersionsToKeep)
Purge a content.
|
protected int |
purgeContent(WorkflowAwareContent content,
VersionHistory versionHistory,
Version baseVersion,
long validationStepId,
int firstVersionsToKeep)
Purge a content version history.
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate static final String __CURRENT_STEP_ID_PROPERTY
public PurgeVersionsManager()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic int purgeContent(WorkflowAwareContent content, long validationStepId, int firstVersionsToKeep)
content - the content to purge.validationStepId - the ID of the validation step for this content.firstVersionsToKeep - the count of first versions to keep.protected int purgeContent(WorkflowAwareContent content, VersionHistory versionHistory, Version baseVersion, long validationStepId, int firstVersionsToKeep) throws RepositoryException
content - the content.versionHistory - the version history to purge.baseVersion - the content base version, must be kept.validationStepId - the ID of the validation step for this content.firstVersionsToKeep - the count of first versions to keep.RepositoryException - if an error occurs.protected List<PurgeVersionsManager.VersionInfo> getAllVersions(VersionHistory versionHistory) throws RepositoryException
versionHistory - the version history to purge.RepositoryException - if an error occurs.