Class BaseParameterConstraint

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected RuntimeActionService actionService
      Runtime action service
      protected java.util.Map<java.lang.String,​java.lang.String> allowableValues
      Map of allowable values
      protected boolean cache
      Flag to determine whether the allowable values should be cached
      protected java.lang.String name
      Constraint name
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getAllowableValues()
      The implementers are expected to return allowed values in the insertion order.
      protected abstract java.util.Map<java.lang.String,​java.lang.String> getAllowableValuesImpl()
      Gets the list of allowable values, calculating them every time it is called.
      protected java.lang.String getI18NLabel​(java.lang.String key)
      Get the I18N display label for a particular key
      java.lang.String getName()
      Gets the unique name of the constraint
      java.lang.String getValueDisplayLabel​(java.lang.String value)  
      void init()
      Init method
      boolean isValidValue​(java.lang.String value)
      Indicates whether the provided value satisfies the constraint.
      void setActionService​(RuntimeActionService actionService)
      Set the action service
      void setBeanName​(java.lang.String name)  
      void setCacheAllowableValues​(boolean cache)
      Determines whether the allowable values should be cached, default is true.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        Constraint name
      • cache

        protected boolean cache
        Flag to determine whether the allowable values should be cached
      • allowableValues

        protected java.util.Map<java.lang.String,​java.lang.String> allowableValues
        Map of allowable values
    • Constructor Detail

      • BaseParameterConstraint

        public BaseParameterConstraint()
    • Method Detail

      • init

        public void init()
        Init method
      • setActionService

        public void setActionService​(RuntimeActionService actionService)
        Set the action service
        Parameters:
        actionService - action service
      • setCacheAllowableValues

        public void setCacheAllowableValues​(boolean cache)
        Determines whether the allowable values should be cached, default is true.
        Parameters:
        cache - boolean
      • setBeanName

        public void setBeanName​(java.lang.String name)
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
        See Also:
        BeanNameAware.setBeanName(java.lang.String)
      • getAllowableValuesImpl

        protected abstract java.util.Map<java.lang.String,​java.lang.String> getAllowableValuesImpl()
        Gets the list of allowable values, calculating them every time it is called.
        Returns:
        map of allowable values
      • getI18NLabel

        protected java.lang.String getI18NLabel​(java.lang.String key)
        Get the I18N display label for a particular key
        Parameters:
        key - String
        Returns:
        String I18N value