Package org.zkoss.bind.impl
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Object> c) voidaddMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages) add validation messages to componentvoidaddMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value) add validation messages to componentvoidclear()voidclear all validation messagevoidclearKeyMessages(String key) clear validation message of a special message keyvoidclearKeyMessages(org.zkoss.zk.ui.Component comp, String key) clear validation message of component and a special message keyvoidclearMessages(org.zkoss.zk.ui.Component comp) clear validation message of componentvoidclearMessages(org.zkoss.zk.ui.Component comp, String attr) clear validation message of componentbooleanbooleancontainsAll(Collection<?> c) org.zkoss.zk.ui.ComponentgetAssociate(String key) Returns the first associated component from the given key, if any.org.zkoss.zk.ui.Component[]getAssociates(String key) Returns all associated components from the given key, if any.getFieldValue(String key) Returns the first field value from the given key, if any.getFieldValue(org.zkoss.zk.ui.Component comp, String key) Returns the first field value from the given key and component, if any.Object[]getFieldValues(String key) Returns all field values from the given key, if any.Object[]getFieldValues(org.zkoss.zk.ui.Component comp, String key) Returns all field values from the given key and component, if any.String[]getKeyMessages(String key) get validation message of a special keyString[]getKeyMessages(org.zkoss.zk.ui.Component comp, String key) get validation message of component and a special keyString[]get all validation messagesString[]getMessages(org.zkoss.zk.ui.Component comp) get validation messages of a componentString[]getMessages(org.zkoss.zk.ui.Component comp, String attr) get validation messages of a component and special attributebooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) voidsetMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages) set validation messages to component, it will replace previous messagesvoidsetMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value) set validation messages to component, it will replace previous messagesintsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ValidationMessagesImpl
public ValidationMessagesImpl()
-
-
Method Details
-
clearMessages
public void clearMessages(org.zkoss.zk.ui.Component comp) Description copied from interface:ValidationMessagesclear validation message of component- Specified by:
clearMessagesin interfaceValidationMessages
-
clearMessages
Description copied from interface:ValidationMessagesclear validation message of component- Specified by:
clearMessagesin interfaceValidationMessages
-
clearKeyMessages
Description copied from interface:ValidationMessagesclear validation message of component and a special message key- Specified by:
clearKeyMessagesin interfaceValidationMessages
-
clearKeyMessages
Description copied from interface:ValidationMessagesclear validation message of a special message key- Specified by:
clearKeyMessagesin interfaceValidationMessages
-
clearAllMessages
public void clearAllMessages()Description copied from interface:ValidationMessagesclear all validation message- Specified by:
clearAllMessagesin interfaceValidationMessages
-
getMessages
Description copied from interface:ValidationMessagesget validation messages of a component and special attribute- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message in component and attribute
-
getMessages
Description copied from interface:ValidationMessagesget validation messages of a component- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of component
-
getMessages
Description copied from interface:ValidationMessagesget all validation messages- Specified by:
getMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no messages
-
getKeyMessages
Description copied from interface:ValidationMessagesget validation message of component and a special key- Specified by:
getKeyMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of key
-
getKeyMessages
Description copied from interface:ValidationMessagesget validation message of a special key- Specified by:
getKeyMessagesin interfaceValidationMessages- Returns:
- messages. Always not null. Empty if no message of key
-
setMessages
Description copied from interface:ValidationMessagesset validation messages to component, it will replace previous messages- Specified by:
setMessagesin interfaceValidationMessages- Parameters:
comp- the component refers to the messagesattr- the attr refers to the messageskey- the custom key refers to this messages, nullablemessages- the messages
-
setMessages
public void setMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value) Description copied from interface:ValidationMessagesset validation messages to component, it will replace previous messages- Specified by:
setMessagesin interfaceValidationMessages- Parameters:
comp- the component refers to the messagesattr- the attr refers to the messageskey- the custom key refers to this messages, nullablemessages- the messagesvalue- the rejected value
-
addMessages
Description copied from interface:ValidationMessagesadd validation messages to component- Specified by:
addMessagesin interfaceValidationMessages- Parameters:
comp- the component refers to the messagesattr- the attr refers to the messageskey- the custom key refers to this messages, nullablemessages- the messages
-
addMessages
public void addMessages(org.zkoss.zk.ui.Component comp, String attr, String key, String[] messages, Object value) Description copied from interface:ValidationMessagesadd validation messages to component- Specified by:
addMessagesin interfaceValidationMessages- Parameters:
comp- the component refers to the messagesattr- the attr refers to the messageskey- the custom key refers to this messages, nullablemessages- the messagesvalue- the rejected value
-
getFieldValue
Description copied from interface:ValidationMessagesReturns the first field value from the given key, if any.- Specified by:
getFieldValuein interfaceValidationMessages- Parameters:
key- the custom key refers to this messages, nullable- Returns:
- value. Nullable.
-
getFieldValue
Description copied from interface:ValidationMessagesReturns the first field value from the given key and component, if any.- Specified by:
getFieldValuein interfaceValidationMessages- Parameters:
comp- the component refers to the valuekey- the custom key refers to this value, nullable- Returns:
- value. Nullable.
-
getFieldValues
Description copied from interface:ValidationMessagesReturns all field values from the given key, if any.- Specified by:
getFieldValuesin interfaceValidationMessages- Parameters:
key- the custom key refers to this messages, nullable- Returns:
- values. Always not null.
-
getFieldValues
Description copied from interface:ValidationMessagesReturns all field values from the given key and component, if any.- Specified by:
getFieldValuesin interfaceValidationMessages- Parameters:
comp- the component refers to the valuekey- the custom key refers to this value, nullable- Returns:
- values. Always not null.
-
getAssociate
Description copied from interface:ValidationMessagesReturns the first associated component from the given key, if any.- Specified by:
getAssociatein interfaceValidationMessages- Parameters:
key- the custom key refers to this messages, nullable- Returns:
- component. Nullable.
-
getAssociates
Description copied from interface:ValidationMessagesReturns all associated components from the given key, if any.- Specified by:
getAssociatesin interfaceValidationMessages- Parameters:
key- the custom key refers to this messages, nullable- Returns:
- components. Always not null.
-
size
public int size()- Specified by:
sizein interfaceCollection<Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Object>
-
contains
- Specified by:
containsin interfaceCollection<Object>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<Object>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Object>
-
add
- Specified by:
addin interfaceCollection<Object>
-
remove
- Specified by:
removein interfaceCollection<Object>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Object>
-
addAll
- Specified by:
addAllin interfaceCollection<Object>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Object>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Object>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Object>
-