Class SolrProjectResourceIndexer
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.indexing.solr.SolrProjectResourceIndexer
-
- All Implemented Interfaces:
SolrFieldNames
,SolrWorkspacesConstants
,LogEnabled
,SolrWebFieldNames
,Component
,Serviceable
public class SolrProjectResourceIndexer extends AbstractLogEnabled implements Component, Serviceable, SolrWorkspacesConstants
Component responsible for indexing a project resource (document)
-
-
Field Summary
Fields Modifier and Type Field Description protected SolrClientProvider
_solrClientProvider
The Solr client providerprotected SolrIndexer
_solrIndexer
Solr indexerprotected SolrResourceIndexer
_solrResourceIndexer
Solr resource indexerstatic String
ROLE
The avalon role.-
Fields inherited from interface org.ametys.cms.content.indexing.solr.SolrFieldNames
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, 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_MIME_TYPE_GROUP, 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
-
Fields inherited from interface org.ametys.web.indexing.solr.SolrWebFieldNames
ATTACHMENT_PAGE_ID, CONTENT_IDS, CONTENT_INTERESTING_DATES, DATE_FOR_SORTING, DATES_FACET, FACETABLE_CONTENT_FIELD_PREFIX, LASTNAME_FOR_SORTING, ORPHAN, PAGE_ANCESTOR_IDS, PAGE_CONTENT_TYPES, PAGE_DEPTH, PAGE_IDS, PAGE_LONG_TITLE, PAGE_OUTGOING_REFEERENCES_RESOURCE_IDS, PAGE_PARENT_ID, PAGE_TITLE, PAGE_TYPE, PAGE_VISIBLE_ATTACHMENT_RESOURCE_IDS, PRIVACY, SECTION_PAGE_TITLE, SERVICE_IDS, SHARED, SITE_NAME, SITE_TYPE, SITEMAP_NAME, TEMPLATE, TYPE_PAGE, TYPE_PAGE_RESOURCE
-
Fields inherited from interface org.ametys.plugins.workspaces.indexing.solr.SolrWorkspacesConstants
KEYWORDS, PROJECT_ID, TYPE_PROJECT_RESOURCE
-
-
Constructor Summary
Constructors Constructor Description SolrProjectResourceIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_indexProjectResource(Resource resource, Project project, org.apache.solr.client.solrj.SolrClient solrClient)
private void
_indexProjectResource(Resource resource, org.apache.solr.common.SolrInputDocument document, Project project)
private void
_indexResourceSolrDocument(Resource resource, org.apache.solr.common.SolrInputDocument document, org.apache.solr.client.solrj.SolrClient solrClient)
void
indexProjectResource(Resource resource, Project project, String workspaceName)
Index a project resourcevoid
indexProjectResources(ResourceCollection collection, Project project, String workspaceName)
Index the children project resources of the given resource collectionvoid
indexProjectResources(ResourceCollection collection, Project project, org.apache.solr.client.solrj.SolrClient solrClient)
Index the children project resources of the given resource collectionvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_solrClientProvider
protected SolrClientProvider _solrClientProvider
The Solr client provider
-
_solrResourceIndexer
protected SolrResourceIndexer _solrResourceIndexer
Solr resource indexer
-
_solrIndexer
protected SolrIndexer _solrIndexer
Solr indexer
-
-
Constructor Detail
-
SolrProjectResourceIndexer
public SolrProjectResourceIndexer()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
indexProjectResources
public void indexProjectResources(ResourceCollection collection, Project project, String workspaceName) throws Exception
Index the children project resources of the given resource collection- Parameters:
collection
- The collection of project resourcesproject
- The project whose resources are attachedworkspaceName
- The workspace name- Throws:
Exception
- if an error occurs when processing the indexation of the project resources
-
indexProjectResources
public void indexProjectResources(ResourceCollection collection, Project project, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
Index the children project resources of the given resource collection- Parameters:
collection
- The collection of project resourcesproject
- The project whose resources are attachedsolrClient
- The solr client to use- Throws:
Exception
- if an error occurs when processing the indexation of the project resources
-
indexProjectResource
public void indexProjectResource(Resource resource, Project project, String workspaceName) throws Exception
Index a project resource- Parameters:
resource
- The project resource (document)project
- The project whose the resource is attachedworkspaceName
- The workspace name- Throws:
Exception
- if an error occurs when processing the indexation of the project resource
-
_indexProjectResource
private void _indexProjectResource(Resource resource, Project project, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
- Throws:
Exception
-
_indexProjectResource
private void _indexProjectResource(Resource resource, org.apache.solr.common.SolrInputDocument document, Project project) throws Exception
- Throws:
Exception
-
_indexResourceSolrDocument
private void _indexResourceSolrDocument(Resource resource, org.apache.solr.common.SolrInputDocument document, org.apache.solr.client.solrj.SolrClient solrClient) throws org.apache.solr.client.solrj.SolrServerException, IOException
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
-
-