|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.planetalia.dynject.validation.ErrorMessage
public class ErrorMessage
Represents a single error message notifying of an error condition during the validation/assignment process
| Constructor Summary | |
|---|---|
ErrorMessage()
Creates an empty error message |
|
ErrorMessage(java.lang.String messageKey)
Creates an error message with the specified message key |
|
ErrorMessage(java.lang.String messageKey,
java.lang.Object... params)
Creates an error message with the specified message key and message parameters |
|
ErrorMessage(java.lang.String code,
java.lang.String messageKey)
Creates an error message with a specified error code and a message key referencing some external message |
|
| Method Summary | |
|---|---|
java.lang.String |
getCode()
Returns the error code |
java.lang.Object |
getData()
Returns the data item that caused the error |
java.lang.Object |
getInstance()
Returns the instance that this message is associated to. |
java.lang.String |
getMessage()
Returns the text of the message, for literal messages |
java.lang.String |
getMessageKey()
Returns the message key, for messages located in resource bundles |
java.lang.Object[] |
getMessageParams()
Retrieves the message parameters, used for formatting |
java.lang.String |
getPropertyName()
Returns the name of the property that created this error message |
java.lang.Class<? extends java.lang.annotation.Annotation> |
getTriggeringAnnotation()
Returns the validating annotation that triggered this error |
void |
setCode(java.lang.String code)
Sets this message's error code |
void |
setData(java.lang.Object data)
Sets the data item that caused the error |
void |
setInstance(java.lang.Object instance)
Sets the instance that this message is associated to. |
void |
setMessage(java.lang.String message)
Sets the literal text of this message |
void |
setMessageKey(java.lang.String messageKey)
Sets this message's key, for messages located in resource bundles |
void |
setMessageParams(java.lang.Object... messageParams)
Sets this message's parameters |
void |
setPropertyName(java.lang.String propertyName)
Sets the Name of the property that created this error message |
void |
setTriggeringAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> triggeringAnnotation)
Sets the validating annotation that triggered this error |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorMessage()
public ErrorMessage(java.lang.String code,
java.lang.String messageKey)
code - Error codemessageKey - Message keypublic ErrorMessage(java.lang.String messageKey)
messageKey - Message key
public ErrorMessage(java.lang.String messageKey,
java.lang.Object... params)
messageKey - Message keyparams - Message parameters| Method Detail |
|---|
public java.lang.String getCode()
public void setCode(java.lang.String code)
code - New error codepublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message - New literal message textpublic java.lang.String getMessageKey()
public void setMessageKey(java.lang.String messageKey)
messageKey - new keypublic java.lang.Object[] getMessageParams()
public void setMessageParams(java.lang.Object... messageParams)
messageParams - Message parameterspublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object getData()
public void setData(java.lang.Object data)
data - Data item that caused the errorpublic java.lang.Object getInstance()
public void setInstance(java.lang.Object instance)
instance - Instance that this message is associated to.public java.lang.String getPropertyName()
public void setPropertyName(java.lang.String propertyName)
propertyName - Name of the property that created this error messagepublic java.lang.Class<? extends java.lang.annotation.Annotation> getTriggeringAnnotation()
public void setTriggeringAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> triggeringAnnotation)
triggeringAnnotation - Validating annotation that triggered this error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||