public class ComposedValidationFailure extends AbstractValidationFailure implements Iterable<ValidationFailure>
ValidationFailure
that represents the composition of other
ValidationFailure
s.Modifier and Type | Field and Description |
---|---|
static String |
CODE |
private ValidationFailure[] |
failures |
private static long |
serialVersionUID |
TYPE_INFORMATION, TYPE_TECHNICAL_ERROR, TYPE_USER_ERROR, TYPE_VALIDATION_FAILURE, TYPE_WARNING
Modifier | Constructor and Description |
---|---|
protected |
ComposedValidationFailure()
The constructor for de-serialization in GWT.
|
|
ComposedValidationFailure(Object source,
ValidationFailure[] failures)
The constructor.
|
|
ComposedValidationFailure(String code,
Object source,
ValidationFailure[] failures)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDetails()
This method gets optional details for this message.
|
ValidationFailure |
getFailure(int index)
Gets the
ValidationFailure at the given index . |
int |
getFailureCount() |
String |
getMessage(Locale locale)
|
protected String |
getSeparator() |
Iterator<ValidationFailure> |
iterator() |
getType
getCode, getMessage, getSource, getUuid, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
getCode, getMessage, getSource
public static final String CODE
AbstractMessage.getCode()
,
Constant Field Valuesprivate static final long serialVersionUID
private ValidationFailure[] failures
protected ComposedValidationFailure()
public ComposedValidationFailure(Object source, ValidationFailure[] failures)
source
- is the source
.failures
- are the individual ValidationFailure
s.public ComposedValidationFailure(String code, Object source, ValidationFailure[] failures)
code
- is the code
.source
- is the source
.failures
- are the individual ValidationFailure
s.protected String getSeparator()
StringUtil.LINE_SEPARATOR_LF
).public Iterator<ValidationFailure> iterator()
iterator
in interface Iterable<ValidationFailure>
public int getFailureCount()
failures
.getFailure(int)
,
Collection.size()
public ValidationFailure getFailure(int index)
ValidationFailure
at the given index
.index
- is the index of the ValidationFailure
to get.ValidationFailure
.List.get(int)
public String getDetails()
Message
getDetails
in interface Message
getDetails
in class AbstractMessage
null
if no additional details are available.public String getMessage(Locale locale)
Message
message
localized for the given Locale
. NLS
. On client side
(e.g. for GWT clients) only a single locale may be supported at a time and this method may behave like
AttributeReadMessage.getMessage()
ignoring the Locale
.getMessage
in interface Message
getMessage
in interface ValidationFailure
getMessage
in class AbstractMessage
locale
- is the Locale
.Copyright © 2001–2016 mmm-Team. All rights reserved.