Class ElasticsearchReindex
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<SchedTask>
-
- org.apache.syncope.core.provisioning.java.job.ElasticsearchReindex
-
- All Implemented Interfaces:
JobDelegate
,SchedTaskJobDelegate
public class ElasticsearchReindex extends AbstractSchedTaskJobDelegate<SchedTask>
Remove and rebuild all Elasticsearch indexes with information from existing users, groups and any objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ElasticsearchReindex.ErrorLoggingBulkListener
-
Field Summary
Fields Modifier and Type Field Description protected AnyObjectDAO
anyObjectDAO
protected co.elastic.clients.elasticsearch.ElasticsearchClient
client
protected GroupDAO
groupDAO
protected ElasticsearchIndexManager
indexManager
protected RealmDAO
realmDAO
protected UserDAO
userDAO
protected ElasticsearchUtils
utils
-
Fields inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
auditManager, interrupt, interrupted, LOG, notificationManager, publisher, securityProperties, task, taskDAO, taskDataBinder, taskExecDAO, taskType, taskUtilsFactory
-
Fields inherited from interface org.apache.syncope.core.provisioning.api.job.JobDelegate
OPERATION_ID
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchReindex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping
anyObjectMapping()
protected co.elastic.clients.elasticsearch.indices.IndexSettings
anyObjectSettings()
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping
auditMapping()
protected co.elastic.clients.elasticsearch.indices.IndexSettings
auditSettings()
protected String
doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)
The actual execution, delegated to child classes.protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping
groupMapping()
protected co.elastic.clients.elasticsearch.indices.IndexSettings
groupSettings()
protected boolean
hasToBeRegistered(TaskExec<?> execution)
Template method to determine whether this job's task execution has to be persisted or not.protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping
realmMapping()
protected co.elastic.clients.elasticsearch.indices.IndexSettings
realmSettings()
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping
userMapping()
protected co.elastic.clients.elasticsearch.indices.IndexSettings
userSettings()
-
Methods inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
execute, interrupt, isInterrupted, register, setStatus
-
-
-
-
Field Detail
-
client
@Autowired protected co.elastic.clients.elasticsearch.ElasticsearchClient client
-
indexManager
@Autowired protected ElasticsearchIndexManager indexManager
-
utils
@Autowired protected ElasticsearchUtils utils
-
userDAO
@Autowired protected UserDAO userDAO
-
groupDAO
@Autowired protected GroupDAO groupDAO
-
anyObjectDAO
@Autowired protected AnyObjectDAO anyObjectDAO
-
realmDAO
@Autowired protected RealmDAO realmDAO
-
-
Method Detail
-
userSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings userSettings() throws IOException
- Throws:
IOException
-
groupSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings groupSettings() throws IOException
- Throws:
IOException
-
anyObjectSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings anyObjectSettings() throws IOException
- Throws:
IOException
-
realmSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings realmSettings() throws IOException
- Throws:
IOException
-
auditSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings auditSettings() throws IOException
- Throws:
IOException
-
userMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping userMapping() throws IOException
- Throws:
IOException
-
groupMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping groupMapping() throws IOException
- Throws:
IOException
-
anyObjectMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping anyObjectMapping() throws IOException
- Throws:
IOException
-
realmMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping realmMapping() throws IOException
- Throws:
IOException
-
auditMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping auditMapping() throws IOException
- Throws:
IOException
-
doExecute
protected String doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
Description copied from class:AbstractSchedTaskJobDelegate
The actual execution, delegated to child classes.- Specified by:
doExecute
in classAbstractSchedTaskJobDelegate<SchedTask>
- Parameters:
dryRun
- whether to actually touch the dataexecutor
- the user executing this taskcontext
- Quartz' execution context, can be used to pass parameters to the job- Returns:
- the task execution status to be set
- Throws:
org.quartz.JobExecutionException
- if anything goes wrong
-
hasToBeRegistered
protected boolean hasToBeRegistered(TaskExec<?> execution)
Description copied from class:AbstractSchedTaskJobDelegate
Template method to determine whether this job's task execution has to be persisted or not.- Overrides:
hasToBeRegistered
in classAbstractSchedTaskJobDelegate<SchedTask>
- Parameters:
execution
- task execution- Returns:
- whether to persist or not
-
-