/**
* Read the context tax and populate a JournalEntryContext object.
*/
public JournalEntryContext readContext(XMLEventReader reader)
throws JournalException, XMLStreamException {
JournalEntryContext context = new JournalEntryContext();
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, QNAME_TAG_CONTEXT)) {
throw getNotStartTagException(QNAME_TAG_CONTEXT, event);
}
context.setPassword(readContextPassword(reader));
context.setNoOp(readContextNoOp(reader));
context.setNow(readContextNow(reader));
context
.setEnvironmentAttributes(readMultiMap(reader,
CONTEXT_MAPNAME_ENVIRONMENT));
context.setSubjectAttributes(readMultiMap(reader,
CONTEXT_MAPNAME_SUBJECT));
context
.setActionAttributes(readMultiMap(reader,
CONTEXT_MAPNAME_ACTION));
context.setResourceAttributes(readMultiMap(reader,
CONTEXT_MAPNAME_RESOURCE));
context.setRecoveryAttributes(readMultiMap(reader,
CONTEXT_MAPNAME_RECOVERY));
event = reader.nextTag();
if (!isEndTagEvent(event, QNAME_TAG_CONTEXT)) {
throw getNotEndTagException(QNAME_TAG_CONTEXT, event);