Class ValidationMessagesImpl

java.lang.Object
org.zkoss.bind.impl.ValidationMessagesImpl
All Implemented Interfaces:
Serializable, Iterable<Object>, Collection<Object>, ValidationMessages

public class ValidationMessagesImpl extends Object implements ValidationMessages, Collection<Object>, Serializable
Collection base implementation of ValidationMessages
Since:
6.0.0
Author:
dennis
See Also:
  • Constructor Details

    • ValidationMessagesImpl

      public ValidationMessagesImpl()
  • Method Details

    • clearMessages

      public void clearMessages(org.zkoss.zk.ui.Component comp)
      Description copied from interface: ValidationMessages
      clear validation message of component
      Specified by:
      clearMessages in interface ValidationMessages
    • clearMessages

      public void clearMessages(org.zkoss.zk.ui.Component comp, String attr)
      Description copied from interface: ValidationMessages
      clear validation message of component
      Specified by:
      clearMessages in interface ValidationMessages
    • clearKeyMessages

      public void clearKeyMessages(org.zkoss.zk.ui.Component comp, String key)
      Description copied from interface: ValidationMessages
      clear validation message of component and a special message key
      Specified by:
      clearKeyMessages in interface ValidationMessages
    • clearKeyMessages

      public void clearKeyMessages(String key)
      Description copied from interface: ValidationMessages
      clear validation message of a special message key
      Specified by:
      clearKeyMessages in interface ValidationMessages
    • clearAllMessages

      public void clearAllMessages()
      Description copied from interface: ValidationMessages
      clear all validation message
      Specified by:
      clearAllMessages in interface ValidationMessages
    • getMessages

      public String[] getMessages(org.zkoss.zk.ui.Component comp, String attr)
      Description copied from interface: ValidationMessages
      get validation messages of a component and special attribute
      Specified by:
      getMessages in interface ValidationMessages
      Returns:
      messages. Always not null. Empty if no message in component and attribute
    • getMessages

      public String[] getMessages(org.zkoss.zk.ui.Component comp)
      Description copied from interface: ValidationMessages
      get validation messages of a component
      Specified by:
      getMessages in interface ValidationMessages
      Returns:
      messages. Always not null. Empty if no message of component
    • getMessages

      public String[] getMessages()
      Description copied from interface: ValidationMessages
      get all validation messages
      Specified by:
      getMessages in interface ValidationMessages
      Returns:
      messages. Always not null. Empty if no messages
    • getKeyMessages

      public String[] getKeyMessages(org.zkoss.zk.ui.Component comp, String key)
      Description copied from interface: ValidationMessages
      get validation message of component and a special key
      Specified by:
      getKeyMessages in interface ValidationMessages
      Returns:
      messages. Always not null. Empty if no message of key
    • getKeyMessages

      public String[] getKeyMessages(String key)
      Description copied from interface: ValidationMessages
      get validation message of a special key
      Specified by:
      getKeyMessages in interface ValidationMessages
      Returns:
      messages. Always not null. Empty if no message of key
    • setMessages

      public void setMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages)
      Description copied from interface: ValidationMessages
      set validation messages to component, it will replace previous messages
      Specified by:
      setMessages in interface ValidationMessages
      Parameters:
      comp - the component refers to the messages
      attr - the attr refers to the messages
      key - the custom key refers to this messages, nullable
      messages - the messages
    • setMessages

      public void setMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value)
      Description copied from interface: ValidationMessages
      set validation messages to component, it will replace previous messages
      Specified by:
      setMessages in interface ValidationMessages
      Parameters:
      comp - the component refers to the messages
      attr - the attr refers to the messages
      key - the custom key refers to this messages, nullable
      messages - the messages
      value - the rejected value
    • addMessages

      public void addMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages)
      Description copied from interface: ValidationMessages
      add validation messages to component
      Specified by:
      addMessages in interface ValidationMessages
      Parameters:
      comp - the component refers to the messages
      attr - the attr refers to the messages
      key - the custom key refers to this messages, nullable
      messages - the messages
    • addMessages

      public void addMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value)
      Description copied from interface: ValidationMessages
      add validation messages to component
      Specified by:
      addMessages in interface ValidationMessages
      Parameters:
      comp - the component refers to the messages
      attr - the attr refers to the messages
      key - the custom key refers to this messages, nullable
      messages - the messages
      value - the rejected value
    • getFieldValue

      public Object getFieldValue(String key)
      Description copied from interface: ValidationMessages
      Returns the first field value from the given key, if any.
      Specified by:
      getFieldValue in interface ValidationMessages
      Parameters:
      key - the custom key refers to this messages, nullable
      Returns:
      value. Nullable.
    • getFieldValue

      public Object getFieldValue(org.zkoss.zk.ui.Component comp, String key)
      Description copied from interface: ValidationMessages
      Returns the first field value from the given key and component, if any.
      Specified by:
      getFieldValue in interface ValidationMessages
      Parameters:
      comp - the component refers to the value
      key - the custom key refers to this value, nullable
      Returns:
      value. Nullable.
    • getFieldValues

      public Object[] getFieldValues(String key)
      Description copied from interface: ValidationMessages
      Returns all field values from the given key, if any.
      Specified by:
      getFieldValues in interface ValidationMessages
      Parameters:
      key - the custom key refers to this messages, nullable
      Returns:
      values. Always not null.
    • getFieldValues

      public Object[] getFieldValues(org.zkoss.zk.ui.Component comp, String key)
      Description copied from interface: ValidationMessages
      Returns all field values from the given key and component, if any.
      Specified by:
      getFieldValues in interface ValidationMessages
      Parameters:
      comp - the component refers to the value
      key - the custom key refers to this value, nullable
      Returns:
      values. Always not null.
    • getAssociate

      public org.zkoss.zk.ui.Component getAssociate(String key)
      Description copied from interface: ValidationMessages
      Returns the first associated component from the given key, if any.
      Specified by:
      getAssociate in interface ValidationMessages
      Parameters:
      key - the custom key refers to this messages, nullable
      Returns:
      component. Nullable.
    • getAssociates

      public org.zkoss.zk.ui.Component[] getAssociates(String key)
      Description copied from interface: ValidationMessages
      Returns all associated components from the given key, if any.
      Specified by:
      getAssociates in interface ValidationMessages
      Parameters:
      key - the custom key refers to this messages, nullable
      Returns:
      components. Always not null.
    • size

      public int size()
      Specified by:
      size in interface Collection<Object>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Object>
    • contains

      public boolean contains(Object o)
      Specified by:
      contains in interface Collection<Object>
    • iterator

      public Iterator<Object> iterator()
      Specified by:
      iterator in interface Collection<Object>
      Specified by:
      iterator in interface Iterable<Object>
    • toArray

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<Object>
    • toArray

      public <T> T[] toArray(T[] a)
      Specified by:
      toArray in interface Collection<Object>
    • add

      public boolean add(Object e)
      Specified by:
      add in interface Collection<Object>
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<Object>
    • containsAll

      public boolean containsAll(Collection<?> c)
      Specified by:
      containsAll in interface Collection<Object>
    • addAll

      public boolean addAll(Collection<? extends Object> c)
      Specified by:
      addAll in interface Collection<Object>
    • removeAll

      public boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<Object>
    • retainAll

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Object>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<Object>