Class DefaultYFormDefinitionHelper
- java.lang.Object
-
- de.hybris.platform.xyformsservices.helpers.impl.DefaultYFormDefinitionHelper
-
- All Implemented Interfaces:
YFormDefinitionHelper
public class DefaultYFormDefinitionHelper extends java.lang.Object implements YFormDefinitionHelper
-
-
Constructor Summary
Constructors Constructor Description DefaultYFormDefinitionHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<YFormDefinitionModel>collectYFormDefinitionForms(java.util.Collection<CategoryModel> categories)It gathers all theYFormDefinitionModels that assigned to the categories.java.util.List<YFormDefinitionModel>getAllYFormDefinitions(CategoryModel category)Returns an ordered List ofYFormDefinitionModels that assigned to the category and its all supercategories in the Category hierarchy.java.util.List<YFormDefinitionModel>getAllYFormDefinitions(java.util.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 YFormServicegetYFormService()voidsetYFormService(YFormService yFormService)
-
-
-
Method Detail
-
getAllYFormDefinitions
public java.util.List<YFormDefinitionModel> getAllYFormDefinitions(java.util.Collection<CategoryModel> categories)
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:
java.lang.NullPointerException- if categories is null
-
getAllYFormDefinitions
public java.util.List<YFormDefinitionModel> getAllYFormDefinitions(CategoryModel category)
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:
java.lang.NullPointerException- if category is null
-
collectYFormDefinitionForms
protected final java.util.Set<YFormDefinitionModel> collectYFormDefinitionForms(java.util.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:
java.lang.NullPointerException- if categories is null
-
getLatestVersionFormDefinition
protected YFormDefinitionModel getLatestVersionFormDefinition(YFormDefinitionModel yFormDefinition)
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
protected YFormService getYFormService()
-
setYFormService
public void setYFormService(YFormService yFormService)
-
-