1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.observation.remote

File LocalEventData.java

 

Coverage histogram

../../../../img/srcFileCovDistChart9.png
38% of files have more coverage

Code metrics

0
10
9
1
120
46
9
0.9
1.11
9
1

Classes

Class Line # Actions
LocalEventData 30 10 0% 9 2
0.894736889.5%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.observation.remote;
21   
22    import org.xwiki.observation.event.Event;
23   
24    /**
25    * Represents a remote event with all its datas.
26    *
27    * @version $Id: d91f136eb61a0f9dc3b3904c8ea7fd74d4bfd266 $
28    * @since 2.0M3
29    */
 
30    public class LocalEventData
31    {
32    /**
33    * The event type.
34    */
35    private Event event;
36   
37    /**
38    * The event source.
39    */
40    private Object source;
41   
42    /**
43    * The event data.
44    */
45    private Object data;
46   
47    /**
48    * Default constructor.
49    */
 
50  11 toggle public LocalEventData()
51    {
52   
53    }
54   
55    /**
56    * @param event the event type.
57    * @param source the event source.
58    * @param data the event data.
59    */
 
60  1085 toggle public LocalEventData(Event event, Object source, Object data)
61    {
62  1084 setEvent(event);
63  1084 setSource(source);
64  1084 setData(data);
65    }
66   
67    /**
68    * @return the event type.
69    */
 
70  7002 toggle public Event getEvent()
71    {
72  7003 return this.event;
73    }
74   
75    /**
76    * @param event the event type.
77    */
 
78  1096 toggle public void setEvent(Event event)
79    {
80  1095 this.event = event;
81    }
82   
83    /**
84    * @return the event source.
85    */
 
86  765 toggle public Object getSource()
87    {
88  768 return this.source;
89    }
90   
91    /**
92    * @param source the event source.
93    */
 
94  1094 toggle public void setSource(Object source)
95    {
96  1094 this.source = source;
97    }
98   
99    /**
100    * @return the event data.
101    */
 
102  1033 toggle public Object getData()
103    {
104  1030 return this.data;
105    }
106   
107    /**
108    * @param data the event data.
109    */
 
110  1091 toggle public void setData(Object data)
111    {
112  1094 this.data = data;
113    }
114   
 
115  0 toggle @Override
116    public String toString()
117    {
118  0 return "event: [" + getEvent() + "], source: [" + getSource() + "], data: [" + getData() + "]";
119    }
120    }