@Name(value="docSuggestionActions") @Scope(value=PAGE) public class DocumentSuggestionActions extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Object |
cachedInput |
protected String |
cachedPageProviderName |
protected List<DocumentModel> |
cachedSuggestions |
static String |
DEFAULT_PAGE_PROVIDER_NAME |
protected CoreSession |
documentManager |
protected String |
pageProviderName |
protected Boolean |
prefixSearch
If true, '*' will be appended to the pattern to do a prefix search.
|
| Constructor and Description |
|---|
DocumentSuggestionActions() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
equals(Object item1,
Object item2) |
List<DocumentModel> |
getDocSuggestions(Object input) |
boolean |
getDocumentExistsAndIsVisibleWithId(String id) |
boolean |
getDocumentExistsAndIsVisibleWithPath(String path) |
DocumentModel |
getDocumentWithId(String id) |
DocumentModel |
getDocumentWithPath(String path) |
protected PageProvider<DocumentModel> |
getPageProvider(String pattern)
Returns suggestion documents matching given pattern.
|
public static final String DEFAULT_PAGE_PROVIDER_NAME
@In(required=true) protected transient CoreSession documentManager
@RequestParameter protected String pageProviderName
@RequestParameter protected Boolean prefixSearch
protected String cachedPageProviderName
protected Object cachedInput
protected List<DocumentModel> cachedSuggestions
public DocumentSuggestionActions()
public List<DocumentModel> getDocSuggestions(Object input)
protected PageProvider<DocumentModel> getPageProvider(String pattern)
Search is performed using the page provider referenced in the widget definition (defaults to
DEFAULT_PAGE_PROVIDER_NAME).
Since 5.7, if the page provider defines parameters, they're added to the implicit parameter (the pattern) that stays the first one to be referenced in the search query.
pattern: - the input as typed by user in suggestion boxpublic boolean getDocumentExistsAndIsVisibleWithId(String id)
public boolean getDocumentExistsAndIsVisibleWithPath(String path)
public DocumentModel getDocumentWithId(String id)
public DocumentModel getDocumentWithPath(String path)
Copyright © 2018 Nuxeo. All rights reserved.