Package org.ametys.odf.schedulable
Class ComputeProgramSkillsSchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.odf.schedulable.ComputeProgramSkillsSchedulable
- All Implemented Interfaces:
Schedulable
,LogEnabled
,PluginAware
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ComputeProgramSkillsSchedulable
Scheduler to compute the acquired skills on subprogram/programs from skills hold by their courses.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser
-
Field Summary
Modifier and TypeFieldDescriptionprotected CatalogsManager
The catalog managerprotected ContentSearcherFactory
The content searcherprotected SolrClientProvider
The provider for solr clientprotected SolrIndexer
The solr indexerstatic final String
The key for the catalogFields inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager, _startTime, _userManager, PROGRESSION_TRACKER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doReindex
(JobExecutionContext context, String workspaceName) Find and reindex contents for a given workspace and catalogvoid
execute
(JobExecutionContext context, ContainerProgressionTracker progressionTracker) The action to perform when a trigger is fired.getContentIds
(String catalogName, String workspaceName) Get the id of contents to re-indexprotected void
indexContents
(Set<String> contentIds, String workspaceName) Index the given contents for a given workspacevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, getProgressionTracker, isPrivate, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
JOBDATAMAP_CATALOG_KEY
The key for the catalog- See Also:
-
_catalogsManager
The catalog manager -
_solrIndexer
The solr indexer -
_solrClientProvider
The provider for solr client -
_contentSearcherFactory
The content searcher
-
-
Constructor Details
-
ComputeProgramSkillsSchedulable
public ComputeProgramSkillsSchedulable()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractStaticSchedulable
- Throws:
ServiceException
-
execute
public void execute(JobExecutionContext context, ContainerProgressionTracker progressionTracker) throws Exception Description copied from interface:Schedulable
The action to perform when a trigger is fired. Do not manually call this method.- Parameters:
context
- the contextprogressionTracker
- The progression tracker- Throws:
Exception
- if an error occurred
-
doReindex
Find and reindex contents for a given workspace and catalog- Parameters:
context
- The execution contextworkspaceName
- the workspace's name
-
getContentIds
Get the id of contents to re-index- Parameters:
catalogName
- The catalog's name. Can be empty or null to get contents of default catalogworkspaceName
- the workspace's name- Returns:
- the id of contents to re-index
-
indexContents
Index the given contents for a given workspace- Parameters:
contentIds
- the id of contents to indexworkspaceName
- the workspace's name
-