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

File XWikiDefaultURLFactory.java

 

Coverage histogram

../../../../img/srcFileCovDistChart7.png
66% of files have more coverage

Code metrics

0
10
10
1
90
59
10
1
1
10
1

Classes

Class Line # Actions
XWikiDefaultURLFactory 26 10 0% 10 6
0.770%
 

Contributing tests

This file is covered by 6 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.web;
21   
22    import java.net.URL;
23   
24    import com.xpn.xwiki.XWikiContext;
25   
 
26    public abstract class XWikiDefaultURLFactory implements XWikiURLFactory
27    {
 
28  1 toggle @Override
29    public URL createURL(String spaces, String name, XWikiContext context)
30    {
31  1 return createURL(spaces, name, "view", null, null, context);
32    }
33   
 
34  27 toggle @Override
35    public URL createExternalURL(String spaces, String name, String action, String querystring, String anchor,
36    XWikiContext context)
37    {
38  27 return createExternalURL(spaces, name, action, querystring, anchor, context.getWikiId(), context);
39    }
40   
 
41  174 toggle @Override
42    public URL createURL(String spaces, String name, String action, XWikiContext context)
43    {
44  175 return createURL(spaces, name, action, null, null, context);
45    }
46   
 
47  177 toggle @Override
48    public URL createURL(String spaces, String name, String action, String querystring, String anchor, XWikiContext context)
49    {
50  178 return createURL(spaces, name, action, querystring, anchor, context.getWikiId(), context);
51    }
52   
 
53  50030 toggle @Override
54    public URL createSkinURL(String filename, String spaces, String name, XWikiContext context)
55    {
56  50030 return createSkinURL(filename, spaces, name, context.getWikiId(), context);
57    }
58   
 
59  2 toggle @Override
60    public URL createAttachmentURL(String filename, String spaces, String name, String action, String querystring,
61    XWikiContext context)
62    {
63  2 return createAttachmentURL(filename, spaces, name, action, querystring, context.getWikiId(), context);
64    }
65   
 
66  0 toggle @Override
67    public URL createAttachmentRevisionURL(String filename, String spaces, String name, String revision,
68    String querystring, XWikiContext context)
69    {
70  0 return createAttachmentRevisionURL(filename, spaces, name, revision, querystring, context.getWikiId(), context);
71    }
72   
 
73  0 toggle public URL createAttachmentRevisionURL(String filename, String spaces, String name, String revision,
74    XWikiContext context)
75    {
76  0 return createAttachmentRevisionURL(filename, spaces, name, revision, null, context.getWikiId(), context);
77    }
78   
 
79  69575 toggle @Override
80    public URL getRequestURL(XWikiContext context)
81    {
82  69580 return context.getURL();
83    }
84   
 
85  0 toggle @Override
86    public String getURL(URL url, XWikiContext context)
87    {
88  0 return url.toString();
89    }
90    }