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

File IndexerRequest.java

 

Coverage histogram

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

Code metrics

0
7
8
1
118
42
8
1.14
0.88
8
1

Classes

Class Line # Actions
IndexerRequest 32 7 0% 8 10
0.3333333433.3%
 

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.search.solr.internal.job;
21   
22    import org.xwiki.job.AbstractRequest;
23    import org.xwiki.job.Request;
24    import org.xwiki.model.reference.EntityReference;
25   
26    /**
27    * The request used to configure {@link IndexerJob}.
28    *
29    * @version $Id: 893e60ba9225f160da7b8539ebb27205706e988a $
30    * @since 5.1RC1
31    */
 
32    public class IndexerRequest extends AbstractRequest
33    {
34    /**
35    * Serialization identifier.
36    */
37    private static final long serialVersionUID = 1L;
38   
39    /**
40    * @see #getRootReference()
41    */
42    private EntityReference rootReference;
43   
44    /**
45    * @see #isOverwrite()
46    */
47    private boolean overwrite;
48   
49    /**
50    * @see #isRemoveMissing()
51    */
52    private boolean removeMissing = true;
53   
54    /**
55    * The default constructor.
56    */
 
57  3 toggle public IndexerRequest()
58    {
59    }
60   
61    /**
62    * @param request the request to copy
63    */
 
64  0 toggle public IndexerRequest(Request request)
65    {
66  0 super(request);
67    }
68   
69    /**
70    * @return the reference from which to work
71    */
 
72  3 toggle public EntityReference getRootReference()
73    {
74  3 return this.rootReference;
75    }
76   
77    /**
78    * @param rootReference the reference from which to work
79    */
 
80  0 toggle public void setRootReference(EntityReference rootReference)
81    {
82  0 this.rootReference = rootReference;
83    }
84   
85    /**
86    * @return if false documents are indexed only if they don't already exist in Solr index (version is taken into
87    * account), if true all documents are sent and overwrite what's already in Solr if any
88    */
 
89  3 toggle public boolean isOverwrite()
90    {
91  3 return this.overwrite;
92    }
93   
94    /**
95    * @param overwrite if false documents are indexed only if they don't already exist in Solr index (version is taken
96    * into account), if true all documents are sent and overwrite what's already in Solr if any
97    */
 
98  0 toggle public void setOverwrite(boolean overwrite)
99    {
100  0 this.overwrite = overwrite;
101    }
102   
103    /**
104    * @return if true the Solr document not in database anymore are cleaned, if false nothing is checked
105    */
 
106  0 toggle public boolean isRemoveMissing()
107    {
108  0 return this.removeMissing;
109    }
110   
111    /**
112    * @param removeMissing if true the Solr document not in database anymore are cleaned, if false nothing is checked
113    */
 
114  0 toggle public void setRemoveMissing(boolean removeMissing)
115    {
116  0 this.removeMissing = removeMissing;
117    }
118    }