|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.core.report.impl.AbstractMessageDefinition<T>
T
- the message typepublic abstract class AbstractMessageDefinition<T extends Message>
Abstract message definition
Field Summary | |
---|---|
static String |
KEY_MESSAGE
Key for the message string |
static String |
KEY_STACK_TRACE
Key for the stack trace |
Fields inherited from interface eu.esdihumboldt.hale.common.core.report.MessageDefinition |
---|
ID_PREFIX |
Constructor Summary | |
---|---|
AbstractMessageDefinition(Class<T> messageClass,
String id)
Create message definition |
Method Summary | |
---|---|
protected Properties |
asProperties(T message)
Get a Properties representation of the given message that can be
used to create a new message instance using
createMessage(Properties) . |
String |
asString(T message)
Represent the given object as a definition string, so that it can be used to again create an object instance using ObjectDefinition.parse(String) . |
protected abstract T |
createMessage(Properties props)
Create a message from a set of properties |
String |
getIdentifier()
Get the factory identifier. |
Class<T> |
getObjectClass()
Get the class of the supported object. |
T |
parse(String value)
Parse the given definition string and create an object instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_MESSAGE
public static final String KEY_STACK_TRACE
Constructor Detail |
---|
public AbstractMessageDefinition(Class<T> messageClass, String id)
messageClass
- the message classid
- the identifier for the definition (without prefix)Method Detail |
---|
public String getIdentifier()
ObjectDefinition
:
getIdentifier
in interface ObjectDefinition<T extends Message>
ObjectDefinition.getIdentifier()
public Class<T> getObjectClass()
ObjectDefinition
getObjectClass
in interface ObjectDefinition<T extends Message>
ObjectDefinition.getObjectClass()
public T parse(String value)
ObjectDefinition
parse
in interface ObjectDefinition<T extends Message>
value
- the definition string to parse
null
ObjectDefinition.parse(String)
protected abstract T createMessage(Properties props)
props
- the properties
public String asString(T message)
ObjectDefinition
ObjectDefinition.parse(String)
.
asString
in interface ObjectDefinition<T extends Message>
message
- the object to create a string representation for
ObjectDefinition.asString(Object)
protected Properties asProperties(T message)
Properties
representation of the given message that can be
used to create a new message instance using
createMessage(Properties)
.
message
- the message
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |