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

File XARDocumentModel.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
19
3
1
78
48
3
0.16
6.33
3
1

Classes

Class Line # Actions
XARDocumentModel 37 19 0% 3 0
1.0100%
 

Contributing tests

This file is covered by 5 tests. .

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.xar.internal;
21   
22    import java.util.Date;
23    import java.util.HashMap;
24    import java.util.Locale;
25    import java.util.Map;
26   
27    import org.xwiki.filter.event.xwiki.XWikiWikiDocumentFilter;
28    import org.xwiki.filter.xar.internal.XARFilterUtils.EventParameter;
29    import org.xwiki.model.reference.EntityReference;
30    import org.xwiki.rendering.syntax.Syntax;
31    import org.xwiki.xar.internal.model.XarDocumentModel;
32   
33    /**
34    * @version $Id: 963ecf47b7a7fbdbe4de095cadc7f5f6d4324469 $
35    * @since 6.2M1
36    */
 
37    public class XARDocumentModel extends XarDocumentModel
38    {
39    // Utils
40   
41    public static final Map<String, EventParameter> DOCUMENT_PARAMETERS = new HashMap<String, EventParameter>()
42    {
 
43  19 toggle {
44  19 put(ELEMENT_DEFAULTLOCALE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_LOCALE, Locale.class));
45    }
46    };
47   
48    public static final Map<String, EventParameter> DOCUMENTLOCALE_PARAMETERS = new HashMap<String, EventParameter>()
49    {
 
50  19 toggle {
51  19 put(ELEMENT_CREATION_AUTHOR, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CREATION_AUTHOR));
52  19 put(ELEMENT_CREATION_DATE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CREATION_DATE, Date.class));
53  19 put(ELEMENT_REVISIONS, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_JRCSREVISIONS));
54    }
55    };
56   
57    public static final Map<String, EventParameter> DOCUMENTREVISION_PARAMETERS = new HashMap<String, EventParameter>()
58    {
 
59  19 toggle {
60  19 put(ELEMENT_CONTENT, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CONTENT));
61  19 put(ELEMENT_CONTENT_AUTHOR, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CONTENT_AUTHOR));
62  19 put(ELEMENT_CONTENT_DATE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CONTENT_DATE, Date.class));
63  19 put(ELEMENT_CONTENT_HTML, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CONTENT_HTML));
64  19 put(ELEMENT_CUSTOMCLASS, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_CUSTOMCLASS));
65  19 put(ELEMENT_DEFAULTTEMPLATE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_DEFAULTTEMPLATE));
66  19 put(ELEMENT_HIDDEN, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_HIDDEN, Boolean.class));
67  19 put(ELEMENT_PARENT, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_PARENT, EntityReference.class));
68  19 put(ELEMENT_REVISION_AUTHOR, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_REVISION_AUTHOR));
69  19 put(ELEMENT_REVISION_COMMENT, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_REVISION_COMMENT));
70  19 put(ELEMENT_REVISION_DATE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_REVISION_DATE, Date.class));
71  19 put(ELEMENT_REVISION_MINOR, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_REVISION_MINOR,
72    Boolean.class));
73  19 put(ELEMENT_SYNTAX, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_SYNTAX, Syntax.class));
74  19 put(ELEMENT_TITLE, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_TITLE));
75  19 put(ELEMENT_VALIDATIONSCRIPT, new EventParameter(XWikiWikiDocumentFilter.PARAMETER_VALIDATIONSCRIPT));
76    }
77    };
78    }