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_INIT_VALUE_ALLOWED_GROUPS, ACL_INIT_VALUE_ALLOWED_USERS, ACL_INIT_VALUE_ANONYMOUS, ACL_INIT_VALUE_ANYCONNECTED, ACL_INIT_VALUE_DENIED_GROUPS, ACL_INIT_VALUE_DENIED_USERS, ALL_CONTENT_TYPES, ALL_MIXIN_TYPES, ALL_TAGS, ATTACHMENT_CONTENT_ID, CONTENT_COMMENTS, CONTENT_COMMENTS_NONVALIDATED, CONTENT_COMMENTS_VALIDATED, CONTENT_CREATOR, CONTENT_LANGUAGE, CONTENT_LANGUAGES, CONTENT_LAST_CONTRIBUTOR, CONTENT_NAME, CONTENT_OUTGOING_REFEERENCES_RESOURCE_IDS, CONTENT_TITLES, CONTENT_TYPE_RESOURCE, CONTENT_TYPES, CONTENT_VISIBLE_ATTACHMENT_RESOURCE_IDS, 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, FIRST_VALIDATION, FULL_EXACT_WS, FULL_GENERAL, FULL_PREFIX, FULL_STEMMED_PREFIX, ID, IS_AMETYS_OBJECT, LAST_MAJOR_VALIDATION, LAST_MODIFIED, LAST_VALIDATION, LENGTH, MIME_TYPES, MIXIN_TYPES, PATH, PSEUDO_CONTENT_TYPE_VALUE_RESOURCE, PSEUDO_CONTENT_TYPES, REPEATER_ENTRY_POSITION, RESOURCE_ANCESTOR_AND_SELF_IDS, RESOURCE_ANCESTOR_IDS, RESOURCE_CREATOR, RESOURCE_DATE, RESOURCE_LAST_MODIFIED, RESOURCE_ROOT_ID, SIMPLE_CONTENT_PARENTS, SUB_CONTENT, TAGS, TITLE, TITLE_SORT, TYPE_CONTENT, TYPE_CONTENT_ATTACHMENT_RESOURCE, TYPE_CONTENT_ATTRIBUTE_RESOURCE, 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,
SolrClient solrClient)
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,
SolrClient solrClient)
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, SolrClient solrClient) throws SolrServerException, IOException
object
- The ametys object.workspaceName
- The workspace where to work insolrClient
- The solr client to useSolrServerException
- 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, SolrClient solrClient) throws SolrServerException, IOException
objectId
- The Ametys object ID.workspaceName
- The workspace where to work insolrClient
- The solr client to useSolrServerException
- If a solr error occurs.IOException
- If an I/O error occurs while indexing.