org.dcm4che2.audit.message
Class AuditMessage

java.lang.Object
  extended by org.dcm4che2.audit.message.AuditMessage
Direct Known Subclasses:
ApplicationActivityMessage, AuditLogUsedMessage, AuditMessageSupport, BeginTransferringMessage, DataExportMessage, DataImportMessage, InstancesTransferredMessage, NetworkEntryMessage, QueryMessage, SecurityAlertMessage, StudyDeletedMessage, UserAuthenticationMessage

public class AuditMessage
extends java.lang.Object

Generic Audit Message according RFC 3881. Typically an event type specific sub-class will be initiated.

Since:
Nov 17, 2006
Version:
$Revision: 10568 $ $Date: 2009-03-31 15:36:47 +0200 (Tue, 31 Mar 2009) $
Author:
Gunter Zeilinger

Field Summary
protected  java.util.ArrayList<ActiveParticipant> activeParticipants
           
protected  java.util.ArrayList<AuditSource> auditSources
           
protected  AuditEvent event
           
protected  java.lang.String name
           
protected  java.util.ArrayList<ParticipantObject> participantObjects
           
 
Constructor Summary
AuditMessage(AuditEvent event)
           
 
Method Summary
 ActiveParticipant addActiveParticipant(ActiveParticipant apart)
           
protected  void addAttribute(java.lang.String name, byte[] val, boolean optional)
           
protected  void addAttribute(java.lang.String name, java.util.Date val, boolean optional)
           
protected  void addAttribute(java.lang.String name, java.lang.Object val, boolean optional)
           
 AuditSource addAuditSource(AuditSource sourceId)
           
 ParticipantObject addParticipantObject(ParticipantObject obj)
           
static java.lang.String aetsToAltUserID(java.lang.String[] aets)
           
static java.lang.String aetToAltUserID(java.lang.String aet)
           
static java.lang.String[] altUserIDToAETs(java.lang.String altUserID)
           
 java.util.List<ActiveParticipant> getActiveParticipants()
           
protected  java.lang.Object getAttribute(java.lang.String name)
           
 AuditEvent getAuditEvent()
           
 java.util.List<AuditSource> getAuditSources()
           
static java.lang.String[] getLocalAETitles()
           
static java.net.InetAddress getLocalHost()
           
static java.lang.String getLocalHostName()
           
static java.lang.String getLocalNodeID()
           
 java.util.List<ParticipantObject> getParticipantObjects()
           
static java.lang.String getProcessID()
           
static java.lang.String getProcessName()
           
 ActiveParticipant getRequestingActiveParticipants()
           
static java.lang.String hostNameOf(java.net.InetAddress node)
           
static boolean isAllowMultipleRequestors()
           
protected  boolean isEmpty()
           
static boolean isEnableDNSLookups()
           
static boolean isIncludeXMLDeclaration()
           
static boolean isQualifyHostname()
           
static boolean isTimezonedDateTime()
           
static boolean isUtcDateTime()
           
static java.lang.String nodeIDOf(java.net.InetAddress node)
           
 void output(java.io.Writer out)
           
protected  void outputChilds(java.io.Writer out, java.util.List<? extends org.dcm4che2.audit.message.BaseElement> childs)
           
protected  void outputContent(java.io.Writer out)
          Allows subclasses to write content to the output.
static void setAllowMultipleRequestors(boolean allowMultipleRequestors)
           
static void setEnableDNSLookups(boolean enableDNSLookups)
           
 void setEventDateTime(java.util.Date datetime)
           
static void setIncludeXMLDeclaration(boolean incXMLDecl)
           
static void setLocalAETitles(java.lang.String[] aets)
           
 void setOutcomeIndicator(AuditEvent.OutcomeIndicator outcome)
           
static void setProcessName(java.lang.String processName)
           
static void setQualifyHostname(boolean qualifyHostname)
           
static void setTimezonedDateTime(boolean timezonedDateTime)
           
static void setUtcDateTime(boolean utcDateTime)
           
static java.lang.String toDateTimeStr(java.util.Date date)
           
 java.lang.String toString()
           
 java.lang.String toString(int initialSize)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

event

protected final AuditEvent event

activeParticipants

protected final java.util.ArrayList<ActiveParticipant> activeParticipants

auditSources

protected final java.util.ArrayList<AuditSource> auditSources

participantObjects

