1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.watchlist.internal.notification

File WatchListMessageData.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
12
7
1
117
48
7
0.58
1.71
7
1

Classes

Class Line # Actions
WatchListMessageData 36 12 0% 7 0
1.0100%
 

Contributing tests

This file is covered by 6 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.watchlist.internal.notification;
21   
22    import java.util.List;
23   
24    import javax.mail.Address;
25   
26    import org.xwiki.model.reference.DocumentReference;
27    import org.xwiki.watchlist.internal.api.WatchListEvent;
28   
29    /**
30    * Simple transfer class to store the information extracted from each subscriber that will then be used to send the
31    * actual email message (and to render the message template used).
32    *
33    * @version $Id: 7f2f50d43bba31dd8401e1fa7b355f56702135a0 $
34    * @since 7.1M1
35    */
 
36    public class WatchListMessageData
37    {
38    private DocumentReference userReference;
39   
40    private DocumentReference templateReference;
41   
42    private String firstName;
43   
44    private String lastName;
45   
46    private Address address;
47   
48    private List<WatchListEvent> events;
49   
50    /**
51    * @param userReference seee {@link #getUserReference()}
52    * @param templateReference see {@link #getTemplateReference()}
53    * @param firstName see {@link #getFirstName()}
54    * @param lastName see {@link #getLastName()}
55    * @param address see {@link #getAddress()}
56    * @param events see {@link #getEvents()}
57    */
 
58  8 toggle public WatchListMessageData(DocumentReference userReference, DocumentReference templateReference, String firstName,
59    String lastName, Address address, List<WatchListEvent> events)
60    {
61  8 this.userReference = userReference;
62  8 this.templateReference = templateReference;
63  8 this.firstName = firstName;
64  8 this.lastName = lastName;
65  8 this.address = address;
66  8 this.events = events;
67    }
68   
69    /**
70    * @return the subscriber's profile document reference
71    */
 
72  8 toggle public DocumentReference getUserReference()
73    {
74  8 return userReference;
75    }
76   
77    /**
78    * @return the email template's document reference
79    */
 
80  8 toggle public DocumentReference getTemplateReference()
81    {
82  8 return templateReference;
83    }
84   
85    /**
86    * @return the subscriber's first name
87    */
 
88  8 toggle public String getFirstName()
89    {
90  8 return firstName;
91    }
92   
93    /**
94    * @return the subscriber's last name
95    */
 
96  8 toggle public String getLastName()
97    {
98  8 return lastName;
99    }
100   
101    /**
102    * @return the subscriber's email address
103    */
 
104  8 toggle public Address getAddress()
105    {
106  8 return address;
107    }
108   
109    /**
110    * @return the list of events to notify the subscriber of
111    */
 
112  10 toggle public List<WatchListEvent> getEvents()
113    {
114  10 return events;
115    }
116   
117    }