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

File WikiManager.java

 

Code metrics

0
0
0
1
86
13
0
-
-
0
-

Classes

Class Line # Actions
WikiManager 32 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    package org.xwiki.wiki.manager;
21   
22    import org.xwiki.component.annotation.Role;
23    import org.xwiki.wiki.descriptor.WikiDescriptor;
24   
25    /**
26    * Component to create and manage wikis.
27    *
28    * @version $Id: 190cea9a684553715040b1521abd249e61151b57 $
29    * @since 5.3M2
30    */
31    @Role
 
32    public interface WikiManager
33    {
34    /**
35    * Create a new wiki.
36    *
37    * @param wikiId Id of the new wiki
38    * @param wikiAlias Default alias of the new wiki
39    * @param failOnExist throw an exception if the wikiId already exists
40    * @return the descriptor of the created wiki
41    * @throws WikiManagerException if problems occur
42    */
43    WikiDescriptor create(String wikiId, String wikiAlias, boolean failOnExist) throws WikiManagerException;
44   
45    /**
46    * Copy a wiki.
47    *
48    * @param fromWikiId If of the wiki to copy
49    * @param newWikiId Id of the new wiki
50    * @param newWikiAlias Default alias of the new wiki
51    * @param copyHistory decide if you want to copy the pages' history
52    * @param copyRecycleBin decide if you want to copy the recycle bin content
53    * @param failOnExist throw an exception if the wikiId already exists
54    * @return the descriptor of the created wiki
55    * @throws WikiManagerException if problems occur
56    */
57    WikiDescriptor copy(String fromWikiId, String newWikiId, String newWikiAlias, boolean copyHistory,
58    boolean copyRecycleBin, boolean failOnExist) throws WikiManagerException;
59   
60    /**
61    * Rename a wiki.
62    *
63    * @param wikiId If of the wiki to rename
64    * @param newWikiId new Id of the wiki
65    * @return the descriptor of the renamed wiki
66    * @throws WikiManagerException if problems occur
67    */
68    WikiDescriptor rename(String wikiId, String newWikiId) throws WikiManagerException;
69   
70    /**
71    * Delete a wiki.
72    *
73    * @param wikiId Id of the wiki to delete.
74    * @throws WikiManagerException if problems occur
75    */
76    void delete(String wikiId) throws WikiManagerException;
77   
78    /**
79    * Check if the wikiId is valid and available (the name is not already taken for technical reasons).
80    *
81    * @param wikiId the Id to test
82    * @return true if the Id is valid and available
83    * @throws WikiManagerException if problems occur
84    */
85    boolean idAvailable(String wikiId) throws WikiManagerException;
86    }