Package pl.edu.icm.unity.types.basic
Class MessageTemplate
java.lang.Object
pl.edu.icm.unity.types.DescribedObjectROImpl
pl.edu.icm.unity.types.DescribedObjectImpl
pl.edu.icm.unity.types.basic.MessageTemplate
- All Implemented Interfaces:
DescribedObject,NamedObject
Wraps notification message template. It consist of text, subject, supports localization.
What is most important it handles parameter substitution.
Implementation note: this will be extended in future: based on freemarker, message metadata (as use HTML) added etc. For now is simplistic.
The syntax: all '${foo}' expressions are replaced by the value of the foo key.
- Author:
- K. Benedyczak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classObjects are used to interchange resolved messages, with substituted parameters and fixed locale. -
Field Summary
Fields inherited from class pl.edu.icm.unity.types.DescribedObjectROImpl
description, name -
Constructor Summary
ConstructorsConstructorDescriptionMessageTemplate(com.fasterxml.jackson.databind.node.ObjectNode root) MessageTemplate(String name, String description, I18nMessage message, String consumer, MessageType type, String notificationChannel) -
Method Summary
Modifier and TypeMethodDescriptionclone()booleangetType()inthashCode()voidsetConsumer(String consumer) voidsetMessage(I18nMessage message) voidsetNotificationChannel(String notificationChannel) voidsetType(MessageType type) com.fasterxml.jackson.databind.node.ObjectNodetoJson()toString()Methods inherited from class pl.edu.icm.unity.types.DescribedObjectImpl
setDescription, setNameMethods inherited from class pl.edu.icm.unity.types.DescribedObjectROImpl
fromJsonDescObj, getDescription, getName
-
Constructor Details
-
MessageTemplate
public MessageTemplate() -
MessageTemplate
public MessageTemplate(String name, String description, I18nMessage message, String consumer, MessageType type, String notificationChannel) -
MessageTemplate
public MessageTemplate(com.fasterxml.jackson.databind.node.ObjectNode root)
-
-
Method Details
-
toJson
public com.fasterxml.jackson.databind.node.ObjectNode toJson()- Overrides:
toJsonin classDescribedObjectROImpl
-
setConsumer
-
getConsumer
-
getType
-
setType
-
getNotificationChannel
-
setNotificationChannel
-
getMessage
-
setMessage
-
clone
-
toString
- Overrides:
toStringin classDescribedObjectROImpl
-
equals
- Overrides:
equalsin classDescribedObjectROImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classDescribedObjectROImpl
-