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
public class ComputeProgramSkillsSchedulable extends AbstractStaticSchedulable
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
Fields Modifier and Type Field Description protected CatalogsManager_catalogsManagerThe catalog managerprotected ContentSearcherFactory_contentSearcherFactoryThe content searcherprotected SolrClientProvider_solrClientProviderThe provider for solr clientprotected SolrIndexer_solrIndexerThe solr indexerstatic StringJOBDATAMAP_CATALOG_KEYThe key for the catalog-
Fields inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager, _userManager
-
-
Constructor Summary
Constructors Constructor Description ComputeProgramSkillsSchedulable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoReindex(JobExecutionContext context, String workspaceName)Find and reindex contents for a given workspace and catalogvoidexecute(JobExecutionContext context)The action to perform when a trigger is fired.protected Set<String>getContentIds(String catalogName, String workspaceName)Get the id of contents to re-indexprotected voidindexContents(Set<String> contentIds, String workspaceName)Index the given contents for a given workspacevoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_getLaunchUser, _getLaunchUserIdentity, acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
JOBDATAMAP_CATALOG_KEY
public static final String JOBDATAMAP_CATALOG_KEY
The key for the catalog- See Also:
- Constant Field Values
-
_catalogsManager
protected CatalogsManager _catalogsManager
The catalog manager
-
_solrIndexer
protected SolrIndexer _solrIndexer
The solr indexer
-
_solrClientProvider
protected SolrClientProvider _solrClientProvider
The provider for solr client
-
_contentSearcherFactory
protected ContentSearcherFactory _contentSearcherFactory
The content searcher
-
-
Constructor Detail
-
ComputeProgramSkillsSchedulable
public ComputeProgramSkillsSchedulable()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractStaticSchedulable- Throws:
ServiceException
-
execute
public void execute(JobExecutionContext context) throws Exception
Description copied from interface:SchedulableThe action to perform when a trigger is fired. Do not manually call this method.- Specified by:
executein interfaceSchedulable- Specified by:
executein classAbstractStaticSchedulable- Parameters:
context- the context- Throws:
Exception- if an error occured
-
doReindex
protected void doReindex(JobExecutionContext context, String workspaceName)
Find and reindex contents for a given workspace and catalog- Parameters:
context- The execution contextworkspaceName- the workspace's name
-
getContentIds
protected Set<String> getContentIds(String catalogName, String workspaceName)
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
protected void indexContents(Set<String> contentIds, String workspaceName)
Index the given contents for a given workspace- Parameters:
contentIds- the id of contents to indexworkspaceName- the workspace's name
-
-