1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.filter.xar.output

File XAROutputProperties.java

 

Coverage histogram

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

Code metrics

0
18
18
1
242
106
18
1
1
18
1

Classes

Class Line # Actions
XAROutputProperties 32 18 0% 18 0
1.0100%
 

Contributing tests

This file is covered by 38 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.output;
21   
22    import org.xwiki.filter.xml.output.XMLOutputProperties;
23    import org.xwiki.properties.annotation.PropertyDescription;
24    import org.xwiki.properties.annotation.PropertyName;
25   
26    /**
27    * XAR output properties.
28    *
29    * @version $Id: d1b5faca3d16ecaa5e5700c649f4c8c12d48aeac $
30    * @since 6.2M1
31    */
 
32    public class XAROutputProperties extends XMLOutputProperties
33    {
34    /**
35    * @see #isPreserveVersion()
36    */
37    private boolean preserveVersion = true;
38   
39    /**
40    * @see #isForceDocument()
41    */
42    private boolean forceDocument;
43   
44    /**
45    * @see #getPackageName()
46    */
47    private String packageName;
48   
49    /**
50    * @see #getPackageDescription()
51    */
52    private String packageDescription;
53   
54    /**
55    * @see #getPackageLicense()
56    */
57    private String packageLicense;
58   
59    /**
60    * @see #getPackageAuthor()
61    */
62    private String packageAuthor;
63   
64    /**
65    * @see #getPackageVersion()
66    */
67    private String packageVersion;
68   
69    /**
70    * @see #isPackageBackupPack()
71    */
72    private boolean packageBackupPack;
73   
74    /**
75    * @see #getPackageExtensionId()
76    */
77    private String packageExtensionId;
78   
79    /**
80    * @return Indicate if all revisions related informations should be serialized
81    */
 
82  15105 toggle @PropertyName("Preserve revisions informations")
83    @PropertyDescription("Indicate if all revisions related informations should be serialized")
84    public boolean isPreserveVersion()
85    {
86  15105 return this.preserveVersion;
87    }
88   
89    /**
90    * @param preserveVersion Indicate if all revisions related informations should be serialized
91    */
 
92  13273 toggle public void setPreserveVersion(boolean preserveVersion)
93    {
94  13273 this.preserveVersion = preserveVersion;
95    }
96   
97    /**
98    * @return true if a unique document should be serialized instead of a XAR package
99    */
 
100  13420 toggle @PropertyName("Force document")
101    @PropertyDescription("Force serializing a unique document XML instead of a XAR package")
102    public boolean isForceDocument()
103    {
104  13420 return this.forceDocument;
105    }
106   
107    /**
108    * @param forceDocument true if a unique document should be serialized instead of a XAR package
109    */
 
110  15153 toggle public void setForceDocument(boolean forceDocument)
111    {
112  15153 this.forceDocument = forceDocument;
113    }
114   
115    // package.xml
116   
117    /**
118    * @return Indicate if all revisions related informations should be serialized
119    */
 
120  148 toggle @PropertyName("Package Name")
121    @PropertyDescription("The name to put in package.xml")
122    public String getPackageName()
123    {
124  148 return this.packageName;
125    }
126   
127    /**
128    * @param packageName Indicate if all revisions related informations should be serialized
129    */
 
130  6 toggle public void setPackageName(String packageName)
131    {
132  6 this.packageName = packageName;
133    }
134   
135    /**
136    * @return The description to put in package.xml
137    */
 
138  144 toggle @PropertyName("Package description")
139    @PropertyDescription("The description to put in package.xml")
140    public String getPackageDescription()
141    {
142  144 return this.packageDescription;
143    }
144   
145    /**
146    * @param packageDescription The description to put in package.xml
147    */
 
148  1 toggle public void setPackageDescription(String packageDescription)
149    {
150  1 this.packageDescription = packageDescription;
151    }
152   
153    /**
154    * @return "The licence to put in package.xml
155    */
 
156  144 toggle @PropertyName("Package license")
157    @PropertyDescription("The licence to put in package.xml")
158    public String getPackageLicense()
159    {
160  144 return this.packageLicense;
161    }
162   
163    /**
164    * @param packageLicense "The licence to put in package.xml
165    */
 
166  1 toggle public void setPackageLicense(String packageLicense)
167    {
168  1 this.packageLicense = packageLicense;
169    }
170   
171    /**
172    * @return The author to put in package.xml
173    */
 
174  144 toggle @PropertyName("Package author")
175    @PropertyDescription("The author to put in package.xml")
176    public String getPackageAuthor()
177    {
178  144 return this.packageAuthor;
179    }
180   
181    /**
182    * @param packageAuthor The author to put in package.xml
183    */
 
184  1 toggle public void setPackageAuthor(String packageAuthor)
185    {
186  1 this.packageAuthor = packageAuthor;
187    }
188   
189    /**
190    * @return The version to put in package.xml
191    */
 
192  144 toggle @PropertyName("Package version")
193    @PropertyDescription("The version to put in package.xml")
194    public String getPackageVersion()
195    {
196  144 return this.packageVersion;
197    }
198   
199    /**
200    * @param packageVersion The version to put in package.xml
201    */
 
202  1 toggle public void setPackageVersion(String packageVersion)
203    {
204  1 this.packageVersion = packageVersion;
205    }
206   
207    /**
208    * @return Indicate in package.xml if the XAR is a backup pack
209    */
 
210  144 toggle @PropertyName("Package backuppack")
211    @PropertyDescription("Indicate in package.xml if the XAR is a backup pack")
212    public boolean isPackageBackupPack()
213    {
214  144 return this.packageBackupPack;
215    }
216   
217    /**
218    * @param packageBackupPack Indicate in package.xml if the XAR is a backup pack
219    */
 
220  6 toggle public void setPackageBackupPack(boolean packageBackupPack)
221    {
222  6 this.packageBackupPack = packageBackupPack;
223    }
224   
225    /**
226    * @return the id of the extension the XAR contains
227    */
 
228  144 toggle @PropertyName("Extension id")
229    @PropertyDescription("The id of the extension the XAR contains")
230    public String getPackageExtensionId()
231    {
232  144 return this.packageExtensionId;
233    }
234   
235    /**
236    * @param packageExtensionId the id of the extension the XAR contains
237    */
 
238  1 toggle public void setPackageExtensionId(String packageExtensionId)
239    {
240  1 this.packageExtensionId = packageExtensionId;
241    }
242    }