1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.component.wiki

File WikiComponentManager.java

 

Coverage histogram

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

Code metrics

0
1
1
1
67
14
1
1
1
1
1

Classes

Class Line # Actions
WikiComponentManager 37 1 0% 1 2
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.component.wiki;
21   
22    import org.xwiki.component.annotation.Role;
23    import org.xwiki.model.reference.DocumentReference;
24    import org.xwiki.model.reference.EntityReference;
25   
26    /**
27    * A WikiComponentManager is responsible for registering and unregistering components that are defined as wiki pages.
28    * Each {@link WikiComponent} managed by such manager is associated to a {@link EntityReference}. The
29    * referred entity is or contains XObjects that define the role, hint and behavior (method bodies) of the component.
30    * This document may also define requirements (other components to be binded in the method bodies execution context) and
31    * possible extra interfaces (for example to implement {@link org.xwiki.component.phase.Initializable}).
32    *
33    * @version $Id: a203c1dd5ea4f57c4ff6c3dbd6b02b451cd22c24 $
34    * @since 4.2M3
35    */
36    @Role
 
37    public interface WikiComponentManager
38    {
39    /**
40    * Registers the passed component against the underlying component repository.
41    *
42    * @param component the component to register
43    * @throws WikiComponentException when failed to register the component against the CM
44    */
45    void registerWikiComponent(WikiComponent component) throws WikiComponentException;
46   
47    /**
48    * Unregisters the wiki component(s) associated with the passed reference.
49    *
50    * @param reference the reference to the document holding the component to unregister
51    * @throws WikiComponentException when failed to unregister the component from the CM.
52    */
53    void unregisterWikiComponents(DocumentReference reference) throws WikiComponentException;
54   
55    /**
56    * Just as {@link #unregisterWikiComponents(DocumentReference)},
57    * unregisters the wiki component(s) associated with the passed reference.
58    *
59    * @param reference the reference to the document holding the component to unregister
60    * @throws WikiComponentException when failed to unregister the component from the CM.
61    * @since 9.5RC1
62    */
 
63  0 toggle default void unregisterWikiComponents(EntityReference reference) throws WikiComponentException
64    {
65  0 this.unregisterWikiComponents((DocumentReference) reference);
66    }
67    }