1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.security.authorization.testwikis

File TestWiki.java

 

Code metrics

0
0
0
1
99
19
0
-
-
0
-

Classes

Class Line # Actions
TestWiki 35 0 - 0 0
-1.0 -
 

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   
21    package org.xwiki.security.authorization.testwikis;
22   
23    import java.util.Collection;
24   
25    import org.xwiki.model.reference.DocumentReference;
26    import org.xwiki.model.reference.SpaceReference;
27    import org.xwiki.model.reference.WikiReference;
28   
29    /**
30    * Public interface of test entities representing wikis.
31    *
32    * @version $Id: 0e71b7d99f8475ecb69ee4f796bc783510897e14 $
33    * @since 5.0M2
34    */
 
35    public interface TestWiki extends SecureTestEntity
36    {
37    /**
38    * @return the reference to the wiki represented by this test entity.
39    */
40    WikiReference getWikiReference();
41   
42    /**
43    * @return a reference to the owner of the wiki represented by this test entity. May be null.
44    */
45    DocumentReference getOwner();
46   
47    /**
48    * @return true if the wiki represented by this test entity is the main wiki.
49    */
50    boolean isMainWiki();
51   
52    /**
53    * Retrieve a test entity representing a space in this wiki.
54    * @param name name of the space.
55    * @return a test space entity if found, null otherwise.
56    */
57    TestSpace getSpace(String name);
58   
59    /**
60    * Retrieve a test entity representing a space in this wiki.
61    * @param reference reference to the space.
62    * @return a test space entity if found, null otherwise.
63    */
64    TestSpace getSpace(SpaceReference reference);
65   
66    /**
67    * @return a collection of all test entities representing spaces in this wiki.
68    */
69    Collection<TestSpace> getSpaces();
70   
71    /**
72    * @return the alternate description for this test document.
73    */
74    String getDescription();
75   
76    /**
77    * Retrieve a test entities representing a user in this wiki. Note that groups are users as well.
78    * @param name name of the user.
79    * @return a test user document entity if found, null otherwise.
80    */
81    TestUserDocument getUser(String name);
82   
83    /**
84    * Retrieve a test entities representing a group in this wiki.
85    * @param name name of the group.
86    * @return a test group document entity if found, null otherwise.
87    */
88    TestGroupDocument getGroup(String name);
89   
90    /**
91    * @return a collection of all test entities representing users in this wiki. Note that groups are users as well.
92    */
93    Collection<TestUserDocument> getUsers();
94   
95    /**
96    * @return a collection of all test entities representing groups in this wiki.
97    */
98    Collection<TestGroupDocument> getGroups();
99    }