1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package com.xpn.xwiki.internal.filter.output

File UserInstanceOutputProperties.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart6.png
69% of files have more coverage

Code metrics

0
12
11
1
163
69
11
0.92
1.09
11
1

Classes

Class Line # Actions
UserInstanceOutputProperties 31 12 0% 11 11
0.521739152.2%
 

Contributing tests

This file is covered by 2 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 com.xpn.xwiki.internal.filter.output;
21   
22    import org.xwiki.filter.instance.output.InstanceOutputProperties;
23    import org.xwiki.model.reference.DocumentReference;
24    import org.xwiki.properties.annotation.PropertyDescription;
25    import org.xwiki.properties.annotation.PropertyName;
26   
27    /**
28    * @version $Id: 13e2b105be8af9682e53f71acaa2a9b822c84c03 $
29    * @since 6.2M1
30    */
 
31    public class UserInstanceOutputProperties extends InstanceOutputProperties
32    {
33    /**
34    * @see #getSaveComment()
35    */
36    private String saveComment = "Import";
37   
38    /**
39    * @see #getAuthor()
40    */
41    private DocumentReference author;
42   
43    /**
44    * @see #isAuthorSet()
45    */
46    private boolean authorSet;
47   
48    /**
49    * @see #isVersionPreserved()
50    */
51    private boolean versionPreserved;
52   
53    /**
54    * @see #getGroupPrefix()
55    */
56    private String groupPrefix = "";
57   
58    /**
59    * @see #getGroupSuffix()
60    */
61    private String groupSuffix = "";
62   
63    /**
64    * @return the comment to use when saving users
65    */
 
66  18 toggle @PropertyName("Save comment")
67    @PropertyDescription("The comment to use when saving a user")
68    public String getSaveComment()
69    {
70  18 return this.saveComment;
71    }
72   
73    /**
74    * @param saveComment the version comment to use when saving users
75    */
 
76  0 toggle public void setSaveComment(String saveComment)
77    {
78  0 this.saveComment = saveComment;
79    }
80   
81    /**
82    * @return the author to use when saving users
83    */
 
84  12 toggle @PropertyName("Save author")
85    @PropertyDescription("The author to use when saving a user")
86    public DocumentReference getAuthor()
87    {
88  12 return this.author;
89    }
90   
91    /**
92    * @param author the author to use when saving users
93    */
 
94  0 toggle public void setAuthor(DocumentReference author)
95    {
96  0 this.author = author;
97  0 this.authorSet = true;
98    }
99   
100    /**
101    * @return true if the author have been explicitly set
102    */
 
103  0 toggle public boolean isAuthorSet()
104    {
105  0 return this.authorSet;
106    }
107   
108    /**
109    * @return Indicate if the versions related informations coming from the events should be kept
110    * @since 6.2M1
111    */
 
112  15 toggle @PropertyName("Preserve version")
113    @PropertyDescription("Indicate if the versions related informations comming from the events should be kept")
114    public boolean isVersionPreserved()
115    {
116  15 return this.versionPreserved;
117    }
118   
119    /**
120    * @param versionPreserved Indicate if the versions related informations coming from the events should be kept
121    * @since 6.2M1
122    */
 
123  2 toggle public void setVersionPreserved(boolean versionPreserved)
124    {
125  2 this.versionPreserved = versionPreserved;
126    }
127   
128    /**
129    * @return the prefix to add before each new group name
130    */
 
131  13 toggle @PropertyName("Group name prefix")
132    @PropertyDescription("The prefix to add before each new group name")
133    public String getGroupPrefix()
134    {
135  13 return this.groupPrefix;
136    }
137   
138    /**
139    * @param groupPrefix The prefix to add before each new group name
140    */
 
141  0 toggle public void setGroupPrefix(String groupPrefix)
142    {
143  0 this.groupPrefix = groupPrefix;
144    }
145   
146    /**
147    * @return The suffix to add after each new group name
148    */
 
149  13 toggle @PropertyName("Group name suffix")
150    @PropertyDescription("The suffix to add after each new group name")
151    public String getGroupSuffix()
152    {
153  13 return this.groupSuffix;
154    }
155   
156    /**
157    * @param groupSuffix The prefix to add before each new group
158    */
 
159  0 toggle public void setGroupSuffix(String groupSuffix)
160    {
161  0 this.groupSuffix = groupSuffix;
162    }
163    }