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

File JobFinishingEvent.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
54% of files have more coverage

Code metrics

0
3
4
1
87
23
4
1.33
0.75
4
1

Classes

Class Line # Actions
JobFinishingEvent 43 3 0% 4 2
0.7142857371.4%
 

Contributing tests

This file is covered by 142 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   
28    /**
29    * Job finishing event triggered just after a job is done and we start to save status etc. Give a chance to listeners to
30    * do action as part of the job execution before it's "closed". Additional data may contains an exception if the job has
31    * not 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: 503e02d16304191ec613752a9958baf2ab0fac3b $
41    * @since 8.1RC1
42    */
 
43    public class JobFinishingEvent extends AbstractJobEvent
44    {
45    /**
46    * Serialization identifier.
47    */
48    private static final long serialVersionUID = 1L;
49   
50    /**
51    * Default constructor.
52    */
 
53  3 toggle public JobFinishingEvent()
54    {
55   
56    }
57   
58    /**
59    * @param jobId the event related job id
60    */
 
61  6 toggle public JobFinishingEvent(String jobId)
62    {
63  6 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 JobFinishingEvent(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  579 toggle public JobFinishingEvent(List<String> jobId, String jobType, Request request)
83    {
84  579 super(jobId, jobType, request);
85    }
86   
87    }