Interface ComponentValidatorService

  • All Superinterfaces:
    io.wcm.sling.commons.caservice.ContextAwareService

    @ConsumerType
    public interface ComponentValidatorService
    extends io.wcm.sling.commons.caservice.ContextAwareService
    Allows custom validation checks for model instances. By default, the valid state of a GenericComponent is evaluated by checking for any valid property or a container component. Implementing this services allows to hook in additional custom checks, e.g. by calling a project-specific isValid() method.
    • Field Summary

      • Fields inherited from interface io.wcm.sling.commons.caservice.ContextAwareService

        PROPERTY_ACCEPTS_CONTEXT_PATH_EMPTY, PROPERTY_CONTEXT_PATH_BLACKLIST_PATTERN, PROPERTY_CONTEXT_PATH_PATTERN
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isValid​(java.lang.Object modelInstance)
      Checks of the given model instance is valid.
    • Method Detail

      • isValid

        boolean isValid​(java.lang.Object modelInstance)
        Checks of the given model instance is valid.
        Parameters:
        modelInstance - Model instance
        Returns:
        true if valid, false if invalid.