Class UpdatePageContentSlotComponentValidator
java.lang.Object
de.hybris.platform.cmsfacades.pagescontentslotscomponents.validator.UpdatePageContentSlotComponentValidator
- All Implemented Interfaces:
org.springframework.validation.Validator
public class UpdatePageContentSlotComponentValidator
extends Object
implements org.springframework.validation.Validator
Validates DTO for moving existing component in a content slot or across 2 different content slots.
Rules:
- componentId not null
- position not null
- position > 0
- pageId not null
- page exists:
PageExistsPredicate - content slotId not null
- content slot exists:
ContentSlotExistsPredicate - component exists:
ComponentExistsPredicate - component type not valid for content slot:
ComponentTypeAllowedForContentSlotPredicate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ValidationDtoFactoryvoidsetComponentExistsInCatalogVersionsPredicate(Predicate<String> componentExistsInCatalogVersionsPredicate) voidsetComponentTypeAllowedForContentSlotPredicate(Predicate<ComponentTypeAndContentSlotValidationDto> componentTypeAllowedForContentSlotPredicate) voidsetContentSlotExistsInCatalogVersionsPredicate(Predicate<String> contentSlotExistsInCatalogVersionsPredicate) voidsetPageExistsPredicate(Predicate<String> pageExistsPredicate) voidsetValidationDtoFactory(ValidationDtoFactory validationDtoFactory) booleanvoidprotected voidvalidatePageAndComponent(PageContentSlotComponentData target, org.springframework.validation.Errors errors)
-
Field Details
-
COMPONENT_ID
- See Also:
-
POSITION
- See Also:
-
PAGE_ID
- See Also:
-
SLOT_ID
- See Also:
-
-
Constructor Details
-
UpdatePageContentSlotComponentValidator
public UpdatePageContentSlotComponentValidator()
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceorg.springframework.validation.Validator
-
validate
- Specified by:
validatein interfaceorg.springframework.validation.Validator
-
validatePageAndComponent
protected void validatePageAndComponent(PageContentSlotComponentData target, org.springframework.validation.Errors errors) -
getComponentExistsInCatalogVersionsPredicate
-
setComponentExistsInCatalogVersionsPredicate
-
getComponentTypeAllowedForContentSlotPredicate
protected Predicate<ComponentTypeAndContentSlotValidationDto> getComponentTypeAllowedForContentSlotPredicate() -
setComponentTypeAllowedForContentSlotPredicate
public void setComponentTypeAllowedForContentSlotPredicate(Predicate<ComponentTypeAndContentSlotValidationDto> componentTypeAllowedForContentSlotPredicate) -
getValidationDtoFactory
-
setValidationDtoFactory
-
getContentSlotExistsInCatalogVersionsPredicate
-
setContentSlotExistsInCatalogVersionsPredicate
-
getPageExistsPredicate
-
setPageExistsPredicate
-