1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.filter.event.model

File WikiDocumentFilter.java

 

Code metrics

0
0
0
1
235
46
0
-
-
0
-

Classes

Class Line # Actions
WikiDocumentFilter 36 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.filter.event.model;
21   
22    import java.util.Locale;
23   
24    import org.slf4j.Marker;
25    import org.slf4j.MarkerFactory;
26    import org.xwiki.filter.FilterEventParameters;
27    import org.xwiki.filter.FilterException;
28    import org.xwiki.filter.annotation.Default;
29   
30    /**
31    * Document related events.
32    *
33    * @version $Id: de7295f65fa37c3e7f168a39c6d878bfaf622aab $
34    * @since 6.2M1
35    */
 
36    public interface WikiDocumentFilter
37    {
38    // Log
39   
40    /**
41    * Mark a log as a document save notification. First log parameter has to be the
42    * {@link org.xwiki.model.reference.DocumentReference}.
43    *
44    * @since 6.2M1
45    */
46    Marker LOG_DOCUMENT_CREATED = MarkerFactory.getMarker("filter.document.created");
47   
48    /**
49    * Mark a log as a document save notification. First log parameter has to be the
50    * {@link org.xwiki.model.reference.DocumentReference}.
51    *
52    * @since 6.2M1
53    */
54    Marker LOG_DOCUMENT_UPDATED = MarkerFactory.getMarker("filter.document.updated");
55   
56    /**
57    * Mark a log as a document delete notification. First log parameter has to be the
58    * {@link org.xwiki.model.reference.DocumentReference}.
59    *
60    * @since 6.2M1
61    */
62    Marker LOG_DOCUMENT_DELETED = MarkerFactory.getMarker("filter.document.deleted");
63   
64    /**
65    * Mark a log as a document skipped notification. First log parameter has to be the
66    * {@link org.xwiki.model.reference.DocumentReference}.
67    *
68    * @since 6.2M1
69    */
70    Marker LOG_DOCUMENT_SKIPPED = MarkerFactory.getMarker("filter.document.skipped");
71   
72    /**
73    * Mark a log as a document error notification. First log parameter has to be the
74    * {@link org.xwiki.model.reference.DocumentReference}.
75    *
76    * @since 6.2M1
77    */
78    Marker LOG_DOCUMENT_ERROR = MarkerFactory.getMarker("filter.document.error");
79   
80    // Properties
81   
82    /**
83    * @type {@link org.xwiki.rendering.syntax.Syntax}
84    */
85    String PARAMETER_SYNTAX = "syntax";
86   
87    /**
88    * @type {@link org.xwiki.model.reference.EntityReference}
89    */
90    String PARAMETER_PARENT = "parent_reference";
91   
92    /**
93    * @type {@link String}
94    */
95    String PARAMETER_TITLE = "title";
96   
97    /**
98    * @type {@link Boolean}
99    */
100    String PARAMETER_HIDDEN = "hidden";
101   
102    /**
103    * @type {@link String}
104    */
105    String PARAMETER_CUSTOMCLASS = "customclass";
106   
107    /**
108    * @type {@link String}
109    */
110    String PARAMETER_DEFAULTTEMPLATE = "defaulttemplate";
111   
112    /**
113    * @type {@link String}
114    */
115    String PARAMETER_VALIDATIONSCRIPT = "validationscript";
116   
117    // content
118   
119    /**
120    * @type {@link String}
121    */
122    String PARAMETER_CONTENT = "content";
123   
124    /**
125    * @type {@link String}
126    */
127    String PARAMETER_CONTENT_HTML = "content_html";
128   
129    /**
130    * @type {@link String}
131    */
132    String PARAMETER_CONTENT_AUTHOR = "content_author";
133   
134    /**
135    * @type {@link java.util.Date}
136    */
137    String PARAMETER_CONTENT_DATE = "content_date";
138   
139    // creation
140   
141    /**
142    * @type {@link String}
143    */
144    String PARAMETER_CREATION_AUTHOR = "creation_author";
145   
146    /**
147    * @type {@link java.util.Date}
148    */
149    String PARAMETER_CREATION_DATE = "creation_date";
150   
151    // locale
152   
153    /**
154    * @type {@link Locale}
155    */
156    String PARAMETER_LOCALE = "locale";
157   
158    // revision
159   
160    /**
161    * @type {@link String}
162    * @since 6.2M1
163    */
164    String PARAMETER_LASTREVISION = "lastrevision";
165   
166    /**
167    * @type {@link java.util.Date}
168    */
169    String PARAMETER_REVISION_DATE = "revision_date";
170   
171    /**
172    * @type {@link String}
173    */
174    String PARAMETER_REVISION_AUTHOR = "revision_author";
175   
176    /**
177    * @type {@link String}
178    */
179    String PARAMETER_REVISION_COMMENT = "revision_comment";
180   
181    /**
182    * @type {@link Boolean}
183    */
184    String PARAMETER_REVISION_MINOR = "revision_minor";
185   
186    // Events
187   
188    /**
189    * @param name the name of the document
190    * @param parameters the properties of the document
191    * @throws FilterException when failing to send event
192    */
193    void beginWikiDocument(String name, @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters)
194    throws FilterException;
195   
196    /**
197    * @param name the name of the document
198    * @param parameters the properties of the document
199    * @throws FilterException when failing to send event
200    */
201    void endWikiDocument(String name, @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters)
202    throws FilterException;
203   
204    /**
205    * @param locale the locale of the document
206    * @param parameters the properties of the document locale
207    * @throws FilterException when failing to send event
208    */
209    void beginWikiDocumentLocale(@Default("") Locale locale,
210    @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters) throws FilterException;
211   
212    /**
213    * @param locale the locale of the document
214    * @param parameters the properties of the document
215    * @throws FilterException when failing to send event
216    */
217    void endWikiDocumentLocale(@Default("") Locale locale,
218    @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters) throws FilterException;
219   
220    /**
221    * @param revision the revision of the document
222    * @param parameters the properties of the document revision
223    * @throws FilterException when failing to send event
224    */
225    void beginWikiDocumentRevision(String revision,
226    @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters) throws FilterException;
227   
228    /**
229    * @param revision the revision of the document
230    * @param parameters the properties of the document revision
231    * @throws FilterException when failing to send event
232    */
233    void endWikiDocumentRevision(String revision,
234    @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters) throws FilterException;
235    }