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

File Request.java

 

Code metrics

0
0
0
1
94
17
0
-
-
0
-

Classes

Class Line # Actions
Request 32 0 - 0 0
-1.0 -
 

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;
21   
22    import java.io.Serializable;
23    import java.util.Collection;
24    import java.util.List;
25   
26    /**
27    * A {@link Job} request.
28    *
29    * @version $Id: 1aa63625c3b0cdb03a41f33bc9b190d546106c95 $
30    * @since 4.0M1
31    */
 
32    public interface Request extends Serializable
33    {
34    /**
35    * @see #isRemote()
36    */
37    String PROPERTY_REMOTE = "remote";
38   
39    /**
40    * @see #isInteractive()
41    */
42    String PROPERTY_INTERACTIVE = "interactive";
43   
44    /**
45    * @return list based identifier used to access the job. If none is provided the job will not be accessible by id
46    * and the status of the job will not be stored.
47    * @since 4.1M2
48    */
49    List<String> getId();
50   
51    /**
52    * @return indicate if the job has been triggered by a remote event
53    */
54    boolean isRemote();
55   
56    /**
57    * @return indicate if the job is allowed to ask questions if it it should be fully automated (i.e. use default
58    * answers)
59    */
60    boolean isInteractive();
61   
62    /**
63    * @param key the name of the property
64    * @param <T> the type of the value
65    * @return the value of the property
66    */
67    <T> T getProperty(String key);
68   
69    /**
70    * @param key the name of the property
71    * @param def the default value of the property
72    * @param <T> the type of the value
73    * @return the value of the property
74    */
75    <T> T getProperty(String key, T def);
76   
77    /**
78    * @return the names of all the properties
79    */
80    Collection<String> getPropertyNames();
81   
82    /**
83    * @param key the name of the property
84    * @return <tt>true</tt> if this map contains a property for the specified key
85    * @since 4.2M2
86    */
87    boolean containsProperty(String key);
88   
89    /**
90    * @return true of the job should log informations about what is going on
91    * @since 5.4RC1
92    */
93    boolean isVerbose();
94    }