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

File WikiAttachmentFilter.java

 

Code metrics

0
0
0
1
92
20
0
-
-
0
-

Classes

Class Line # Actions
WikiAttachmentFilter 34 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.io.InputStream;
23   
24    import org.xwiki.filter.FilterEventParameters;
25    import org.xwiki.filter.FilterException;
26    import org.xwiki.filter.annotation.Default;
27   
28    /**
29    * Attachment related events.
30    *
31    * @version $Id: cac3ac01e9d87d589c84b9ae3840e27704a1f7c1 $
32    * @since 6.2M1
33    */
 
34    public interface WikiAttachmentFilter
35    {
36    /**
37    * @type {@link String}
38    */
39    String PARAMETER_NAME = "name";
40   
41    /**
42    * @type {@link String}
43    * @since 7.1M1
44    */
45    String PARAMETER_MIMETYPE = "mimetype";
46   
47    /**
48    * @type {@link String}
49    */
50    String PARAMETER_CONTENT_TYPE = "content_type";
51   
52    /**
53    * @type {@link String}
54    */
55    String PARAMETER_CREATION_AUTHOR = "creation_author";
56   
57    /**
58    * @type {@link java.util.Date}
59    */
60    String PARAMETER_CREATION_DATE = "creation_date";
61   
62    /**
63    * @type {@link String}
64    */
65    String PARAMETER_REVISION = "revision";
66   
67    /**
68    * @type {@link String}
69    */
70    String PARAMETER_REVISION_AUTHOR = "revision_author";
71   
72    /**
73    * @type {@link java.util.Date}
74    */
75    String PARAMETER_REVISION_DATE = "revision_date";
76   
77    /**
78    * @type {@link String}
79    */
80    String PARAMETER_REVISION_COMMENT = "revision_comment";
81   
82    /**
83    * @param name the name of the attachment
84    * @param content the binary content of the attachment
85    * @param size the size of the attachment
86    * @param parameters the properties of the attachment
87    * @throws FilterException when failing to send event
88    */
89    void onWikiAttachment(String name, InputStream content, Long size,
90    @Default(FilterEventParameters.DEFAULT) FilterEventParameters parameters)
91    throws FilterException;
92    }