protected final java.util.ArrayList<ParticipantObject> participantObjects

name

protected final java.lang.String name
Constructor Detail

AuditMessage

public AuditMessage(AuditEvent event)
Method Detail

getAuditEvent

public final AuditEvent getAuditEvent()

setEventDateTime

public void setEventDateTime(java.util.Date datetime)

setOutcomeIndicator

public void setOutcomeIndicator(AuditEvent.OutcomeIndicator outcome)

getAuditSources

public java.util.List<AuditSource> getAuditSources()

addAuditSource

public AuditSource addAuditSource(AuditSource sourceId)

getActiveParticipants

public java.util.List<ActiveParticipant> getActiveParticipants()

getRequestingActiveParticipants

public ActiveParticipant getRequestingActiveParticipants()

addActiveParticipant

public ActiveParticipant addActiveParticipant(ActiveParticipant apart)

getParticipantObjects

public java.util.List<ParticipantObject> getParticipantObjects()

addParticipantObject

public ParticipantObject addParticipantObject(ParticipantObject obj)

isEmpty

protected boolean isEmpty()

toString

public java.lang.String toString()

output

public void output(java.io.Writer out)
            throws java.io.IOException
Throws:
java.io.IOException

validate

public void validate()

outputContent

protected void outputContent(java.io.Writer out)
                      throws java.io.IOException
Allows subclasses to write content to the output. Note to implementers: isEmpty() should also be overridden to return false, otherwise this method will not be called.

Parameters:
out - the writer to write the output to.
Throws:
java.io.IOException - thrown by derived classes if an error occurs.

isIncludeXMLDeclaration

public static final boolean isIncludeXMLDeclaration()

setIncludeXMLDeclaration

public static final void setIncludeXMLDeclaration(boolean incXMLDecl)

isTimezonedDateTime

public static final boolean isTimezonedDateTime()

setTimezonedDateTime

public static final void setTimezonedDateTime(boolean timezonedDateTime)

isUtcDateTime

public static final boolean isUtcDateTime()

setUtcDateTime

public static final void setUtcDateTime(boolean utcDateTime)

isQualifyHostname

public static final boolean isQualifyHostname()

setQualifyHostname

public static final void setQualifyHostname(boolean qualifyHostname)

getProcessID

public static java.lang.String getProcessID()

getProcessName

public static java.lang.String getProcessName()

setProcessName

public static void setProcessName(java.lang.String processName)

getLocalAETitles

public static java.lang.String[] getLocalAETitles()

setLocalAETitles

public static void setLocalAETitles(java.lang.String[] aets)

isEnableDNSLookups

public static boolean isEnableDNSLookups()

setEnableDNSLookups

public static void setEnableDNSLookups(boolean enableDNSLookups)

hostNameOf

public static java.lang.String hostNameOf(java.net.InetAddress node)

nodeIDOf

public static java.lang.String nodeIDOf(java.net.InetAddress node)

getLocalHost

public static java.net.InetAddress getLocalHost()

getLocalHostName

public static java.lang.String getLocalHostName()

getLocalNodeID

public static java.lang.String getLocalNodeID()

aetToAltUserID

public static java.lang.String aetToAltUserID(java.lang.String aet)

aetsToAltUserID

public static java.lang.String aetsToAltUserID(java.lang.String[] aets)

altUserIDToAETs

public static java.lang.String[] altUserIDToAETs(java.lang.String altUserID)

toDateTimeStr

public static java.lang.String toDateTimeStr(java.util.Date date)

setAllowMultipleRequestors

public static void setAllowMultipleRequestors(boolean allowMultipleRequestors)

isAllowMultipleRequestors

public static boolean isAllowMultipleRequestors()

addAttribute

protected void addAttribute(java.lang.String name,
                            java.lang.Object val,
                            boolean optional)

addAttribute

protected void addAttribute(java.lang.String name,
                            java.util.Date val,
                            boolean optional)

addAttribute

protected void addAttribute(java.lang.String name,
                            byte[] val,
                            boolean optional)

getAttribute

protected java.lang.Object getAttribute(java.lang.String name)

toString

public java.lang.String toString(int initialSize)

outputChilds

protected void outputChilds(java.io.Writer out,
                            java.util.List<? extends org.dcm4che2.audit.message.BaseElement> childs)
                     throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 dcm4che. All Rights Reserved.