Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
TranslationDocumentModel | 31 | 0 | - | 0 | 0 | ||
TranslationDocumentModel.Scope | 64 | 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.localization.wiki.internal; | |
21 | ||
22 | import org.xwiki.model.EntityType; | |
23 | import org.xwiki.model.reference.EntityReference; | |
24 | ||
25 | /** | |
26 | * Informations about the way to store translation documents. | |
27 | * | |
28 | * @version $Id: 27378ad1fdc71d085ec7c8afd18aba1bdecff5e3 $ | |
29 | * @since 4.3M2 | |
30 | */ | |
31 | public interface TranslationDocumentModel | |
32 | { | |
33 | /** | |
34 | * Name of the space where to store the xclass. | |
35 | */ | |
36 | String TRANSLATIONCLASS_REFERENCE_SPACE = "XWiki"; | |
37 | ||
38 | /** | |
39 | * Name of the document where to store the xclass. | |
40 | */ | |
41 | String TRANSLATIONCLASS_REFERENCE_NAME = "TranslationDocumentClass"; | |
42 | ||
43 | /** | |
44 | * The local reference of the xlcass. | |
45 | */ | |
46 | EntityReference TRANSLATIONCLASS_REFERENCE = new EntityReference(TRANSLATIONCLASS_REFERENCE_NAME, | |
47 | EntityType.DOCUMENT, new EntityReference(TRANSLATIONCLASS_REFERENCE_SPACE, EntityType.SPACE)); | |
48 | ||
49 | /** | |
50 | * The local reference of the xclass as String. | |
51 | */ | |
52 | String TRANSLATIONCLASS_REFERENCE_STRING = TRANSLATIONCLASS_REFERENCE_SPACE + '.' + TRANSLATIONCLASS_REFERENCE_NAME; | |
53 | ||
54 | /** | |
55 | * The name of the property containing the scope information. | |
56 | */ | |
57 | String TRANSLATIONCLASS_PROP_SCOPE = "scope"; | |
58 | ||
59 | /** | |
60 | * The possible values of the scope property. | |
61 | * | |
62 | * @version $Id: 27378ad1fdc71d085ec7c8afd18aba1bdecff5e3 $ | |
63 | */ | |
64 | enum Scope | |
65 | { | |
66 | /** | |
67 | * Register the translation bundle for the whole farm. | |
68 | */ | |
69 | GLOBAL, | |
70 | ||
71 | /** | |
72 | * Register the translation bundle for the document wiki. | |
73 | */ | |
74 | WIKI, | |
75 | ||
76 | /** | |
77 | * Register the translation bundle for the document author. | |
78 | */ | |
79 | USER, | |
80 | ||
81 | /** | |
82 | * Don't register the translation bundle automatically. | |
83 | */ | |
84 | ON_DEMAND | |
85 | } | |
86 | } |