Interface EntityNameValidation

  • All Known Implementing Classes:
    AbstractEntityNameValidation

    @Role
    public interface EntityNameValidation
    Define a strategy to validate or transform an entity reference.
    Since:
    12.0RC1
    Version:
    $Id: 8dcc0f3031bbe9292223c21b5ed2c48025b94154 $
    • Method Detail

      • transform

        String transform​(String name)
        Transforms a name such as isValid(String) return true.
        Parameters:
        name - a name that should be transformed to be validated.
        Returns:
        a new name with some changes to make it valid. Or exactly name if it was already valid.
      • isValid

        boolean isValid​(String name)
        Validate a name against a set of rules: usually a pattern is used to validate a name.
        Parameters:
        name - the name to validate.
        Returns:
        true if it's correct according to the current policy.
      • isValid

        boolean isValid​(EntityReference entityReference)
        Validate that the given EntityReference respects the current policy.
        Parameters:
        entityReference - the entity reference to check
        Returns:
        true if the policy is respected.