public interface IViolation
Each violation has:
The violation should provide capabilities for
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(ViolationListener listener)
Adds the given listener to the list of listeners to be notified on specific events regarding the violation.
|
IConstraint |
getConstraint()
Returns the constraint for which the violation appeared.
|
java.util.Set<IEntry> |
getEntries()
Returns the entries for each pattern match witch corresponds to the violation.
|
java.util.Map<java.lang.String,java.lang.Object> |
getKeyObjects()
Returns the key objects Map of the violation, which serves as a unique key of the violation.
|
java.util.Collection<ViolationListener> |
getListeners()
Returns the listeners registered for the violation.
|
java.lang.String |
getMessage()
Returns the message of the violation generated from the format message of the constraint specification and the
key objects.
|
java.util.Set<java.lang.Object> |
getValuesOfProperty(java.lang.String propertyName)
Returns all the values from the violation's entries for the given property.
|
boolean |
removeListener(ViolationListener listener)
Removes the given listener from the list of listeners to be notified on specific events regarding the violation.
|
IConstraint getConstraint()
java.lang.String getMessage()
java.util.Map<java.lang.String,java.lang.Object> getKeyObjects()
java.util.Set<IEntry> getEntries()
java.util.Set<java.lang.Object> getValuesOfProperty(java.lang.String propertyName)
propertyName
- The property's name for which the values should be returned.java.util.Collection<ViolationListener> getListeners()
boolean addListener(ViolationListener listener)
listener
- The listener to be registered.boolean removeListener(ViolationListener listener)
listener
- The listener to be deregistered.true
if the listener was in fact registered.