Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
WikiDescriptorDocumentHelper | 36 | 0 | - | 0 | 0 |
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.internal.descriptor.document; | |
21 | ||
22 | import java.util.List; | |
23 | ||
24 | import org.xwiki.component.annotation.Role; | |
25 | import org.xwiki.model.reference.DocumentReference; | |
26 | import org.xwiki.wiki.manager.WikiManagerException; | |
27 | ||
28 | import com.xpn.xwiki.doc.XWikiDocument; | |
29 | ||
30 | /** | |
31 | * Component to load and resolve wiki descriptor documents. | |
32 | * @version $Id: 72d488d377f78a245c576ac537c6e1762ee0389b $ | |
33 | * @since 5.3M2 | |
34 | */ | |
35 | @Role | |
36 | public interface WikiDescriptorDocumentHelper | |
37 | { | |
38 | /** | |
39 | * @param wikiId The id of the wiki that we want the descriptor document reference | |
40 | * @return the descriptor document reference corresponding to the wikiId | |
41 | */ | |
42 | DocumentReference getDocumentReferenceFromId(String wikiId); | |
43 | ||
44 | /** | |
45 | * @param descriptorDocumentReference the reference to the document that hold the wiki descriptor | |
46 | * @return the id of the wiki corresponding to the descriptor | |
47 | */ | |
48 | String getWikiIdFromDocumentReference(DocumentReference descriptorDocumentReference); | |
49 | ||
50 | /** | |
51 | * @param descriptorDocumentFullname the fullname of the document that hold the wiki descriptor | |
52 | * @return the id of the wiki corresponding to the descriptor | |
53 | */ | |
54 | String getWikiIdFromDocumentFullname(String descriptorDocumentFullname); | |
55 | ||
56 | /** | |
57 | * @param wikiId The id of the wiki that we want the descriptor document | |
58 | * @return the descriptor document corresponding to the wikiId | |
59 | * @throws WikiManagerException if problems occur | |
60 | */ | |
61 | XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException; | |
62 | ||
63 | /** | |
64 | * @param wikiAlias the alias of the wiki that we cant the descriptor document reference | |
65 | * @return the wiki descriptor document reference of the specified wiki | |
66 | * @throws WikiManagerException if problems occur | |
67 | */ | |
68 | DocumentReference findXWikiServerClassDocumentReference(String wikiAlias) throws WikiManagerException; | |
69 | ||
70 | /** | |
71 | * @param wikiAlias the alias of the wiki that we cant the descriptor document reference | |
72 | * @return the wiki descriptor document of the specified wiki | |
73 | * @throws WikiManagerException if problems occur | |
74 | */ | |
75 | XWikiDocument findXWikiServerClassDocument(String wikiAlias) throws WikiManagerException; | |
76 | ||
77 | /** | |
78 | * @return the list of all descriptor documents | |
79 | * @throws WikiManagerException if problems occur | |
80 | */ | |
81 | List<XWikiDocument> getAllXWikiServerClassDocument() throws WikiManagerException; | |
82 | ||
83 | /** | |
84 | * @return the list of all descriptor document names | |
85 | * @throws WikiManagerException if problems occur | |
86 | */ | |
87 | List<String> getAllXWikiServerClassDocumentNames() throws WikiManagerException; | |
88 | } |