Class MaintenanceTaskManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.workspaces.repository.maintenance.MaintenanceTaskManager
org.ametys.plugins.repository.maintenance.MaintenanceTaskManager
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
This manager overrides the standalone manager to do specific in safe-mode (repository is not started)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.workspaces.repository.maintenance.MaintenanceTaskManager
MaintenanceTaskManager.MaintenanceTaskType
-
Field Summary
Fields inherited from class org.ametys.workspaces.repository.maintenance.MaintenanceTaskManager
_lastRunningTaskType, _repositoryProvider, _runningTask, _runningTaskType, _systemStatus, MAINTENANCE_TASK_ENDED, MAINTENANCE_TASK_RUNNING, REPOSITORY_UNAVAILABLE, ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractMaintenanceTask
Initialize the tasks.protected Pair<RepositoryConfig,
RepositoryContext> Retrieve the repository config if no repository is available or the repository context of the available repositoryMethods inherited from class org.ametys.workspaces.repository.maintenance.MaintenanceTaskManager
_createRepositoryConfig, contextualize, getLastRunningTaskType, getProgressInfo, getRunningTaskType, isRepositoryStarted, isTaskRunning, launch, service
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
MaintenanceTaskManager
public MaintenanceTaskManager()
-
-
Method Details
-
_createTask
Description copied from class:MaintenanceTaskManager
Initialize the tasks.- Overrides:
_createTask
in classMaintenanceTaskManager
- Parameters:
type
- MaintenanceTaskType- Returns:
- the task.
-
_getRepositoryInfo
protected Pair<RepositoryConfig,RepositoryContext> _getRepositoryInfo() throws ConfigurationException, javax.jcr.UnsupportedRepositoryOperationExceptionDescription copied from class:MaintenanceTaskManager
Retrieve the repository config if no repository is available or the repository context of the available repository- Overrides:
_getRepositoryInfo
in classMaintenanceTaskManager
- Returns:
- Either the config or the context depending if the repository is available. The other one will be null.
- Throws:
ConfigurationException
- if an error occurred while generating the configjavax.jcr.UnsupportedRepositoryOperationException
- if the repository doesn't support retrieving the context
-