Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
IWemListenerList | 31 | 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.rendering.wikimodel; | |
21 | ||
22 | /** | |
23 | * This listener re-groups all hierarchical listener elements like lists | |
24 | * (ordered and unordered), definition lists and quotations. This interface | |
25 | * contains methods used to notify begin/end of each list as well as begin/end | |
26 | * of each list item. | |
27 | * | |
28 | * @version $Id: 348ca4d4ca6c11e1f6eeb8b08d2e669f4b7b83e1 $ | |
29 | * @since 4.0M1 | |
30 | */ | |
31 | public interface IWemListenerList | |
32 | { | |
33 | /** | |
34 | * This method is used to notify about a definition description. All | |
35 | * definition descriptions are contained in definition lists and can contain | |
36 | * text, embedded lists or an embedded document. | |
37 | * | |
38 | * @see #endDefinitionDescription() | |
39 | */ | |
40 | void beginDefinitionDescription(); | |
41 | ||
42 | /** | |
43 | * This method is used to notify about a new definition list. | |
44 | * | |
45 | * @param params list of parameters for the list | |
46 | * @see #endDefinitionList(WikiParameters) | |
47 | */ | |
48 | void beginDefinitionList(WikiParameters params); | |
49 | ||
50 | /** | |
51 | * A definition term. Definition terms can contain only formatted texts. | |
52 | * Note that it is impossible to have an embedded list or a document inside | |
53 | * of definition terms. | |
54 | * | |
55 | * @see #endDefinitionTerm() | |
56 | */ | |
57 | void beginDefinitionTerm(); | |
58 | ||
59 | /** | |
60 | * This method is used to notify about a new list. Each list contain at | |
61 | * least one list item. All list items are notified using the | |
62 | * {@link #beginListItem()}/{@link #endListItem()} method pair. Items of | |
63 | * lists of this type can contain the following sequence of elements: | |
64 | * <ol> | |
65 | * <li><em>formatted text</em> - the text can be empty; in this case it is | |
66 | * not notified</li> | |
67 | * <li>Just after the text the list item can have: | |
68 | * <ul> | |
69 | * <li><em>an embedded list</em> - in this way it is possible to build | |
70 | * hierarchical structures</li> | |
71 | * <li><em>an embedded document</em> - it should be defined explicitly and | |
72 | * it can have all valid elements of the top-level document</li> | |
73 | * </ul> | |
74 | * </li> | |
75 | * </ol> | |
76 | * | |
77 | * @param params parameters of the list | |
78 | * @param ordered if this flag is <code>true</code> then this method | |
79 | * corresponds to a new ordered list ("ol"); otherwise this method | |
80 | * notifies a beginning of an unordered list ("ul") | |
81 | * @see #endList(WikiParameters, boolean) | |
82 | */ | |
83 | void beginList(WikiParameters params, boolean ordered); | |
84 | ||
85 | /** | |
86 | * This method is used to notify about the beginning of a new item of a | |
87 | * simple list (see {@link #beginList(WikiParameters, boolean)}/ | |
88 | * {@link #endList(WikiParameters, boolean)} methods). | |
89 | * | |
90 | * @see #endListItem() | |
91 | */ | |
92 | void beginListItem(); | |
93 | ||
94 | /** | |
95 | * Notifies about the beginning of a quotation elements. | |
96 | * | |
97 | * @param params parameters of the list | |
98 | * @see #endQuotation(WikiParameters) | |
99 | */ | |
100 | void beginQuotation(WikiParameters params); | |
101 | ||
102 | /** | |
103 | * A list containing quotation. This is a part of quotation lists. Each | |
104 | * quotation item can have other quotation lists. | |
105 | * | |
106 | * @see #endQuotationLine() | |
107 | */ | |
108 | void beginQuotationLine(); | |
109 | ||
110 | /** | |
111 | * This method is used to notify about the end of a definition description. | |
112 | * | |
113 | * @see #beginDefinitionDescription() | |
114 | */ | |
115 | void endDefinitionDescription(); | |
116 | ||
117 | /** | |
118 | * This method is used to notify about the end of a definition list. | |
119 | * | |
120 | * @param params list of parameters for the list | |
121 | * @see #beginDefinitionList(WikiParameters) | |
122 | */ | |
123 | void endDefinitionList(WikiParameters params); | |
124 | ||
125 | /** | |
126 | * The end of a definition term. | |
127 | * | |
128 | * @see #beginDefinitionTerm() | |
129 | */ | |
130 | void endDefinitionTerm(); | |
131 | ||
132 | /** | |
133 | * This method is used to notify about the end of a list. | |
134 | * | |
135 | * @param params parameters of the list | |
136 | * @param ordered if this flag is <code>true</code> then this method | |
137 | * corresponds to a new ordered list ("ol"); otherwise this method | |
138 | * notifies a beginning of an unordered list ("ul") | |
139 | * @see #beginList(WikiParameters, boolean) | |
140 | */ | |
141 | void endList(WikiParameters params, boolean ordered); | |
142 | ||
143 | /** | |
144 | * This method is used to notify about the end of an item of a simple list | |
145 | * (see {@link #beginList(WikiParameters, boolean)}/ | |
146 | * {@link #endList(WikiParameters, boolean)} methods). | |
147 | * | |
148 | * @see #beginListItem() | |
149 | */ | |
150 | void endListItem(); | |
151 | ||
152 | /** | |
153 | * Notifies about the end of a quotation element sequence. | |
154 | * | |
155 | * @param params parameters of the list | |
156 | * @see #endQuotation(WikiParameters) | |
157 | */ | |
158 | void endQuotation(WikiParameters params); | |
159 | ||
160 | /** | |
161 | * This method is used to notify about the end of a quotation line. | |
162 | * | |
163 | * @see #endQuotationLine() | |
164 | */ | |
165 | void endQuotationLine(); | |
166 | } |