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

File EditorConfiguration.java

 

Code metrics

0
0
0
1
61
10
0
-
-
0
-

Classes

Class Line # Actions
EditorConfiguration 40 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.edit;
21   
22    import org.xwiki.component.annotation.Role;
23    import org.xwiki.stability.Unstable;
24   
25    /**
26    * Interface used to customize the {@link EditConfiguration} for a specific data type. It allows you to:
27    * <ul>
28    * <li>reuse some existing configuration properties that don't follow the conventions established by the
29    * {@link EditConfiguration}</li>
30    * <li>specify the default editor when there's no one configured</li>
31    * </ul>
32    * .
33    *
34    * @param <D> the type of data that is edited by the editors affected by this configuration
35    * @version $Id: ec71f01595f85fd6775758f393a3b1e668f0893f $
36    * @since 8.2RC1
37    */
38    @Role
39    @Unstable
 
40    public interface EditorConfiguration<D>
41    {
42    /**
43    * Returns the component hint of the configured default editor or the id of the configured default editor category
44    * associated with the data type bound to this configuration. Returns {@code null} if there's no configured default
45    * editor or default editor category for the data type bound to this configuration.
46    *
47    * @return an editor component hint, or a editor category id or {@code null}
48    */
49    String getDefaultEditor();
50   
51    /**
52    * Returns the component hint of the configured default editor within the specified category, or the id of the
53    * configured default editor sub-category within the specified category, associated with the data type bound to this
54    * configuration. Returns {@code null} if there's no configured default editor or default editor sub-category for
55    * the data type bound to this configuration.
56    *
57    * @param category some editor category
58    * @return an editor component hint, or a editor sub-category id or {@code null}
59    */
60    String getDefaultEditor(String category);
61    }