org.dcm4che2.audit.message
Class ActiveParticipant

java.lang.Object
  extended by org.dcm4che2.audit.message.ActiveParticipant

public class ActiveParticipant
extends java.lang.Object

Identifies a user for the purpose of documenting accountability for the audited event. A user may be a person, or a hardware device or software process for events that are not initiated by a person. Optionally, the user's network access location may be specified. There may be more than one user per event, for example, in cases of actions initiated by one user for other users, or in events that involve more than one user, hardware device, or system process. However, only one user may be the initiator/requestor for the event.

Since:
Nov 17, 2006
Version:
$Revision: 5685 $ $Date: 2008-01-15 21:05:18 +0100 (Tue, 15 Jan 2008) $
Author:
Gunter Zeilinger

Nested Class Summary
static class ActiveParticipant.NetworkAccessPointTypeCode
           
static class ActiveParticipant.RoleIDCode
           
 
Field Summary
protected  java.lang.String name
           
 
Constructor Summary
ActiveParticipant(java.lang.String userID, boolean userIsRequestor)
          Constructs an Active Participant with given user ID.
 
Method Summary
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)
           
 ActiveParticipant addRoleIDCode(ActiveParticipant.RoleIDCode code)
           
static ActiveParticipant createActiveNode(java.lang.String nodeID, boolean requestor)
           
static ActiveParticipant createActivePerson(java.lang.String userID, java.lang.String altUserID, java.lang.String userName, java.lang.String napID, boolean requestor)
          Creates an Active Participant identifying a person with the specified User ID, Alternative User ID, User Name and Network Access Point ID.
static ActiveParticipant createActiveProcess(java.lang.String processID, java.lang.String[] aets, java.lang.String processName, java.lang.String nodeID, boolean requestor)
          Creates an Active Participant identifying a process with the specified Process ID, AETs, Process Name and Node ID.
static ActiveParticipant createMedia(java.lang.String mediaID, java.lang.String mediaUID)
           
 java.lang.String getAlternativeUserID()
           
protected  java.lang.Object getAttribute(java.lang.String name)
           
 java.lang.String getNetworkAccessPointID()
           
 ActiveParticipant.NetworkAccessPointTypeCode getNetworkAccessPointTypeCode()
           
 java.util.List<ActiveParticipant.RoleIDCode> getRoleIDCodes()
           
 java.lang.String getUserID()
           
 java.lang.String getUserName()
           
protected  boolean isEmpty()
           
static boolean isEncodeUserIsRequestorTrue()
           
static boolean isIP(java.lang.String id)
           
static boolean isTelNo(java.lang.String id)
           
 boolean isUserIsRequestor()
           
 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.
 ActiveParticipant setAlternativeUserID(java.lang.String id)
           
static void setEncodeUserIsRequestorTrue(boolean enable)
           
 void setNetworkAccessPointID(java.net.InetAddress ip)
           
 ActiveParticipant setNetworkAccessPointID(java.lang.String id)
           
 ActiveParticipant setNetworkAccessPointID(java.lang.String id, ActiveParticipant.NetworkAccessPointTypeCode type)
           
 ActiveParticipant setUserName(java.lang.String name)
           
 java.lang.String toString()
           
 java.lang.String toString(int initialSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name
Constructor Detail

ActiveParticipant

public ActiveParticipant(java.lang.String userID,
                         boolean userIsRequestor)
Constructs an Active Participant with given user ID. Use setAlternativeUserID(java.lang.String), setUserName(java.lang.String), setNetworkAccessPointID(java.lang.String, org.dcm4che2.audit.message.ActiveParticipant.NetworkAccessPointTypeCode), addRoleIDCode(org.dcm4che2.audit.message.ActiveParticipant.RoleIDCode) to initalize other attributes.

Parameters:
userID - unique identifier for the user
userIsRequestor - true, if the user is the initiator/requestor for the event, otherwise false.
Method Detail

createActivePerson

public static ActiveParticipant createActivePerson(java.lang.String userID,
                                                   java.lang.String altUserID,
                                                   java.lang.String userName,
                                                   java.lang.String napID,
                                                   boolean requestor)
Creates an Active Participant identifying a person with the specified User ID, Alternative User ID, User Name and Network Access Point ID.

Parameters:
userID - unique identifier for the person used by the application
altUserID - Alternative User ID, used for authentication (e.g. SSO)
userName - person's name
napID - identifier for the user's network access point (Machine Name, including DNS name, IP Address or Telephone Number)
requestor - true, if the user is the initiator/requestor for the event, otherwise false.
Returns:
Active Participant with the specified User ID, Alternative User ID, User Name and Network Access Point ID.

createActiveProcess

public static ActiveParticipant createActiveProcess(java.lang.String processID,
                                                    java.lang.String[] aets,
                                                    java.lang.String processName,
                                                    java.lang.String nodeID,
                                                    boolean requestor)
Creates an Active Participant identifying a process with the specified Process ID, AETs, Process Name and Node ID.

Parameters:
processID -
aets -
processName -
nodeID -
requestor - true, if the process is the initiator/requestor for the event, otherwise false.
Returns:
Active Participant with the specified Process ID, AETs, Process Name and Network Access Point ID.

createActiveNode

public static ActiveParticipant createActiveNode(java.lang.String nodeID,
                                                 boolean requestor)

createMedia

public static ActiveParticipant createMedia(java.lang.String mediaID,
                                            java.lang.String mediaUID)

isEncodeUserIsRequestorTrue

public static boolean isEncodeUserIsRequestorTrue()

setEncodeUserIsRequestorTrue

public static void setEncodeUserIsRequestorTrue(boolean enable)

getUserID

public java.lang.String getUserID()

getAlternativeUserID

public java.lang.String getAlternativeUserID()

setAlternativeUserID

public ActiveParticipant setAlternativeUserID(java.lang.String id)

getUserName

public java.lang.String getUserName()

setUserName

public ActiveParticipant setUserName(java.lang.String name)

isUserIsRequestor

public boolean isUserIsRequestor()

getNetworkAccessPointID

public java.lang.String getNetworkAccessPointID()

getNetworkAccessPointTypeCode

public ActiveParticipant.NetworkAccessPointTypeCode getNetworkAccessPointTypeCode()

setNetworkAccessPointID

public ActiveParticipant setNetworkAccessPointID(java.lang.String id,
                                                 ActiveParticipant.NetworkAccessPointTypeCode type)

setNetworkAccessPointID

public ActiveParticipant setNetworkAccessPointID(java.lang.String id)

setNetworkAccessPointID

public void setNetworkAccessPointID(java.net.InetAddress ip)

getRoleIDCodes

public java.util.List<ActiveParticipant.RoleIDCode> getRoleIDCodes()

addRoleIDCode

public ActiveParticipant addRoleIDCode(ActiveParticipant.RoleIDCode code)

isEmpty

protected boolean isEmpty()

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.

isIP

public static boolean isIP(java.lang.String id)

isTelNo

public static boolean isTelNo(java.lang.String id)

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)

output

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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.