Class DefaultYFormDefinitionHelper
java.lang.Object
de.hybris.platform.xyformsservices.helpers.impl.DefaultYFormDefinitionHelper
- All Implemented Interfaces:
YFormDefinitionHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final Set<YFormDefinitionModel>collectYFormDefinitionForms(Collection<CategoryModel> categories) It gathers all theYFormDefinitionModels that assigned to the categories.getAllYFormDefinitions(CategoryModel category) Returns an ordered List ofYFormDefinitionModels that assigned to the category and its all supercategories in the Category hierarchy.getAllYFormDefinitions(Collection<CategoryModel> categories) Returns an ordered List ofYFormDefinitionModels that assigned to the categories and their all supercategories in the Category hierarchy.protected YFormDefinitionModelgetLatestVersionFormDefinition(YFormDefinitionModel yFormDefinition) Get the latest version of form definition by given form definition.protected YFormServicevoidsetYFormService(YFormService yFormService)
-
Constructor Details
-
DefaultYFormDefinitionHelper
public DefaultYFormDefinitionHelper()
-
-
Method Details
-
getAllYFormDefinitions
Returns an ordered List ofYFormDefinitionModels that assigned to the categories and their all supercategories in the Category hierarchy. EachYFormDefinitionModelis unique in the List. The order of the elements is specified by the formDefinitionComparator.- Specified by:
getAllYFormDefinitionsin interfaceYFormDefinitionHelper- Parameters:
categories-- Returns:
- an ordered List of unique
YFormDefinitionModelelements - Throws:
NullPointerException- if categories is null
-
getAllYFormDefinitions
Returns an ordered List ofYFormDefinitionModels that assigned to the category and its all supercategories in the Category hierarchy. EachYFormDefinitionModelis unique in the List. The order of the elements is specified by the formDefinitionComparator.- Specified by:
getAllYFormDefinitionsin interfaceYFormDefinitionHelper- Parameters:
category-- Returns:
- an ordered List of unique
YFormDefinitionModelelements - Throws:
NullPointerException- if category is null
-
collectYFormDefinitionForms
protected final Set<YFormDefinitionModel> collectYFormDefinitionForms(Collection<CategoryModel> categories) It gathers all theYFormDefinitionModels that assigned to the categories. The order of the elements is specified by the formDefinitionComparator.- Parameters:
categories-- Returns:
- SortedSet of YFormDefinitions if the categories have YFormDefinitions assigned to themselves, otherwise empty set
- Throws:
NullPointerException- if categories is null
-
getLatestVersionFormDefinition
Get the latest version of form definition by given form definition.- Parameters:
yFormDefinition- form definition model- Returns:
- the latest form definition model or null if no form definition find.
-
getYFormService
-
setYFormService
-