1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.rendering.macro.descriptor

File MacroDescriptor.java

 

Code metrics

0
0
0
1
79
13
0
-
-
0
-

Classes

Class Line # Actions
MacroDescriptor 32 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.rendering.macro.descriptor;
21   
22    import java.util.Map;
23   
24    import org.xwiki.rendering.macro.MacroId;
25   
26    /**
27    * Describe a Macro (macro description and macro parameters description).
28    *
29    * @version $Id: bb66bea444e4e384defe70e8f5a26106f410fdda $
30    * @since 1.6M1
31    */
 
32    public interface MacroDescriptor
33    {
34    /**
35    * @return the id of the macro
36    * @since 2.3M1
37    */
38    MacroId getId();
39   
40    /**
41    * @return the human-readable name of the macro (eg "Table Of Contents" for the TOC macro).
42    * @since 2.0M3
43    */
44    String getName();
45   
46    /**
47    * @return the description of the macro.
48    */
49    String getDescription();
50   
51    /**
52    * @return the class of the JAVA bean containing macro parameters.
53    */
54    Class<?> getParametersBeanClass();
55   
56    /**
57    * @return describe the macro content. If null the macro does not support content.
58    * @since 1.9M1
59    */
60    ContentDescriptor getContentDescriptor();
61   
62    /**
63    * @return a {@link Map} containing the {@link ParameterDescriptor} for each parameter.
64    * @since 1.7M2
65    */
66    Map<String, ParameterDescriptor> getParameterDescriptorMap();
67   
68    /**
69    * A macro can define a default classification category under which it falls. For an example, the "skype" macro
70    * would fall under the "Communication" category of macros. However, a wiki administrator has the ability to
71    * override the default category for a given macro in order to organize categories as he sees fit. Thus this default
72    * category is only an indication from the macro author about what category the macro should fall.
73    *
74    * @return the default category under which this macro should be listed or null if the macro doesn't have a default
75    * category defined
76    * @since 2.0M3
77    */
78    String getDefaultCategory();
79    }