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

File OfficeMacroParameters.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

0
6
6
1
124
43
6
1
1
6
1

Classes

Class Line # Actions
OfficeMacroParameters 31 6 0% 6 12
0.00%
 

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.office;
21   
22    import org.xwiki.properties.annotation.PropertyDescription;
23    import org.xwiki.rendering.listener.reference.ResourceReference;
24   
25    /**
26    * Parameters for the {@link org.xwiki.rendering.internal.macro.office.OfficeMacro}.
27    *
28    * @version $Id: 444b3653fc6fc80bf39d81844b669064a8c2ed39 $
29    * @since 2.5M2
30    */
 
31    public class OfficeMacroParameters
32    {
33    /**
34    * The office attachment to be viewed. Use an attachment string reference to specify which office file should be
35    * viewed: {@code file.ppt}, {@code Page@file.doc}, {@code Space.Page@file.xls} or {@code wiki:Space.Page@file.odt}.
36    */
37    private String attachment;
38   
39    /**
40    * The office document to be viewed. Use an attachment string reference to specify which office file should be
41    * viewed: {@code file.ppt}, {@code Page@file.doc}, {@code Space.Page@file.xls} or {@code wiki:Space.Page@file.odt}.
42    */
43    private ResourceReference reference;
44   
45    /**
46    * Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server. Office
47    * content is usually better integrated in the host wiki page when styles are filtered.
48    * <p>
49    * Styles are filtered by default.
50    */
51    private boolean filterStyles = true;
52   
53    /**
54    * @return a string reference to the office attachment to be viewed
55    * @deprecated since 5.4.6, use {@link #getReference()} instead
56    */
 
57  0 toggle @Deprecated
58    public String getAttachment()
59    {
60  0 return attachment;
61    }
62   
63    /**
64    * Sets the office attachment to be viewed.
65    *
66    * @param attachment an attachment string reference
67    * @deprecated since
68    */
 
69  0 toggle @PropertyDescription("The office attachment to be viewed. Use an attachment string reference to specify which "
70    + "office file should be viewed: file.ppt, Page@file.doc, Space.Page@file.xls or wiki:Space.Page@file.odt.")
71    @Deprecated
72    public void setAttachment(String attachment)
73    {
74  0 this.attachment = attachment;
75    }
76   
77    /**
78    * IMPORTANT: this method should not be used from Java, its signature is temporary and will change in 6.2.1.
79    *
80    * @return a string reference to the office file to be viewed
81    * @since 5.4.6
82    * @since 6.2.2
83    */
 
84  0 toggle public ResourceReference getReference()
85    {
86  0 return this.reference;
87    }
88   
89    /**
90    * @param reference the reference to the file to be viewed
91    * @since 5.4.6
92    * @since 6.2.2
93    */
 
94  0 toggle @PropertyDescription("The office file to be viewed. Use an resource string reference to specify which"
95    + " office file should be viewed:"
96    + " attach:file.ppt, attach:Page@file.doc, attach:Space.Page@file.xls, attach:wiki:Space.Page@file.odt,"
97    + " url:http://some/remote/file.ppt.")
98    public void setReference(ResourceReference reference)
99    {
100  0 this.reference = reference;
101    }
102   
103    /**
104    * @return {@code true} if the CSS styles present in the HTML content produces by the OpenOffice server are
105    * filtered, {@code false} otherwise
106    */
 
107  0 toggle public boolean isFilterStyles()
108    {
109  0 return filterStyles;
110    }
111   
112    /**
113    * Sets whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server.
114    *
115    * @param filterStyles {@code true} to filter the CSS style present in the HTML content produces by the OpenOffice
116    * server, {@code false} otherwise
117    */
 
118  0 toggle @PropertyDescription("Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice "
119    + "server. Office content is usually better integrated in the host wiki page when styles are filtered.")
120    public void setFilterStyles(boolean filterStyles)
121    {
122  0 this.filterStyles = filterStyles;
123    }
124    }