Class LinkedValueAutoCompletePlugin
java.lang.Object
fr.becpg.repo.autocomplete.impl.plugins.TargetAssocAutoCompletePlugin
fr.becpg.repo.autocomplete.impl.plugins.LinkedValueAutoCompletePlugin
- All Implemented Interfaces:
AutoCompletePlugin
@Service("linkedValueAutoCompletePlugin")
@BeCPGPublicApi
public class LinkedValueAutoCompletePlugin
extends TargetAssocAutoCompletePlugin
LinkedValueAutoCompletePlugin class.
- Version:
- $Id: $Id
Autocomplete plugin to retrieve linked values ( hierachy)
Example:
Datasources: ds: becpg/autocomplete/linkedvalue/values/{path} param : {path} return hierarchy at depth level 0 control-param: {parent} return hierarchy with parent ds: becpg/autocomplete/allLinkedvalue/values/{path}?extra.depthLevel={depthLevel?}&extra.paths={paths?}&extra.list={lists?} param : {path} return all hierarchy starting at depth level path url-param: {paths} look hierachy in coma separated paths url-param: {depthLevel} specify start depth-level url-param: {list} look hierachy in spefic list in the current entity<control template="/org/alfresco/components/form/controls/autocomplete.ftl"> <control-param name="ds">becpg/autocomplete/linkedvalue/values/System/QualityLists/bcpg:entityLists/claimOrigin_Hierarchy</control-param> <control-param name="parent">qa_claimOriginHierarchy1</control-param> </control> <control template="/org/alfresco/components/form/controls/autocomplete.ftl"> <control-param name="ds">becpg/autocomplete/allLinkedvalue/values/System/ProductHierarchy/bcpg:entityLists?extra.depthLevel=1&extra.paths=finishedProduct_Hierarchy,semiFinishedProduct_Hierarchy,rawMaterialProduct_Hierarchy </control-param> </control> - Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EntityListDAOprivate HierarchyServiceprotected static final StringConstantSOURCE_TYPE_LINKED_VALUE="linkedvalue"protected static final StringConstantSOURCE_TYPE_LINKED_VALUE_ALL="allLinkedvalue"Fields inherited from class fr.becpg.repo.autocomplete.impl.plugins.TargetAssocAutoCompletePlugin
associationService, attributeExtractorService, autoNumService, CHARACT_SEARCH_TEMPLATE, DEFAULT_SEARCH_TEMPLATE, dictionaryService, entityDictionaryService, LISTVALUE_SEARCH_TEMPLATE, MIXED_SEARCH_TEMPLATE, namespaceService, nodeService, PARAM_VALUES_SEPARATOR, PERSON_SEARH_TEMPLATE, PROP_CHARAC_NAME_FORMAT, PROP_FILTER_BY_ASSOC, PROP_GET_BY_ASSOC, SOURCE_TYPE_TARGET_ASSOC, targetAssocValueExtractor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getHandleSourceTypes.suggest(String sourceType, String query, Integer pageNum, Integer pageSize, Map<String, Serializable> props) suggest.private AutoCompletePagesuggestLinkedValue(String path, String query, Integer pageNum, Integer pageSize, Map<String, Serializable> props, boolean all) Suggest linked value according to query Query path : +PATH: "/app:company_home/cm:System/cm:LinkedLists/cm:Hierarchy/cm:Hierarchy1_Hierarchy2*" +TYPE:"bcpg:LinkedValue" +@cm\:lkvPrevValue:"hierar*".Methods inherited from class fr.becpg.repo.autocomplete.impl.plugins.TargetAssocAutoCompletePlugin
excludeByClass, excludeByProp, extractEntityNodeRef, filter, filterByClass, filterByQueryFilter, getTargetAssocValueExtractor, isAllQuery, isQueryMatch, prepareQuery, suggestDatalistItem, suggestTargetAssoc
-
Field Details
-
SOURCE_TYPE_LINKED_VALUE
ConstantSOURCE_TYPE_LINKED_VALUE="linkedvalue"- See Also:
-
SOURCE_TYPE_LINKED_VALUE_ALL
ConstantSOURCE_TYPE_LINKED_VALUE_ALL="allLinkedvalue"- See Also:
-
hierarchyService
-
entityListDAO
-
-
Constructor Details
-
LinkedValueAutoCompletePlugin
public LinkedValueAutoCompletePlugin()
-
-
Method Details
-
getHandleSourceTypes
getHandleSourceTypes.
- Specified by:
getHandleSourceTypesin interfaceAutoCompletePlugin- Overrides:
getHandleSourceTypesin classTargetAssocAutoCompletePlugin- Returns:
- sourceType that the plugin handle
-
suggest
public AutoCompletePage suggest(String sourceType, String query, Integer pageNum, Integer pageSize, Map<String, Serializable> props) suggest.
- Specified by:
suggestin interfaceAutoCompletePlugin- Overrides:
suggestin classTargetAssocAutoCompletePlugin- Parameters:
sourceType- aStringobject.query- aStringobject.pageNum- aIntegerobject.pageSize- aIntegerobject.props- aMapobject.- Returns:
- Suggested values page
-
suggestLinkedValue
private AutoCompletePage suggestLinkedValue(String path, String query, Integer pageNum, Integer pageSize, Map<String, Serializable> props, boolean all) Suggest linked value according to query Query path : +PATH: "/app:company_home/cm:System/cm:LinkedLists/cm:Hierarchy/cm:Hierarchy1_Hierarchy2*" +TYPE:"bcpg:LinkedValue" +@cm\:lkvPrevValue:"hierar*".- Parameters:
path- the pathquery- the query- Returns:
- the map
-