EMMA Coverage Report (generated Fri Jun 19 09:16:10 CEST 2009)
[all classes][org.ktc.rbutils.api.audit.event]

COVERAGE SUMMARY FOR SOURCE FILE [ProcessEvent.java]

nameclass, %method, %block, %line, %
ProcessEvent.java100% (1/1)80%  (4/5)77%  (24/31)80%  (8/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ProcessEvent100% (1/1)80%  (4/5)77%  (24/31)80%  (8/10)
ProcessEvent (Object): void 0%   (0/1)0%   (0/7)0%   (0/2)
ProcessEvent (Object, MessageType, Message, String): void 100% (1/1)100% (13/13)100% (5/5)
getDetailledMessage (): String 100% (1/1)100% (3/3)100% (1/1)
getMessageDisplay (): String 100% (1/1)100% (4/4)100% (1/1)
getMessageTypeDisplay (): String 100% (1/1)100% (4/4)100% (1/1)

1/*
2 * Copyright  2005-2006 The RbUtils Project
3 *
4 *  Licensed under the Apache License, Version 2.0 (the "License");
5 *  you may not use this file except in compliance with the License.
6 *  You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *  Unless required by applicable law or agreed to in writing, software
11 *  distributed under the License is distributed on an "AS IS" BASIS,
12 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 *  See the License for the specific language governing permissions and
14 *  limitations under the License.
15 *
16 */
17 
18// $Id$
19 
20package org.ktc.rbutils.api.audit.event;
21 
22import org.ktc.rbutils.api.audit.MessageType;
23import org.ktc.rbutils.api.i18n.Message;
24 
25 
26/**
27 * Event that occur during the process of an audit in the RbUtils project.
28 * @since RbUtils 0.9.3.3
29 * @version $Revision$
30 * @author moishi
31 */
32public class ProcessEvent extends RbEvent {
33    /**
34     * Automaticly generated field for backward compatibility.
35     */
36    private static final long serialVersionUID = 2896833141842651379L;
37 
38    /**
39     * Adds information to the <code>Message</code> of this Event.
40     */
41    protected String detailledMessage;
42 
43    /**
44     * Message contained by this Event.
45     */
46    protected Message message;
47 
48    /**
49     * Type of Message that defined this Event.
50     */
51    protected MessageType messagetype;
52 
53    /**
54     * Constructs a <code>ProcessEvent</code>.
55     * @param source the object on which the Event initially occurred.
56     * @throws IllegalArgumentException if source is <code>null</code>.
57     */
58    public ProcessEvent(final Object source) {
59        this(source, null, null, null);
60    }
61 
62    /**
63     * Constructs a <code>ProcessEvent</code>.
64     * @param source the object on which the Event initially occurred.
65     * @param messagetype the type of the message.
66     * @param message the Message of this Event.
67     * @param detailledMessage an additionnal message.
68     * @throws IllegalArgumentException if source is <code>null</code>.
69     */
70    public ProcessEvent(final Object source, final MessageType messagetype, final Message message,
71                        final String detailledMessage)
72    {
73        super(source);
74        this.messagetype = messagetype;
75        this.message = message;
76        this.detailledMessage = detailledMessage;
77    }
78 
79    /**
80     * Returns the display form of the Message of this Event.
81     * @return the display form of the Message of this Event.
82     */
83    public String getMessageDisplay() {
84        return message.getMessage();
85    }
86 
87    /**
88     * Returns the display form of the MessageType of this Event.
89     * @return the display form of the MessageType of this Event.
90     */
91    public String getMessageTypeDisplay() {
92        return messagetype.getDisplay();
93    }
94 
95    /**
96     * Returns the detailled message of this Event.
97     * @return the detailled message of this Event.
98     */
99    public String getDetailledMessage() {
100        return detailledMessage;
101    }
102 
103}

[all classes][org.ktc.rbutils.api.audit.event]
EMMA 2.0.5312 (C) Vladimir Roubtsov