1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.index.tree.internal.nestedpages

File NestedPagesTree.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
15
1
1
125
81
1
0.07
15
1
1

Classes

Class Line # Actions
NestedPagesTree 44 15 0% 1 0
1.0100%
 

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.index.tree.internal.nestedpages;
21   
22    import javax.inject.Inject;
23    import javax.inject.Named;
24   
25    import org.xwiki.component.annotation.Component;
26    import org.xwiki.component.annotation.InstantiationStrategy;
27    import org.xwiki.component.descriptor.ComponentInstantiationStrategy;
28    import org.xwiki.component.phase.Initializable;
29    import org.xwiki.component.phase.InitializationException;
30    import org.xwiki.tree.AbstractCompositeTree;
31    import org.xwiki.tree.Tree;
32    import org.xwiki.tree.TreeNode;
33   
34    /**
35    * The tree of nested pages.
36    *
37    * @version $Id: efce2f9f02a08a2cf61f1fa428ede8abf32d0881 $
38    * @since 8.3M2
39    * @since 7.4.5
40    */
41    @Component(roles = {Tree.class})
42    @Named("nestedPages")
43    @InstantiationStrategy(ComponentInstantiationStrategy.PER_LOOKUP)
 
44    public class NestedPagesTree extends AbstractCompositeTree implements Initializable
45    {
46    @Inject
47    @Named("farm")
48    private TreeNode farmNode;
49   
50    @Inject
51    @Named("wiki")
52    private TreeNode wikiNode;
53   
54    @Inject
55    @Named("document")
56    private TreeNode documentNode;
57   
58    @Inject
59    @Named("addDocument")
60    private TreeNode addDocumentNode;
61   
62    @Inject
63    @Named("translations")
64    private TreeNode translationsNode;
65   
66    @Inject
67    @Named("translation")
68    private TreeNode translationNode;
69   
70    @Inject
71    @Named("attachments")
72    private TreeNode attachmentsNode;
73   
74    @Inject
75    @Named("attachment")
76    private TreeNode attachmentNode;
77   
78    @Inject
79    @Named("addAttachment")
80    private TreeNode addAttachmentNode;
81   
82    @Inject
83    @Named("classProperties")
84    private TreeNode classPropertiesNode;
85   
86    @Inject
87    @Named("classProperty")
88    private TreeNode classPropertyNode;
89   
90    @Inject
91    @Named("objects")
92    private TreeNode objectsNode;
93   
94    @Inject
95    @Named("objectsOfType")
96    private TreeNode objectsOfTypeNode;
97   
98    @Inject
99    @Named("object")
100    private TreeNode objectNode;
101   
102    @Inject
103    @Named("objectProperty")
104    private TreeNode objectPropertyNode;
105   
 
106  64 toggle @Override
107    public void initialize() throws InitializationException
108    {
109  64 this.treeNodeByNodeType.put("farm", this.farmNode);
110  64 this.treeNodeByNodeType.put("wiki", this.wikiNode);
111  64 this.treeNodeByNodeType.put("document", this.documentNode);
112  64 this.treeNodeByNodeType.put("addDocument", this.addDocumentNode);
113  64 this.treeNodeByNodeType.put("translations", this.translationsNode);
114  64 this.treeNodeByNodeType.put("translation", this.translationNode);
115  64 this.treeNodeByNodeType.put("attachments", this.attachmentsNode);
116  64 this.treeNodeByNodeType.put("attachment", this.attachmentNode);
117  64 this.treeNodeByNodeType.put("addAttachment", this.addAttachmentNode);
118  64 this.treeNodeByNodeType.put("classProperties", this.classPropertiesNode);
119  64 this.treeNodeByNodeType.put("classProperty", this.classPropertyNode);
120  64 this.treeNodeByNodeType.put("objects", this.objectsNode);
121  64 this.treeNodeByNodeType.put("objectsOfType", this.objectsOfTypeNode);
122  64 this.treeNodeByNodeType.put("object", this.objectNode);
123  64 this.treeNodeByNodeType.put("objectProperty", this.objectPropertyNode);
124    }
125    }