1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package com.xpn.xwiki.api

File CriteriaService.java

 

Coverage histogram

../../../../img/srcFileCovDistChart5.png
76% of files have more coverage

Code metrics

0
6
6
1
83
39
6
1
1
6
1

Classes

Class Line # Actions
CriteriaService 32 6 0% 6 6
0.550%
 

Contributing tests

This file is covered by 26 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 com.xpn.xwiki.api;
21   
22    import com.xpn.xwiki.XWikiContext;
23    import com.xpn.xwiki.criteria.impl.DurationFactory;
24    import com.xpn.xwiki.criteria.impl.PeriodFactory;
25    import com.xpn.xwiki.criteria.impl.RangeFactory;
26    import com.xpn.xwiki.criteria.impl.RevisionCriteriaFactory;
27    import com.xpn.xwiki.criteria.impl.ScopeFactory;
28   
29    /**
30    * Criteria service api.
31    */
 
32    public class CriteriaService extends Api
33    {
 
34  170824 toggle public CriteriaService(XWikiContext context)
35    {
36  170654 super(context);
37    }
38   
39    /**
40    * @return A helper factory for creating {@link com.xpn.xwiki.criteria.impl.Scope} objects in velocity.
41    */
 
42  0 toggle public ScopeFactory getScopeFactory()
43    {
44  0 return getXWikiContext().getWiki().getCriteriaService(getXWikiContext())
45    .getScopeFactory();
46    }
47   
48    /**
49    * @return A helper factory for creating {@link com.xpn.xwiki.criteria.impl.Period} objects in velocity.
50    */
 
51  0 toggle public PeriodFactory getPeriodFactory()
52    {
53  0 return getXWikiContext().getWiki().getCriteriaService(getXWikiContext())
54    .getPeriodFactory();
55    }
56   
57    /**
58    * @return A helper factory for creating {@link com.xpn.xwiki.criteria.impl.Duration} objects in velocity.
59    */
 
60  0 toggle public DurationFactory getDurationFactory()
61    {
62  0 return getXWikiContext().getWiki().getCriteriaService(getXWikiContext())
63    .getDurationFactory();
64    }
65   
66    /**
67    * @return A helper factory for creating {@link com.xpn.xwiki.criteria.impl.Range} objects in velocity.
68    */
 
69  19 toggle public RangeFactory getRangeFactory()
70    {
71  19 return getXWikiContext().getWiki().getCriteriaService(getXWikiContext())
72    .getRangeFactory();
73    }
74   
75    /**
76    * @return A helper factory for creating {@link com.xpn.xwiki.criteria.impl.RevisionCriteria} objects in velocity.
77    */
 
78  42 toggle public RevisionCriteriaFactory getRevisionCriteriaFactory()
79    {
80  42 return getXWikiContext().getWiki().getCriteriaService(getXWikiContext())
81    .getRevisionCriteriaFactory();
82    }
83    }