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

File SafeJobStatus.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

0
12
12
1
118
74
12
1
1
12
1

Classes

Class Line # Actions
SafeJobStatus 41 12 0% 12 24
0.00%
 

Contributing tests

No tests hitting this source file were found.

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.internal.script.safe;
21   
22    import java.util.Date;
23    import java.util.List;
24   
25    import org.xwiki.job.Request;
26    import org.xwiki.job.event.status.JobProgress;
27    import org.xwiki.job.event.status.JobStatus;
28    import org.xwiki.logging.LogLevel;
29    import org.xwiki.logging.LogQueue;
30    import org.xwiki.logging.event.LogEvent;
31    import org.xwiki.script.internal.safe.AbstractSafeObject;
32    import org.xwiki.script.internal.safe.ScriptSafeProvider;
33   
34    /**
35    * Provide a public script access to a job status.
36    *
37    * @param <J> the type of the job status
38    * @version $Id: 2820a90fd6557fc250dc1e2125fa557e003dae57 $
39    * @since 4.0M2
40    */
 
41    public class SafeJobStatus<J extends JobStatus> extends AbstractSafeObject<J> implements JobStatus
42    {
43    /**
44    * @param status the wrapped job status
45    * @param safeProvider the provider of instances safe for public scripts
46    */
 
47  0 toggle public SafeJobStatus(J status, ScriptSafeProvider<?> safeProvider)
48    {
49  0 super(status, safeProvider);
50    }
51   
 
52  0 toggle @Override
53    public State getState()
54    {
55  0 return getWrapped().getState();
56    }
57   
 
58  0 toggle @Override
59    public Throwable getError()
60    {
61  0 return getWrapped().getError();
62    }
63   
 
64  0 toggle @Override
65    public Request getRequest()
66    {
67  0 return getWrapped().getRequest();
68    }
69   
 
70  0 toggle @Override
71    public LogQueue getLog()
72    {
73  0 return getWrapped().getLog();
74    }
75   
 
76  0 toggle @Override
77    @Deprecated
78    public List<LogEvent> getLog(LogLevel level)
79    {
80  0 return getWrapped().getLog(level);
81    }
82   
 
83  0 toggle @Override
84    public JobProgress getProgress()
85    {
86  0 return getWrapped().getProgress();
87    }
88   
 
89  0 toggle @Override
90    public void ask(Object question) throws InterruptedException
91    {
92  0 getWrapped().ask(question);
93    }
94   
 
95  0 toggle @Override
96    public Object getQuestion()
97    {
98  0 return getWrapped().getQuestion();
99    }
100   
 
101  0 toggle @Override
102    public void answered()
103    {
104  0 getWrapped().answered();
105    }
106   
 
107  0 toggle @Override
108    public Date getStartDate()
109    {
110  0 return getWrapped().getStartDate();
111    }
112   
 
113  0 toggle @Override
114    public Date getEndDate()
115    {
116  0 return getWrapped().getEndDate();
117    }
118    }