Class OpenSearchReindex
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<SchedTask>
-
- org.apache.syncope.core.provisioning.java.job.OpenSearchReindex
-
- All Implemented Interfaces:
JobDelegate
,SchedTaskJobDelegate
public class OpenSearchReindex extends AbstractSchedTaskJobDelegate<SchedTask>
Remove and rebuild all OpenSearch indexes with information from existing users, groups and any objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyObjectDAO
anyObjectDAO
protected org.opensearch.client.opensearch.OpenSearchClient
client
protected GroupDAO
groupDAO
protected OpenSearchIndexManager
indexManager
protected RealmDAO
realmDAO
protected UserDAO
userDAO
protected OpenSearchUtils
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 OpenSearchReindex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.opensearch.client.opensearch._types.mapping.TypeMapping
anyObjectMapping()
protected org.opensearch.client.opensearch.indices.IndexSettings
anyObjectSettings()
protected org.opensearch.client.opensearch._types.mapping.TypeMapping
auditMapping()
protected org.opensearch.client.opensearch.indices.IndexSettings
auditSettings()
protected String
doExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)
The actual execution, delegated to child classes.protected org.opensearch.client.opensearch._types.mapping.TypeMapping
groupMapping()
protected org.opensearch.client.opensearch.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 org.opensearch.client.opensearch._types.mapping.TypeMapping
realmMapping()
protected org.opensearch.client.opensearch.indices.IndexSettings
realmSettings()
protected org.opensearch.client.opensearch._types.mapping.TypeMapping
userMapping()
protected org.opensearch.client.opensearch.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 org.opensearch.client.opensearch.OpenSearchClient client
-
indexManager
@Autowired protected OpenSearchIndexManager indexManager
-
utils
@Autowired protected OpenSearchUtils 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 org.opensearch.client.opensearch.indices.IndexSettings userSettings() throws IOException
- Throws:
IOException
-
groupSettings
protected org.opensearch.client.opensearch.indices.IndexSettings groupSettings() throws IOException
- Throws:
IOException
-
anyObjectSettings
protected org.opensearch.client.opensearch.indices.IndexSettings anyObjectSettings() throws IOException
- Throws:
IOException
-
realmSettings
protected org.opensearch.client.opensearch.indices.IndexSettings realmSettings() throws IOException
- Throws:
IOException
-
auditSettings
protected org.opensearch.client.opensearch.indices.IndexSettings auditSettings() throws IOException
- Throws:
IOException
-
userMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping userMapping() throws IOException
- Throws:
IOException
-
groupMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping groupMapping() throws IOException
- Throws:
IOException
-
anyObjectMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping anyObjectMapping() throws IOException
- Throws:
IOException
-
realmMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping realmMapping() throws IOException
- Throws:
IOException
-
auditMapping
protected org.opensearch.client.opensearch._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
-
-