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

File JobStartedEvent.java

 

Coverage histogram

../../../../img/srcFileCovDistChart4.png
78% of files have more coverage

Code metrics

0
4
5
1
91
28
5
1.25
0.8
5
1

Classes

Class Line # Actions
JobStartedEvent 41 4 0% 5 6
0.3333333433.3%
 

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    package org.xwiki.job.event;
21   
22    import java.util.Arrays;
23    import java.util.List;
24   
25    import org.xwiki.job.Request;
26    import org.xwiki.observation.event.BeginEvent;
27   
28    /**
29    * Job started event triggered when a new job start.
30    * <p>
31    * The event also send the following parameters:
32    * </p>
33    * <ul>
34    * <li>source: the related {@link org.xwiki.job.Job} instance</li>
35    * <li>data: null</li>
36    * </ul>
37    *
38    * @version $Id: d45900f4d69e7bb5cbe30d009281b08ec51cff0b $
39    * @since 4.0M1
40    */
 
41    public class JobStartedEvent extends AbstractJobEvent implements BeginEvent
42    {
43    /**
44    * Serialization identifier.
45    */
46    private static final long serialVersionUID = 1L;
47   
48    /**
49    * Default constructor.
50    */
 
51  450 toggle public JobStartedEvent()
52    {
53   
54    }
55   
56    /**
57    * @param jobType the event related job type
58    */
 
59  0 toggle public JobStartedEvent(String jobType)
60    {
61  0 super(jobType);
62    }
63   
64    /**
65    * @param jobId the event related job unique id
66    * @param jobType the event related job type
67    * @param request the event related job request
68    */
 
69  0 toggle public JobStartedEvent(String jobId, String jobType, Request request)
70    {
71  0 this(Arrays.asList(jobId), jobType, request);
72    }
73   
74    /**
75    * @param jobId the event related job unique id
76    * @param jobType the event related job type
77    * @param request the event related job request
78    */
 
79  580 toggle public JobStartedEvent(List<String> jobId, String jobType, Request request)
80    {
81  580 super(jobId, jobType, request);
82    }
83   
84    /**
85    * @param jobEvent the event to copy
86    */
 
87  0 toggle public JobStartedEvent(JobStartedEvent jobEvent)
88    {
89  0 super(jobEvent.getJobId(), jobEvent.getJobType(), jobEvent.getRequest());
90    }
91    }