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 AnyObjectDAOanyObjectDAOprotected org.opensearch.client.opensearch.OpenSearchClientclientprotected GroupDAOgroupDAOprotected OpenSearchIndexManagerindexManagerprotected RealmDAOrealmDAOprotected UserDAOuserDAOprotected OpenSearchUtilsutils-
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.TypeMappinganyObjectMapping()protected org.opensearch.client.opensearch.indices.IndexSettingsanyObjectSettings()protected org.opensearch.client.opensearch._types.mapping.TypeMappingauditMapping()protected org.opensearch.client.opensearch.indices.IndexSettingsauditSettings()protected StringdoExecute(boolean dryRun, String executor, org.quartz.JobExecutionContext context)The actual execution, delegated to child classes.protected org.opensearch.client.opensearch._types.mapping.TypeMappinggroupMapping()protected org.opensearch.client.opensearch.indices.IndexSettingsgroupSettings()protected booleanhasToBeRegistered(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.TypeMappingrealmMapping()protected org.opensearch.client.opensearch.indices.IndexSettingsrealmSettings()protected org.opensearch.client.opensearch._types.mapping.TypeMappinguserMapping()protected org.opensearch.client.opensearch.indices.IndexSettingsuserSettings()-
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:AbstractSchedTaskJobDelegateThe actual execution, delegated to child classes.- Specified by:
doExecutein 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:AbstractSchedTaskJobDelegateTemplate method to determine whether this job's task execution has to be persisted or not.- Overrides:
hasToBeRegisteredin classAbstractSchedTaskJobDelegate<SchedTask>- Parameters:
execution- task execution- Returns:
- whether to persist or not
-
-