View Javadoc
1   /* 
2   Copyright (c) 2010, NHIN Direct Project
3   All rights reserved.
4   
5   Authors:
6      Greg Meyer      gm2552@cerner.com
7    
8   Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9   
10  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 
12  in the documentation and/or other materials provided with the distribution.  Neither the name of the The NHIN Direct Project (nhindirect.org). 
13  nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
14  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
15  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 
16  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
17  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
18  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
19  THE POSSIBILITY OF SUCH DAMAGE.
20  */
21  
22  package org.nhindirect.gateway.smtp;
23  
24  import org.nhindirect.stagent.mail.MailStandard;
25  import org.nhindirect.stagent.mail.notifications.MDNStandard;
26  
27  /**
28   * Definitions of audit names, types, and contexts
29   * @author Greg Meyer
30   * @since 1.2.1
31   */
32  public class AuditEvents 
33  {
34  	/**
35  	 * Event type for processing direct messages
36  	 */
37  	public static final String EVENT_TYPE = "SMTP Direct Message Processing";
38  	
39  	/**
40  	 * Event name for processing incoming messages
41  	 */
42  	public static final String INCOMING_MESSAGE_NAME = "Incoming Direct Message";
43  	
44  	/**
45  	 * Event name for processing outgoing messages
46  	 */
47  	public static final String OUTGOING_MESSAGE_NAME = "Outgoing Direct Message";
48  	
49  	/**
50  	 * Event name for producing MDN messages
51  	 */
52  	public static final String PRODUCE_MDN_NAME = "Produce Direct MDN Message";
53  	
54  	/**
55  	 * Event name for receiving an MDN message
56  	 */
57  	public static final String MDN_RECEIVED_NAME = "Received Direct MDN Message";
58  	
59  	/**
60  	 * Event name for rejected message recipients
61  	 */
62  	public static final String REJECTED_RECIP_NAME = "Rejected Direct Message Recipients";
63  	
64  	/**
65  	 * Event name for rejected messages
66  	 */
67  	public static final String REJECTED_MESSAGE_NAME = "Rejected Direct Message";
68  	
69  	
70  	/**
71  	 * Default set of headers that are audited
72  	 */
73  	public static final String[] DEFAULT_HEADER_CONTEXT = {MailStandard.Headers.MessageID, MailStandard.Headers.From, MailStandard.Headers.To};
74  	
75  	/**
76  	 * Set of headers audited with outgoing MDN message
77  	 */
78  	public static final String[] MDN_HEADER_CONTEXT = {MailStandard.Headers.MessageID, MailStandard.Headers.From, 
79  		MailStandard.Headers.To, MDNStandard.Headers.Disposition, MDNStandard.Headers.OriginalMessageID, MDNStandard.Headers.FinalRecipient};
80  	
81  	/**
82  	 * Set of headers audited with incoming MDN messages
83  	 */
84  	public static final String[] MDN_RECEIVED_CONTEXT = {MailStandard.Headers.MessageID, MailStandard.Headers.From, 
85  		MailStandard.Headers.To, MDNStandard.Headers.OriginalMessageID, MDNStandard.Headers.Disposition, MDNStandard.Headers.FinalRecipient,};
86  	
87  	public static final String REJECTED_RECIPIENTS_CONTEXT = "Rejected Recipients";
88  	
89  	public static final String REJECTED_MESSAGE_REASON_CONTEXT = "Rejected Message Reason";
90  }