Class MessageUtils
java.lang.Object
org.openehealth.ipf.modules.hl7.message.MessageUtils
- All Implemented Interfaces:
GroovyObject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
atLeastVersion
(Message msg, String targetVersion) static boolean
atLeastVersion
(Version actualVersion, Version targetVersion) static boolean
atLeastVersion
(String actualVersion, String targetVersion) static Message
static Message
defaultNak
(HL7Exception e, AcknowledgmentCode ackCode, String version) static Message
defaultNak
(HL7Exception e, AcknowledgmentCode ackCode, String version, String sendingApplication, String sendingFacility, String msh9) static Message
static String
encodeHL7String
(String s, Message msg) static String
static String
hl7Now()
static Message
load
(HapiContext context, String resource) static Message
load
(HapiContext context, String resource, String charset) static Message
make
(HapiContext context, InputStream stream) static Message
make
(HapiContext context, InputStream stream, String charset) static Message
make
(HapiContext context, String message) static Message
makeMessage
(HapiContext context, String eventType, String triggerEvent, String version) static String
messageStructure
(Message msg) static String
messageStructure
(String messageType, String triggerEvent, String version, ModelClassFactory factory) static Composite
newComposite
(String name, Message message, Map map) static Group
static Message
newMessage
(HapiContext context, String event, String version) static Primitive
newPrimitive
(String name, Message message, String value) static Segment
newSegment
(String name, Message message) static Message
void
static String
triggerEvent
(Message msg) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface groovy.lang.GroovyObject
getProperty, invokeMethod, setProperty
-
Constructor Details
-
MessageUtils
public MessageUtils()
-
-
Method Details
-
getMetaClass
- Specified by:
getMetaClass
in interfaceGroovyObject
-
setMetaClass
- Specified by:
setMetaClass
in interfaceGroovyObject
-
atLeastVersion
-
atLeastVersion
-
atLeastVersion
-
hl7Now
-
encodeHL7String
-
eventType
-
triggerEvent
-
messageStructure
public static String messageStructure(String messageType, String triggerEvent, String version, ModelClassFactory factory) -
messageStructure
-
defaultNak
public static Message defaultNak(HL7Exception e, AcknowledgmentCode ackCode, String version, String sendingApplication, String sendingFacility, String msh9) -
defaultNak
-
newMessage
-
response
-
empty
-
copy
-
makeMessage
public static Message makeMessage(HapiContext context, String eventType, String triggerEvent, String version) -
newSegment
-
newGroup
-
newPrimitive
-
newComposite
-
load
-
load
-
make
-
make
-
make
-