Interface ParameterTypeBase<T>

  • All Known Implementing Classes:
    ReadOnlyAwareParameterType

    public interface ParameterTypeBase<T>
    Created by Andrey Titov on 29.02.16.
    Since:
    10.0
    • Method Detail

      • getParameterType

        java.lang.String getParameterType()
        Returns:
        Id of this ParameterType
      • getValue

        T getValue​(@NotNull
                   Parameter parameter)
        Parameters:
        parameter - Parameter to parse
        Returns:
        Parsed value
      • getValue

        T getValue​(@NotNull
                   java.lang.String value,
                   @Nullable
                   ControlDescription controlDescription)
        Parameters:
        value - Value to parse
        controlDescription - Type Spec
        Returns:
        Parsed value
      • isValid

        boolean isValid​(@NotNull
                        java.lang.String value,
                        @Nullable
                        ControlDescription controlDescription)
        Parameters:
        value - Value to check
        controlDescription - Type Spec
        Returns:
        true when this value is valid against provided Type Spec
      • isValid

        boolean isValid​(@NotNull
                        Parameter parameter)
        Parameters:
        parameter - Parameter to check
        Returns:
        true when the parameter value is valid against it`s Type Spec
      • isValid

        boolean isValid​(ControlDescription controlDescription)
        Parameters:
        controlDescription - Type Spec to validate
        Returns:
        true when the Type Spec doesn't contain errors
      • describe

        @NotNull
        java.lang.String describe​(@NotNull
                                  ControlDescription controlDescription)
      • validate

        @Nullable
        java.lang.String validate​(@NotNull
                                  java.lang.String value,
                                  @Nullable
                                  ControlDescription controlDescription)
        Parameters:
        value - Value to validate
        controlDescription - Type Spec
        Returns:
        First found problem on validating value against provided Type Spec or null if the value is valid
      • validate

        @Nullable
        java.lang.String validate​(@NotNull
                                  ControlDescription controlDescription)
        Parameters:
        controlDescription - Type Spec to validate
        Returns:
        First found problem on validating Type Spec or null if the Type Spec is valid
      • toString

        java.lang.String toString​(T value)
      • validate

        java.lang.String validate​(T value,
                                  @Nullable
                                  ControlDescription controlDescription)
      • isSecureParameter

        boolean isSecureParameter​(@NotNull
                                  ControlDescription controlDescription)
        Parameters:
        controlDescription - control description
        Returns:
        true if parameter value should be hidden from user by default
        Since:
        2017.1