public class SolrWorkflowIndexer extends AbstractLogEnabled implements Component, Serviceable, SolrFieldNames
AmetysObject
s.Modifier and Type | Field and Description |
---|---|
protected SolrClientProvider |
_solrClientProvider
The Solr client provider
|
protected WorkflowProvider |
_workflowProvider
The workflow provider.
|
static String |
ROLE
The component role.
|
ACL_READ_ALLOW_ANONYMOUS, ACL_READ_ALLOW_ANY_CONNECTED_USER, ACL_READ_ALLOWED_GROUPS, ACL_READ_ALLOWED_USERS, ACL_READ_DENIED_GROUPS, ACL_READ_DENIED_USERS, ALL_CONTENT_TYPES, ALL_MIXIN_TYPES, ALL_TAGS, CONTENT_COMMENTS, CONTENT_COMMENTS_NONVALIDATED, CONTENT_COMMENTS_VALIDATED, CONTENT_CREATOR, CONTENT_LANGUAGE, CONTENT_LANGUAGES, CONTENT_LAST_CONTRIBUTOR, CONTENT_NAME, CONTENT_TITLES, CONTENT_TYPE_RESOURCE, CONTENT_TYPES, CREATION_DATE, DATE_FOR_SORTING, DATES_FACET, DC_CONTRIBUTOR, DC_COVERAGE, DC_CREATOR, DC_DATE, DC_DESCRIPTION, DC_FORMAT, DC_IDENTIFIER, DC_LANGUAGE, DC_PUBLISHER, DC_RELATION, DC_RIGHTS, DC_SOURCE, DC_SUBJECT, DC_TITLE, DC_TYPE, DOCUMENT_TYPE, EXCERPT, FILENAME, FULL_EXACT_WS, FULL_GENERAL, FULL_PREFIX, FULL_STEMMED_PREFIX, ID, LAST_MAJOR_VALIDATION, LAST_MODIFIED, LAST_VALIDATION, LENGTH, MIME_TYPES, MIXIN_TYPES, PATH, REPEATER_ENTRY_POSITION, RESOURCE_CREATOR, RESOURCE_DATE, RESOURCE_LAST_MODIFIED, RESOURCE_ROOT_ID, SUB_CONTENT, TAGS, TITLE, TITLE_SORT, TYPE_CONTENT, TYPE_REPEATER, TYPE_RESOURCE, TYPE_WF_ENTRY, TYPE_WF_STEP, WORKFLOW_CURRENT_STEPS, WORKFLOW_CURRENT_STEPS_DV, WORKFLOW_ENTRY_STATE, WORKFLOW_HISTORY_STEPS, WORKFLOW_HISTORY_STEPS_DV, WORKFLOW_NAME, WORKFLOW_REF, WORKFLOW_REF_DV, WORKFLOW_STEP, WORKFLOW_STEP_ACTIONID, WORKFLOW_STEP_CALLER, WORKFLOW_STEP_DUEDATE, WORKFLOW_STEP_FINISHDATE, WORKFLOW_STEP_ID, WORKFLOW_STEP_OWNER, WORKFLOW_STEP_STARTDATE, WORKFLOW_STEP_STATUS
Constructor and Description |
---|
SolrWorkflowIndexer() |
Modifier and Type | Method and Description |
---|---|
void |
indexAmetysObjectWorkflow(WorkflowAwareAmetysObject object,
String workspaceName)
Index the workflow history of an Ametys object.
|
void |
indexAmetysObjectWorkflow(WorkflowAwareAmetysObject object,
String workspaceName,
boolean commit)
Index the workflow history of an Ametys object.
|
private String |
indexStep(com.opensymphony.workflow.spi.Step step,
String objectId,
List<SolrInputDocument> documents) |
private List<String> |
indexSteps(List<com.opensymphony.workflow.spi.Step> steps,
String objectId,
List<SolrInputDocument> documents) |
private void |
indexWorkflowEntry(WorkflowProvider.AmetysObjectWorkflow workflow,
long workflowId,
String objectId,
List<String> historyStepIds,
List<String> currentStepIds,
List<SolrInputDocument> documents) |
void |
service(ServiceManager serviceManager) |
void |
unindexAmetysObjectWorkflow(String objectId,
String workspaceName)
Unindex the workflow history of an Ametys object.
|
void |
unindexAmetysObjectWorkflow(String objectId,
String workspaceName,
boolean commit)
Unindex the workflow history of an Ametys object.
|
getLogger, setLogger
protected SolrClientProvider _solrClientProvider
protected WorkflowProvider _workflowProvider
public SolrWorkflowIndexer()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void indexAmetysObjectWorkflow(WorkflowAwareAmetysObject object, String workspaceName) throws SolrServerException, IOException
object
- The ametys object.workspaceName
- The workspace where to work inSolrServerException
- If a solr error occurs.IOException
- If an I/O error occurs while indexing.public void indexAmetysObjectWorkflow(WorkflowAwareAmetysObject object, String workspaceName, boolean commit) throws SolrServerException, IOException
object
- The ametys object.workspaceName
- The workspace where to work incommit
- Whether to perform a commit after the indexation or not.SolrServerException
- If a solr error occurs.IOException
- If an I/O error occurs while indexing.private void indexWorkflowEntry(WorkflowProvider.AmetysObjectWorkflow workflow, long workflowId, String objectId, List<String> historyStepIds, List<String> currentStepIds, List<SolrInputDocument> documents)
private List<String> indexSteps(List<com.opensymphony.workflow.spi.Step> steps, String objectId, List<SolrInputDocument> documents)
private String indexStep(com.opensymphony.workflow.spi.Step step, String objectId, List<SolrInputDocument> documents)
public void unindexAmetysObjectWorkflow(String objectId, String workspaceName) throws SolrServerException, IOException
objectId
- The Ametys object ID.workspaceName
- The workspace where to work inSolrServerException
- If a solr error occurs.IOException
- If an I/O error occurs while indexing.public void unindexAmetysObjectWorkflow(String objectId, String workspaceName, boolean commit) throws SolrServerException, IOException
objectId
- The Ametys object ID.workspaceName
- The workspace where to work incommit
- Whether to perform a commit after the deletion or not.SolrServerException
- If a solr error occurs.IOException
- If an I/O error occurs while indexing.