Class ConsistencyCheckTask
java.lang.Object
org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
org.ametys.workspaces.repository.maintenance.ConsistencyCheckTask
- All Implemented Interfaces:
LogEnabled
,ConsistencyCheckListener
public class ConsistencyCheckTask
extends AbstractMaintenanceTask
implements ConsistencyCheckListener
ConsistencyCheckTask
-
Field Summary
Modifier and TypeFieldDescriptionprotected javax.jcr.Session
The JCR Session bound to this task.Fields inherited from class org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
_logger, _progress
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply()
Apply the tasks (within the execute method()).protected void
close()
Close the tasksvoid
void
protected void
Initialize the tasks.void
report
(ReportItem item) protected void
Set the tasks logger.void
startCheck
(String id) Methods inherited from class org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
_getFormattedDuration, createRepository, createRepositoryContext, execute, getAllPersistenceManager, getOrCreateRepository, getOrCreateRepositoryContext, getProgressInfo, getRepository, getRepositoryConfig, isFinished, requiresOffline, setLogger
-
Field Details
-
_session
The JCR Session bound to this task.
-
-
Constructor Details
-
ConsistencyCheckTask
public ConsistencyCheckTask()
-
-
Method Details
-
initialize
Description copied from class:AbstractMaintenanceTask
Initialize the tasks. This method can also create theTaskProgress
object bounded to the task.- Overrides:
initialize
in classAbstractMaintenanceTask
- Throws:
javax.jcr.RepositoryException
- If a repository exception
-
setLogger
Description copied from class:AbstractMaintenanceTask
Set the tasks logger.- Specified by:
setLogger
in classAbstractMaintenanceTask
-
apply
Description copied from class:AbstractMaintenanceTask
Apply the tasks (within the execute method()).- Specified by:
apply
in classAbstractMaintenanceTask
- Throws:
javax.jcr.RepositoryException
- If a repository exception
-
close
Description copied from class:AbstractMaintenanceTask
Close the tasks- Overrides:
close
in classAbstractMaintenanceTask
-
startCheck
- Specified by:
startCheck
in interfaceConsistencyCheckListener
-
report
- Specified by:
report
in interfaceConsistencyCheckListener
-
error
- Specified by:
error
in interfaceConsistencyCheckListener
-
info
- Specified by:
info
in interfaceConsistencyCheckListener
-