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

File AbstractResource.java

 

Coverage histogram

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

Code metrics

0
9
6
1
78
43
6
0.67
1.5
6
1

Classes

Class Line # Actions
AbstractResource 31 9 0% 6 4
0.7333333573.3%
 

Contributing tests

This file is covered by 7 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.internal.skin;
21   
22    import org.xwiki.filter.input.InputSource;
23    import org.xwiki.skin.Resource;
24    import org.xwiki.skin.ResourceRepository;
25   
26    /**
27    * @param <I> the type of the {@link InputSource}
28    * @version $Id: 06c7f2c0663f2f4e4d47413a7eff1b975892473c $
29    * @since 6.4M1
30    */
 
31    public abstract class AbstractResource<I extends InputSource> implements Resource<I>
32    {
33    protected ResourceRepository repository;
34   
35    protected String id;
36   
37    protected String path;
38   
39    protected String resourceName;
40   
 
41  963027 toggle public AbstractResource(String id, String path, String resourceName, ResourceRepository repository)
42    {
43  963666 this.id = id;
44  963908 this.path = path;
45  964122 this.resourceName = resourceName;
46  964104 this.repository = repository;
47    }
48   
 
49  51185 toggle @Override
50    public ResourceRepository getRepository()
51    {
52  51185 return this.repository;
53    }
54   
 
55  3560395 toggle @Override
56    public String getId()
57    {
58  3560855 return this.id;
59    }
60   
 
61  833792 toggle @Override
62    public String getPath()
63    {
64  833824 return this.path;
65    }
66   
 
67  0 toggle @Override
68    public String getResourceName()
69    {
70  0 return this.resourceName;
71    }
72   
 
73  0 toggle @Override
74    public String toString()
75    {
76  0 return getId();
77    }
78    }