public class SearchJcrContainer extends FlatJcrContainer
mgnl:folder
nodes if the latter are defined as "searchable".AbstractContainer.ItemSetChangeEvent, AbstractContainer.PropertySetChangeEvent
com.vaadin.v7.data.Container.Indexed.ItemAddEvent, com.vaadin.v7.data.Container.Indexed.ItemRemoveEvent
com.vaadin.v7.data.Container.Editor, com.vaadin.v7.data.Container.Filter, com.vaadin.v7.data.Container.Filterable, com.vaadin.v7.data.Container.Hierarchical, com.vaadin.v7.data.Container.Indexed, com.vaadin.v7.data.Container.ItemSetChangeEvent, com.vaadin.v7.data.Container.ItemSetChangeListener, com.vaadin.v7.data.Container.ItemSetChangeNotifier, com.vaadin.v7.data.Container.Ordered, com.vaadin.v7.data.Container.PropertySetChangeEvent, com.vaadin.v7.data.Container.PropertySetChangeListener, com.vaadin.v7.data.Container.PropertySetChangeNotifier, com.vaadin.v7.data.Container.SimpleFilterable, com.vaadin.v7.data.Container.Sortable, com.vaadin.v7.data.Container.Viewer
Modifier and Type | Field and Description |
---|---|
protected static String |
CONTAINS_TEMPLATE_FOR_SEARCH |
protected static String |
JCR_IS_SAME_NODE_FUNCTION |
protected static String |
JCR_SCORE_FUNCTION |
protected static String |
WHERE_TEMPLATE_FOR_SEARCH |
ASCENDING_KEYWORD, DEFAULT_CACHE_RATIO, DEFAULT_NODE_TYPE, DEFAULT_PAGE_LENGTH, DESCENDING_KEYWORD, JCR_NAME_FUNCTION, ORDER_BY, PROPERTY_NAME_AND_UUID_SEPARATOR, SELECT_TEMPLATE, SELECTOR_NAME, sorters, WHERE_TEMPLATE_FOR_PATH
Constructor and Description |
---|
SearchJcrContainer(JcrContentConnectorDefinition definition) |
Modifier and Type | Method and Description |
---|---|
protected OrderBy |
getDefaultOrderBy(String property) |
String |
getFullTextExpression() |
protected String |
getJcrNameOrderByFunction() |
protected String |
getQueryWhereClause()
Overrides its default implementation to take further constraints from
getQueryWhereClauseSearch() into account. |
protected String |
getQueryWhereClauseNodeTypes() |
protected String |
getQueryWhereClauseSearch()
Builds a string representing the constraints to be applied for this search.
|
void |
setFullTextExpression(String fullTextExpression) |
addItem, addItem, addItemAfter, addItemAfter, addItemAt, addItemAt, addItemSetChangeListener, addListener, addSortableProperty, clearItemIndexes, constructJCRQuery, containsId, ensureItemIndices, executeQuery, findSearchableNodeTypes, fireItemSetChange, fireItemSetChange, firstItemId, getCacheRatio, getConfiguration, getContainerProperty, getCurrentOffset, getIdByIndex, getItem, getItemIds, getItemIds, getItemIndexes, getJcrItem, getMainNodeType, getPage, getPageLength, getQuerySelectStatement, getQueryWhereClauseWorkspacePath, getSearchableNodeTypes, getSortableContainerPropertyIds, getWorkspace, handleRepositoryException, indexOfId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId, refresh, removeAllItems, removeItem, removeItemSetChangeListener, removeListener, resetOffset, setCacheRatio, setPageLength, setSize, size, sort, updateSize
addContainerProperty, getContainerPropertyIds, getType, removeContainerProperty
protected static final String WHERE_TEMPLATE_FOR_SEARCH
protected static final String CONTAINS_TEMPLATE_FOR_SEARCH
protected static final String JCR_SCORE_FUNCTION
protected static final String JCR_IS_SAME_NODE_FUNCTION
public SearchJcrContainer(JcrContentConnectorDefinition definition)
protected String getQueryWhereClause()
getQueryWhereClauseSearch()
into account.getQueryWhereClause
in class AbstractJcrContainer
AbstractJcrContainer.getQueryWhereClauseNodeTypes()
,
AbstractJcrContainer.getQueryWhereClauseWorkspacePath()
protected String getQueryWhereClauseNodeTypes()
getQueryWhereClauseNodeTypes
in class AbstractJcrContainer
hideInList
property is true or the node is of type mgnl:folder
(custom implementations of this method may still decide to display folders). Assuming a node types declaration like the following
... + workbench + nodeTypes + foo * name = nt:foo + bar * name = nt:bar * hideInList = true + baz (a mixin type) * name = nt:baz ...this method will return the following string
[jcr:primaryType] = 'nt:foo' or [jcr:mixinTypes] = 'baz'
. This will eventually be used to restrict the node types to be displayed in list views and searched for
in search views, i.e. select * from [nt:base] where ([jcr:primaryType] = 'nt:foo' or [jcr:mixinTypes] = 'baz')
.AbstractJcrContainer.findSearchableNodeTypes()
protected String getQueryWhereClauseSearch()
getQueryWhereClause()
to augment the WHERE clause for this query.
If the given search query string is absolute path (any given string starting with "/"), it adds searching by absolute path, otherwise it basically adds constraints on node names, property names and full-text search on all searchable
properties, i.e. those not excluded by Magnolia/JackRabbit's indexing configuration.
See /magnolia-core/src/main/resources/info/magnolia/jackrabbit/indexing_configuration.xml
public void setFullTextExpression(String fullTextExpression)
public String getFullTextExpression()
protected String getJcrNameOrderByFunction()
getJcrNameOrderByFunction
in class AbstractJcrContainer
AbstractJcrContainer.JCR_NAME_FUNCTION
.protected OrderBy getDefaultOrderBy(String property)
getDefaultOrderBy
in class AbstractJcrContainer
OrderBy
object for the passed in property to be used for the default order by clause.Copyright © 2019 Magnolia International Ltd.. All rights reserved.