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

File FilterStreamConverterJobRequest.java

 

Coverage histogram

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

Code metrics

0
18
8
1
152
60
8
0.44
2.25
8
1

Classes

Class Line # Actions
FilterStreamConverterJobRequest 36 18 0% 8 6
0.769230876.9%
 

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.filter.job;
21   
22    import java.util.ArrayList;
23    import java.util.List;
24    import java.util.Map;
25   
26    import org.xwiki.filter.type.FilterStreamType;
27    import org.xwiki.job.AbstractRequest;
28    import org.xwiki.job.Request;
29   
30    /**
31    * The request used to configure "filter.converter" job.
32    *
33    * @version $Id: 2dc09f8274dc52345dd8713d6e2aa2ef21b2966e $
34    * @since 6.2M1
35    */
 
36    public class FilterStreamConverterJobRequest extends AbstractRequest implements FilterStreamJobRequest
37    {
38    /**
39    * Serialization identifier.
40    */
41    private static final long serialVersionUID = 1L;
42   
43    /**
44    * @see #getInputType()
45    */
46    private FilterStreamType inputType;
47   
48    /**
49    * @see #getInputProperties()
50    */
51    private Map<String, Object> inputProperties;
52   
53    /**
54    * @see #getOutputType()
55    */
56    private FilterStreamType outputType;
57   
58    /**
59    * @see #isEventsFolded()
60    */
61    private boolean eventsFolded;
62   
63    /**
64    * @see #getOutputProperties()
65    */
66    private Map<String, Object> outputProperties;
67   
68    /**
69    * @param inputType the type of the input module
70    * @param inputProperties the configuration of the input module
71    * @param outputType the type of the output module
72    * @param outputProperties the configuration of the output module
73    */
 
74  0 toggle public FilterStreamConverterJobRequest(FilterStreamType inputType, Map<String, Object> inputProperties,
75    FilterStreamType outputType, Map<String, Object> outputProperties)
76    {
77  0 this(inputType, inputProperties, outputType, true, outputProperties);
78    }
79   
80    /**
81    * @param inputType the type of the input module
82    * @param inputProperties the configuration of the input module
83    * @param outputType the type of the output module
84    * @param eventsFolded true if events produced during the conversion should be folded
85    * @param outputProperties the configuration of the output module
86    */
 
87  1 toggle public FilterStreamConverterJobRequest(FilterStreamType inputType, Map<String, Object> inputProperties,
88    FilterStreamType outputType, boolean eventsFolded, Map<String, Object> outputProperties)
89    {
90  1 this.inputType = inputType;
91  1 this.inputProperties = inputProperties;
92  1 this.outputType = outputType;
93  1 this.outputProperties = outputProperties;
94  1 this.eventsFolded = eventsFolded;
95   
96  1 List<String> jobId = new ArrayList<String>();
97  1 jobId.add(JOBID_PREFIX);
98  1 jobId.add("converter");
99  1 jobId.add(inputType.serialize());
100  1 jobId.add(outputType.serialize());
101  1 setId(jobId);
102    }
103   
104    /**
105    * @param request the request to copy
106    */
 
107  0 toggle public FilterStreamConverterJobRequest(Request request)
108    {
109  0 super(request);
110    }
111   
112    /**
113    * @return the type of the input module
114    */
 
115  1 toggle public FilterStreamType getInputType()
116    {
117  1 return this.inputType;
118    }
119   
120    /**
121    * @return the configuration of the input module
122    */
 
123  1 toggle public Map<String, Object> getInputProperties()
124    {
125  1 return this.inputProperties;
126    }
127   
128    /**
129    * @return the type of the output module
130    */
 
131  1 toggle public FilterStreamType getOutputType()
132    {
133  1 return this.outputType;
134    }
135   
136    /**
137    * @return true if events produced during the conversion should be folded
138    * @since 8.2RC1
139    */
 
140  0 toggle public boolean isEventsFolded()
141    {
142  0 return this.eventsFolded;
143    }
144   
145    /**
146    * @return the configuration of the output module
147    */
 
148  1 toggle public Map<String, Object> getOutputProperties()
149    {
150  1 return this.outputProperties;
151    }
152    }