Interface ClassFeatureGroupAssignmentService
- All Known Implementing Classes:
DefaultClassFeatureGroupAssignmentService
public interface ClassFeatureGroupAssignmentService
Service for
ClassFeatureGroupAssignmentModel. Manages searching, creating and removing of the
ClassFeatureGroupAssignmentModel.-
Method Summary
Modifier and TypeMethodDescriptioncreateClassFeatureGroupAssignment(ClassAttributeAssignmentModel classAttributeAssignmentModel, ClassificationClassModel classificationClass) CreatesClassFeatureGroupAssignmentModelwithout saving it in database.voidcreateGroupAssignmentsForCategory(InterceptorContext ctx, ClassificationClassModel classificationClass, ClassAttributeAssignmentModel classAttributeAssignmentModel) CreatesClassFeatureGroupAssignmentModelfor given ClassificationClass and ClassAttributeAssignmentvoidcreateGroupAssignmentsForSubcategories(InterceptorContext ctx, ClassAttributeAssignmentModel classAttributeAssignmentModel) CreatesClassFeatureGroupAssignmentModelfor all subcategories of ClassificationClass of given ClassAttributeAssignmentvoidcreateLackingFeatureGroupAssignments(InterceptorContext ctx, ClassificationClassModel classificationClass, ClassAttributeAssignmentModel classAttributeAssignment) CreatesClassFeatureGroupAssignmentModels for given classAttributeAssignment for given classificationClass and all its subcategories.Finds allClassFeatureGroupAssignmentModels from database.findAllFeatureGroupAssignments(ClassAttributeAssignmentModel classAttributeAssignment) FindsClassFeatureGroupAssignmentModels which is connected with givenClassAttributeAssignmentModelfindFeatureGroupAssignment(ClassAttributeAssignmentModel classAttributeAssignment, ClassificationClassModel classificationClass) FindsClassFeatureGroupAssignmentModelwhich is defined by given parameters.findUnassignedSupercategories(ClassificationClassModel classificationClassModel) Find all unassigned supercategories from given classificationClassbooleanisInstanceOfClassificationClass(ClassificationClassModel classificationClass) Check if given ClassificationClass is instance ofClassificationClassModel.voidremoveAllFeatureGroupAssignments(InterceptorContext ctx, ClassificationAttributeModel removedClassificationAttribute) Removes allClassFeatureGroupAssignmentModels connected with givenClassificationAttributeModel.voidremoveAllFeatureGroupAssignments(InterceptorContext ctx, List<ClassAttributeAssignmentModel> removedAttributesAssignments) Removes allClassFeatureGroupAssignmentModels connected with givenClassAttributeAssignmentModels.voidremoveFeatureGroupAssignments(InterceptorContext ctx, ClassificationClassModel classificationClassModel) Removes allClassFeatureGroupAssignmentModels connected with removedClassAttributeAssignmentModels in given classification class and its supercategories.voidremoveFeatureGroupAssignmentsInCategory(InterceptorContext ctx, ClassificationClassModel classificationClass, List<ClassAttributeAssignmentModel> classificationAttributeAssignments) RemovesClassFeatureGroupAssignmentModels from given ClassificationClass.voidremoveFeatureGroupAssignmentsInSubCategories(InterceptorContext ctx, ClassificationClassModel classificationClassModel, List<ClassAttributeAssignmentModel> classAttributeAssignments) RemovesClassFeatureGroupAssignmentModels from supercategories of given ClassificationClass.
-
Method Details
-
createClassFeatureGroupAssignment
ClassFeatureGroupAssignmentModel createClassFeatureGroupAssignment(ClassAttributeAssignmentModel classAttributeAssignmentModel, ClassificationClassModel classificationClass) CreatesClassFeatureGroupAssignmentModelwithout saving it in database.- Parameters:
classAttributeAssignmentModel- setsClassAttributeAssignmentModelin the model.classificationClass- setsClassificationClassModelin the model.- Returns:
- created, not saved instance of
ClassFeatureGroupAssignmentModel.
-
findFeatureGroupAssignment
Optional<ClassFeatureGroupAssignmentModel> findFeatureGroupAssignment(ClassAttributeAssignmentModel classAttributeAssignment, ClassificationClassModel classificationClass) FindsClassFeatureGroupAssignmentModelwhich is defined by given parameters.- Parameters:
classAttributeAssignment-ClassAttributeAssignmentModelproperty ofClassFeatureGroupAssignmentModelclassificationClass-ClassificationClassModelproperty ofClassFeatureGroupAssignmentModel- Returns:
- unique
ClassFeatureGroupAssignmentModeldefined by given parameters or empty Optional if model not found
-
findAllFeatureGroupAssignments
Collection<ClassFeatureGroupAssignmentModel> findAllFeatureGroupAssignments(ClassAttributeAssignmentModel classAttributeAssignment) FindsClassFeatureGroupAssignmentModels which is connected with givenClassAttributeAssignmentModel- Parameters:
classAttributeAssignment-ClassAttributeAssignmentModelproperty ofClassFeatureGroupAssignmentModel- Returns:
- List of
ClassFeatureGroupAssignmentModeldefined by given parameters
-
findAllFeatureGroupAssignments
List<ClassFeatureGroupAssignmentModel> findAllFeatureGroupAssignments()Finds allClassFeatureGroupAssignmentModels from database.- Returns:
- List of all
ClassFeatureGroupAssignmentModel.
-
createLackingFeatureGroupAssignments
void createLackingFeatureGroupAssignments(InterceptorContext ctx, ClassificationClassModel classificationClass, ClassAttributeAssignmentModel classAttributeAssignment) CreatesClassFeatureGroupAssignmentModels for given classAttributeAssignment for given classificationClass and all its subcategories.- Parameters:
classificationClass- model of editingClassificationClassModelctx- context of interceptor for further actionsclassAttributeAssignment-ClassAttributeAssignmentModelfor creating newClassFeatureGroupAssignmentModel
-
removeAllFeatureGroupAssignments
void removeAllFeatureGroupAssignments(InterceptorContext ctx, ClassificationAttributeModel removedClassificationAttribute) Removes allClassFeatureGroupAssignmentModels connected with givenClassificationAttributeModel.- Parameters:
ctx- context of interceptor for further actionsremovedClassificationAttribute- removedClassificationAttributeModel
-
removeAllFeatureGroupAssignments
void removeAllFeatureGroupAssignments(InterceptorContext ctx, List<ClassAttributeAssignmentModel> removedAttributesAssignments) Removes allClassFeatureGroupAssignmentModels connected with givenClassAttributeAssignmentModels.- Parameters:
ctx- context of interceptor for further actionsremovedAttributesAssignments- list of removedClassAttributeAssignmentModels
-
findUnassignedSupercategories
List<ClassificationClassModel> findUnassignedSupercategories(ClassificationClassModel classificationClassModel) Find all unassigned supercategories from given classificationClass- Parameters:
classificationClassModel- model of editingClassificationClassModel- Returns:
- all unassigned supercategories from given classificationClass
-
removeFeatureGroupAssignments
void removeFeatureGroupAssignments(InterceptorContext ctx, ClassificationClassModel classificationClassModel) Removes allClassFeatureGroupAssignmentModels connected with removedClassAttributeAssignmentModels in given classification class and its supercategories. Please use this method during removingClassAttributeAssignmentModels from given classificationClass.- Parameters:
classificationClassModel- model of editingClassificationClassModelctx- context of interceptor for further actions
-
removeFeatureGroupAssignmentsInSubCategories
void removeFeatureGroupAssignmentsInSubCategories(InterceptorContext ctx, ClassificationClassModel classificationClassModel, List<ClassAttributeAssignmentModel> classAttributeAssignments) RemovesClassFeatureGroupAssignmentModels from supercategories of given ClassificationClass. Method doesn't removeClassFeatureGroupAssignmentModels which are connected with inheritedClassAttributeAssignmentModels from another supercategories.- Parameters:
classificationClassModel- model of editingClassificationClassModelctx- context of interceptor for further actionsclassAttributeAssignments- list of existingClassAttributeAssignmentModels
-
removeFeatureGroupAssignmentsInCategory
void removeFeatureGroupAssignmentsInCategory(InterceptorContext ctx, ClassificationClassModel classificationClass, List<ClassAttributeAssignmentModel> classificationAttributeAssignments) RemovesClassFeatureGroupAssignmentModels from given ClassificationClass. Method doesn't removeClassFeatureGroupAssignmentModels which are connected with inheritedClassAttributeAssignmentModels from another supercategories.- Parameters:
ctx- context of interceptor for further actionsclassificationAttributeAssignments- list of existingClassAttributeAssignmentModelsclassificationClass- model of editingClassificationClassModel
-
createGroupAssignmentsForSubcategories
void createGroupAssignmentsForSubcategories(InterceptorContext ctx, ClassAttributeAssignmentModel classAttributeAssignmentModel) CreatesClassFeatureGroupAssignmentModelfor all subcategories of ClassificationClass of given ClassAttributeAssignment- Parameters:
ctx- context of interceptor for further actionsclassAttributeAssignmentModel-ClassAttributeAssignmentModelfor creating newClassFeatureGroupAssignmentModel
-
createGroupAssignmentsForCategory
void createGroupAssignmentsForCategory(InterceptorContext ctx, ClassificationClassModel classificationClass, ClassAttributeAssignmentModel classAttributeAssignmentModel) CreatesClassFeatureGroupAssignmentModelfor given ClassificationClass and ClassAttributeAssignment- Parameters:
ctx- context of interceptor for further actionsclassificationClass-ClassificationClassModelfor creating newClassFeatureGroupAssignmentModelclassAttributeAssignmentModel-ClassAttributeAssignmentModelfor creating newClassFeatureGroupAssignmentModel
-
isInstanceOfClassificationClass
Check if given ClassificationClass is instance ofClassificationClassModel.- Parameters:
classificationClass-ClassificationClassModelto check class instance.- Returns:
- true if given ClassificationClass is instance of
ClassificationClassModel. Return false if given ClassificationClass is instance of inherited class type (e.gde.hybris.platform.core.model.FlexibleTypeClassModel
-