|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.olingo.odata2.api.exception.MessageReference
public abstract class MessageReference
APPLICATION DEVELOPERS: Please use ODataApplicationException
to throw custom exceptions. This class is used
inside the library only.
A MessageReference
references to the used message for an ODataMessageException
and its sub
classes. It supports
internationalization and translation of exception messages.
Theses classes contain a MessageReference
object which
can be mapped to a related key and message text in the resource bundles.
Field Summary | |
---|---|
protected List<Object> |
content
|
protected String |
key
|
Method Summary | |
---|---|
MessageReference |
addContent(Object... content)
Adds given content to message reference. |
MessageReference |
create()
|
static MessageReference |
create(Class<? extends ODataException> clazz,
String key)
Creates a MessageReference for given class and key . |
boolean |
equals(Object obj)
MessageReference s are equal if their message keys have the same value. |
List<?> |
getContent()
Receives content for this MessageReference . |
String |
getKey()
Returns message key. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String key
protected List<Object> content
Method Detail |
---|
public static MessageReference create(Class<? extends ODataException> clazz, String key)
MessageReference
for given class
and key
.
This combination of class
and key
has to be provided
by a resource bundle.
clazz
- ODataMessageException
for which this MessageReference
should be usedkey
- unique key (in context of ODataMessageException
) for reference
to message text in resource bundle
MessageReference
public MessageReference create()
public String getKey()
public MessageReference addContent(Object... content)
public List<?> getContent()
MessageReference
.
Beware that returned list is immutable.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
MessageReference
s are equal if their message keys have the same value.
equals
in class Object
true
if both instances are equal, otherwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |