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

File WrappingExtensionRepository.java

 

Coverage histogram

../../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

0
7
7
1
87
48
7
1
1
7
1

Classes

Class Line # Actions
WrappingExtensionRepository 39 7 0% 7 14
0.00%
 

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.extension.wrap;
21   
22    import org.xwiki.extension.Extension;
23    import org.xwiki.extension.ExtensionDependency;
24    import org.xwiki.extension.ExtensionId;
25    import org.xwiki.extension.ResolveException;
26    import org.xwiki.extension.repository.ExtensionRepository;
27    import org.xwiki.extension.repository.ExtensionRepositoryDescriptor;
28    import org.xwiki.extension.repository.ExtensionRepositoryId;
29    import org.xwiki.extension.repository.result.IterableResult;
30    import org.xwiki.extension.version.Version;
31   
32    /**
33    * Wrap an {@link ExtensionRepository}.
34    *
35    * @param <T> the type of the wrapped object
36    * @version $Id: 9019a43af457f952291ec0c0fa2f499978db53a7 $
37    * @since 4.0M1
38    */
 
39    public class WrappingExtensionRepository<T extends ExtensionRepository> extends AbstractWrappingObject<T> implements
40    ExtensionRepository
41    {
42    /**
43    * @param repository the wrapped repository
44    */
 
45  0 toggle public WrappingExtensionRepository(T repository)
46    {
47  0 super(repository);
48    }
49   
50    // ExtensionRepository
51   
 
52  0 toggle @Override
53    public ExtensionRepositoryDescriptor getDescriptor()
54    {
55  0 return getWrapped().getDescriptor();
56    }
57   
 
58  0 toggle @Override
59    public ExtensionRepositoryId getId()
60    {
61  0 return getWrapped().getId();
62    }
63   
 
64  0 toggle @Override
65    public Extension resolve(ExtensionId extensionId) throws ResolveException
66    {
67  0 return getWrapped().resolve(extensionId);
68    }
69   
 
70  0 toggle @Override
71    public Extension resolve(ExtensionDependency extensionDependency) throws ResolveException
72    {
73  0 return getWrapped().resolve(extensionDependency);
74    }
75   
 
76  0 toggle @Override
77    public boolean exists(ExtensionId extensionId)
78    {
79  0 return getWrapped().exists(extensionId);
80    }
81   
 
82  0 toggle @Override
83    public IterableResult<Version> resolveVersions(String id, int offset, int nb) throws ResolveException
84    {
85  0 return getWrapped().resolveVersions(id, offset, nb);
86    }
87    }