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

File JobFinishedEvent.java

 

Coverage histogram

../../../../img/srcFileCovDistChart5.png
74% of files have more coverage

Code metrics

0
3
4
1
87
24
4
1.33
0.75
4
1

Classes

Class Line # Actions
JobFinishedEvent 43 3 0% 4 4
0.4285714342.9%
 

Contributing tests

This file is covered by 190 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   
21    package org.xwiki.job.event;
22   
23    import java.util.Arrays;
24    import java.util.List;
25   
26    import org.xwiki.job.Request;
27    import org.xwiki.observation.event.EndEvent;
28   
29    /**
30    * Job finished event triggered when a job is finished. Additional data may contains an exception if the job has not
31    * been finished with success.
32    * <p>
33    * The event also send the following parameters:
34    * </p>
35    * <ul>
36    * <li>source: the related {@link org.xwiki.job.Job} instance</li>
37    * <li>data: an {@link Throwable} if the job execution failed or null otherwise</li>
38    * </ul>
39    *
40    * @version $Id: 865444389aae90d56530a3cc4f7d02d98d3d5580 $
41    * @since 4.0M1
42    */
 
43    public class JobFinishedEvent extends AbstractJobEvent implements EndEvent
44    {
45    /**
46    * Serialization identifier.
47    */
48    private static final long serialVersionUID = 1L;
49   
50    /**
51    * Default constructor.
52    */
 
53  262 toggle public JobFinishedEvent()
54    {
55   
56    }
57   
58    /**
59    * @param jobId the event related job id
60    */
 
61  0 toggle public JobFinishedEvent(String jobId)
62    {
63  0 super(jobId);
64    }
65   
66    /**
67    * @param jobId the event related job id
68    * @param jobType the event related job type
69    * @param request the event related job request
70    */
 
71  0 toggle public JobFinishedEvent(String jobId, String jobType, Request request)
72    {
73  0 this(Arrays.asList(jobId), jobType, request);
74    }
75   
76    /**
77    * @param jobId the event related job id
78    * @param jobType the event related job type
79    * @param request the event related job request
80    * @since 4.1M2
81    */
 
82  580 toggle public JobFinishedEvent(List<String> jobId, String jobType, Request request)
83    {
84  580 super(jobId, jobType, request);
85    }
86   
87    }