Version 20.2 by Marius Dumitru Florea on 2012/08/07

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 {{warning}}
6 This release is not finished yet, this is a work in progress
7 {{/warning}}
8
9 Second milestone of the 4.2 release.
10
11 = New and Noteworthy (since XWiki Enterprise 4.2 Milestone 1) =
12
13 == New field types for email and list of pages ==
14
15 Two new types of class properties have been added:
16
17 * The //Email// type extends the normal //String// type, adding by default a validation regular expression that should accept only a valid email address
18 * The //Page// type extends the normal //DBList// type, and allows to select one or more documents from the current wiki
19
20 These two new properties are still in development, and further improvements will be implemented in the next milestone.
21
22 == Computed class fields ==
23
24 Another new type of class fields adds support for //virtual values// computed live from other class values, data from the database, data obtained from an external service, or practically any other source of data. These fields are non-editable and aren't stored in the database, since they only provide some wiki content that will be rendered each time such a property is displayed.
25
26 Traditionally, this kind of computation would have been written directly in the sheet used to display instances of that class, but putting it in a class field allows easier reuse of the code, since the property will be //displayed// in livetables, when indexing the document in Lucene, when displaying documents in an index page, and so on.
27
28 == Improvements to the Extension Repository Application ==
29
30 We modified the extension sheet to display the release notes for all the available versions of an extension. Check for instance the release notes for the [[Extended TODO Application>>extensions:Extension.Extended Todo Application#HReleaseNotes]]:
31
32 {{image reference="ER-releaseNotes.png"/}}
33
34 == Improvements to Extension Manager ==
35
36 An administrator of a subwiki can now install XAR extension (as long as it does not require a JAR extension).
37
38 = For Developers =
39
40 == Default custom displayers for Easier customization of the way object fields are displayed ==
41
42 While XWiki allowed to specify a custom display for a given field, it was impossible to change the way field types, such as //DateProperty// or //IntegerProperty//, are displayed in general. Now it is possible to define custom displayers at the farm or wiki level, which gives the administrators more power to change the look and feel of the wiki. For example, this allows to use HTML5 input types for dates and numbers, to use custom suggestions for //list of users// fields, or to always add a validation input for all the //password// field types.
43
44 To use this feature, first you need to compute a //type// name for your property type. This is obtained from the java class simple name, removing the ##Class## suffix, and lowercasing. For example, for numbers the java class used is ##com.xpn.xwiki.objects.classes.NumberClass##, with the simple name ##NumberClass##, which gives ##number## as the type name. For a database list, we get ##dblist## from ##DBListClass##.
45
46 Next, there are three places where a default custom displayer can be defined.
47
48 1. If a document whose name is the //type// capitalized and suffixed with ##Displayer## exists in the ##XWiki## space in the current wiki, then its content is used as the default custom displayer for that type of property. For example, ##localwiki:XWiki.NumberDisplayer## and ##localwiki:XWiki.DblistDisplayer##.
49 1. If a document whose name is the //type// capitalized and suffixed with ##Displayer## exists in the ##XWiki## space in the main wiki, then its content is used as the default custom displayer for that type of property. For example, ##xwiki:XWiki.NumberDisplayer## and ##xwiki:XWiki.DblistDisplayer##.
50 1. If a velocity template whose name is the //type// suffixed with ##.vm## exists in the current skin, then it is evaluated as the default custom displayer for that type of property. A skin file can be defined in many places, such as an attachment of a skin document, a file in a named skin on the filesystem, or a file in the ##templates/## directory.
51
52 If a specific class property provides custom display code in the XClass, then that code takes priority over an eventual default custom displayer for that property.
53
54 As with property custom displayers, when evaluating the display code several objects are placed in the context:
55
56 * ##name## is the name of the property being displayed
57 * ##prefix## is the HTML name prefix to append to an eventual input field name, and contains the XClass name, an underscore, the object number, and another underscore, for example ##XWiki.XWikiUsers_0_##
58 * ##object## is the object owning the displayed property, an instance of the public ##com.xpn.xwiki.api.Object## class
59 * ##type## is the target display type, one of ##view##, ##edit##, ##hidden## or ##search##
60
61 == New API to manipulate log level ==
62
63 Several method as been added to ##org.xwiki.logging.LoggerManager## to manipulate the log level of registered loggers.
64
65 {{code language="java"}}
66 /**
67 * Associate the passed logger to the passed log level.
68 *
69 * @param loggerName the logger
70 * @param level the level of the logger
71 */
72 void setLoggerLevel(String loggerName, LogLevel level);
73
74 /**
75 * @param loggerName the logger
76 * @return the log level associated to the logger
77 */
78 LogLevel getLoggerLevel(String loggerName);
79
80 /**
81 * @return all the registered loggers
82 */
83 Collection<Logger> getLoggers();
84 {{/code}}
85
86 == Upgrades ==
87
88 The following dependencies have been upgraded:
89
90 * GWT 2.5 RC1
91 * Selenium 2.25
92
93 == Miscellaneous ==
94
95 * Office Importer/Exporter encoding issues have been fixed ({{jira style="enum" url="http://jira.xwiki.org"}}XWIKI-6377
96 XWIKI-8007{{/jira}}).
97
98 == Translations ==
99
100 The following translations have been updated:
101
102 {{language codes="da, fr, hu, it, lv, pt_BR, ru, sv"/}}
103
104 = Tested Browsers =
105
106 Here's the list of browsers tested with this version (i.e. browsers that we've tested as working - Check the list of [[supported browsers>>dev:Community.BrowserSupportStrategy]]):
107
108 {{velocity}}
109 ## name = iexplorer, firefox, chrome, safari, opera
110 {{/velocity}}
111
112 {{browser name="firefox" version="11.0"/}}
113
114 = Known issues =
115
116 * [[Bugs we know about>>http://jira.xwiki.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=category+%3D+%22Top+Level+Projects%22+AND+issuetype+%3D+Bug+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC]]
117
118 = Backward Compatibility and Migration Notes =
119
120 == General Notes ==
121
122 You may also want to [[import the default wiki XAR>>Main.Download]] in order to benefit from all the improvements listed above.
123
124 {{warning}}
125 Always make sure you compare your ##xwiki.cfg## and ##xwiki.properties## files with the newest version since some configuration parameters were added. Note that you should add ##xwiki.store.migration=1## so that XWiki will attempt to automatically migrate your current database to the new schema. Make sure you backup your Database before doing anything.
126 {{/warning}}
127
128 == API Breakages ==
129
130 The following APIs were modified since 4.1.3:
131
132 * The logging module is new and is still considered a "young API". Added new methods to manipulate loggers levels.(((
133 {{code language="none"}}
134 org.xwiki.logging.LoggerManager: Method 'public org.xwiki.logging.LogLevel getLoggerLevel(java.lang.String)' has been added to an interface
135 org.xwiki.logging.LoggerManager: Method 'public java.util.Collection getLoggers()' has been added to an interface
136 org.xwiki.logging.LoggerManager: Method 'public void setLoggerLevel(java.lang.String, org.xwiki.logging.LogLevel)' has been added to an interface
137 {{/code}}
138 )))
139 * The Job module is new and is still considered a "young API". Moved from Exception to Throwable parameter for extending jobs. Also added two new methods to check and remove custom properties.(((
140 {{code language="none"}}
141 org.xwiki.job.AbstractJob: Parameter 1 of 'protected void jobFinished(java.lang.Exception)' has changed its type to java.lang.Throwable
142 org.xwiki.job.Request: Method 'public boolean containsProperty(java.lang.String)' has been added to an interface
143 org.xwiki.job.Request: Method 'public java.lang.Object removeProperty(java.lang.String)' has been added to an interface
144 {{/code}}
145 )))
146 * New ##InstalledExtension#isValid()## method.(((
147 {{code language="none"}}
148 org.xwiki.extension.InstalledExtension: Method 'public boolean isValid(java.lang.String)' has been added to an interface
149 {{/code}}
150 )))
151 * The Extension module is relatively new and is still undergoing some API tuning. New method to access environment extension. Also added new methods to execute custom checking before installing/uninstalling an extension.(((
152 {{code language="none"}}
153 org.xwiki.extension.repository.CoreExtensionRepository: Method 'public org.xwiki.extension.CoreExtension getEnvironmentExtension()' has been added to an interface
154 org.xwiki.extension.handler.ExtensionHandler: Method 'public void checkInstall(org.xwiki.extension.Extension, java.lang.String, org.xwiki.job.Request)' has been added to an interface
155 org.xwiki.extension.handler.ExtensionHandler: Method 'public void checkUninstall(org.xwiki.extension.InstalledExtension, java.lang.String, org.xwiki.job.Request)' has been added to an interface
156 {{/code}}
157 )))
158 * Fix method name typo (adding new method). This interface is not really supposed to be implemented except by internal class.(((
159 {{code language="none"}}
160 org.xwiki.properties.PropertyDescriptor: Method 'public java.lang.reflect.Field getField()' has been added to an interface
161 {{/code}}
162 )))
163 * Added method to get the author of the macro.(((
164 {{code language="none"}}
165 org.xwiki.rendering.macro.wikibridge.WikiMacro: Method 'public org.xwiki.model.reference.DocumentReference getAuthorReference()' has been added to an interface
166 {{/code}}
167 )))
168 * Add a method to the oldcore/wikimacro bridge.(((
169 {{code language="none"}}
170 org.xwiki.rendering.macro.wikibridge.WikiMacroFactory: Method 'public boolean isAllowed(org.xwiki.model.reference.DocumentReference, org.xwiki.rendering.macro.wikibridge.WikiMacroVisibility)' has been added to an interface
171 {{/code}}
172 )))
173 * These classes below have never been used. It was supposed to be the start of the removal of Struts but since it hasn't progressed so far we're removing stray code from master. Experiments should be done on feature branches.(((
174 {{code language="none"}}
175 org.xwiki.container.servlet.XWikiServlet: Class org.xwiki.container.servlet.XWikiServlet removed
176 {{/code}}
177 )))
178 * Removed protected method (registerWikiMacros) that was not supposed to be used from outside (was protected for unit tests hacks).(((
179 {{code language="none"}}
180 com.xpn.xwiki.XWiki: Method 'protected void registerWikiMacros()' has been removed
181 {{/code}}
182 )))
183 * Chart plugin has been moved from oldcore to its own module. There's no API breakage for the user.(((
184 {{code language="none"}}
185 com.xpn.xwiki.plugin.charts.Chart: Class com.xpn.xwiki.plugin.charts.Chart removed
186 com.xpn.xwiki.plugin.charts.ChartCustomizer: Class com.xpn.xwiki.plugin.charts.ChartCustomizer removed
187 com.xpn.xwiki.plugin.charts.ChartImpl: Class com.xpn.xwiki.plugin.charts.ChartImpl removed
188 com.xpn.xwiki.plugin.charts.ChartingMacro: Class com.xpn.xwiki.plugin.charts.ChartingMacro removed
189 com.xpn.xwiki.plugin.charts.ChartingPlugin: Class com.xpn.xwiki.plugin.charts.ChartingPlugin removed
190 com.xpn.xwiki.plugin.charts.ChartingPluginApi: Class com.xpn.xwiki.plugin.charts.ChartingPluginApi removed
191 com.xpn.xwiki.plugin.charts.CustomXWikiRenderingEngine: Class com.xpn.xwiki.plugin.charts.CustomXWikiRenderingEngine removed
192 com.xpn.xwiki.plugin.charts.RadeoxHelper: Class com.xpn.xwiki.plugin.charts.RadeoxHelper removed
193 com.xpn.xwiki.plugin.charts.actions.ChartingAction: Class com.xpn.xwiki.plugin.charts.actions.ChartingAction removed
194 com.xpn.xwiki.plugin.charts.exceptions.ChartingException: Class com.xpn.xwiki.plugin.charts.exceptions.ChartingException removed
195 com.xpn.xwiki.plugin.charts.exceptions.ColumnIndexOutOfBoundsException: Class com.xpn.xwiki.plugin.charts.exceptions.ColumnIndexOutOfBoundsException removed
196 com.xpn.xwiki.plugin.charts.exceptions.DataSourceException: Class com.xpn.xwiki.plugin.charts.exceptions.DataSourceException removed
197 com.xpn.xwiki.plugin.charts.exceptions.EmptyDataSourceException: Class com.xpn.xwiki.plugin.charts.exceptions.EmptyDataSourceException removed
198 com.xpn.xwiki.plugin.charts.exceptions.GenerateException: Class com.xpn.xwiki.plugin.charts.exceptions.GenerateException removed
199 com.xpn.xwiki.plugin.charts.exceptions.InvalidArgumentException: Class com.xpn.xwiki.plugin.charts.exceptions.InvalidArgumentException removed
200 com.xpn.xwiki.plugin.charts.exceptions.InvalidParamException: Class com.xpn.xwiki.plugin.charts.exceptions.InvalidParamException removed
201 com.xpn.xwiki.plugin.charts.exceptions.MissingArgumentException: Class com.xpn.xwiki.plugin.charts.exceptions.MissingArgumentException removed
202 com.xpn.xwiki.plugin.charts.exceptions.MissingDataSourceException: Class com.xpn.xwiki.plugin.charts.exceptions.MissingDataSourceException removed
203 com.xpn.xwiki.plugin.charts.exceptions.MissingMandatoryParamException: Class com.xpn.xwiki.plugin.charts.exceptions.MissingMandatoryParamException removed
204 com.xpn.xwiki.plugin.charts.exceptions.NoHeaderColumnException: Class com.xpn.xwiki.plugin.charts.exceptions.NoHeaderColumnException removed
205 com.xpn.xwiki.plugin.charts.exceptions.NoHeaderRowException: Class com.xpn.xwiki.plugin.charts.exceptions.NoHeaderRowException removed
206 com.xpn.xwiki.plugin.charts.exceptions.ParamException: Class com.xpn.xwiki.plugin.charts.exceptions.ParamException removed
207 com.xpn.xwiki.plugin.charts.exceptions.RowIndexOutOfBoundsException: Class com.xpn.xwiki.plugin.charts.exceptions.RowIndexOutOfBoundsException removed
208 com.xpn.xwiki.plugin.charts.params.AbstractChartParam: Class com.xpn.xwiki.plugin.charts.params.AbstractChartParam removed
209 com.xpn.xwiki.plugin.charts.params.BooleanChartParam: Class com.xpn.xwiki.plugin.charts.params.BooleanChartParam removed
210 com.xpn.xwiki.plugin.charts.params.CategoryLabelPositionsChartParam: Class com.xpn.xwiki.plugin.charts.params.CategoryLabelPositionsChartParam removed
211 com.xpn.xwiki.plugin.charts.params.ChartParam: Class com.xpn.xwiki.plugin.charts.params.ChartParam removed
212 com.xpn.xwiki.plugin.charts.params.ChartParams: Class com.xpn.xwiki.plugin.charts.params.ChartParams removed
213 com.xpn.xwiki.plugin.charts.params.ChoiceChartParam: Class com.xpn.xwiki.plugin.charts.params.ChoiceChartParam removed
214 com.xpn.xwiki.plugin.charts.params.ColorChartParam: Class com.xpn.xwiki.plugin.charts.params.ColorChartParam removed
215 com.xpn.xwiki.plugin.charts.params.DateChartParam: Class com.xpn.xwiki.plugin.charts.params.DateChartParam removed
216 com.xpn.xwiki.plugin.charts.params.DateFormatChartParam: Class com.xpn.xwiki.plugin.charts.params.DateFormatChartParam removed
217 com.xpn.xwiki.plugin.charts.params.DateTickMarkPositionChartParam: Class com.xpn.xwiki.plugin.charts.params.DateTickMarkPositionChartParam removed
218 com.xpn.xwiki.plugin.charts.params.DateTickUnitChartParam: Class com.xpn.xwiki.plugin.charts.params.DateTickUnitChartParam removed
219 com.xpn.xwiki.plugin.charts.params.DefaultChartParams: Class com.xpn.xwiki.plugin.charts.params.DefaultChartParams removed
220 com.xpn.xwiki.plugin.charts.params.DefaultChartParams2: Class com.xpn.xwiki.plugin.charts.params.DefaultChartParams2 removed
221 com.xpn.xwiki.plugin.charts.params.DoubleChartParam: Class com.xpn.xwiki.plugin.charts.params.DoubleChartParam removed
222 com.xpn.xwiki.plugin.charts.params.FloatChartParam: Class com.xpn.xwiki.plugin.charts.params.FloatChartParam removed
223 com.xpn.xwiki.plugin.charts.params.FontChartParam: Class com.xpn.xwiki.plugin.charts.params.FontChartParam removed
224 com.xpn.xwiki.plugin.charts.params.HorizontalAlignmentChartParam: Class com.xpn.xwiki.plugin.charts.params.HorizontalAlignmentChartParam removed
225 com.xpn.xwiki.plugin.charts.params.IntegerChartParam: Class com.xpn.xwiki.plugin.charts.params.IntegerChartParam removed
226 com.xpn.xwiki.plugin.charts.params.ListChartParam: Class com.xpn.xwiki.plugin.charts.params.ListChartParam removed
227 com.xpn.xwiki.plugin.charts.params.LocaleChartParam: Class com.xpn.xwiki.plugin.charts.params.LocaleChartParam removed
228 com.xpn.xwiki.plugin.charts.params.MapChartParam: Class com.xpn.xwiki.plugin.charts.params.MapChartParam removed
229 com.xpn.xwiki.plugin.charts.params.NumberFormatChartParam: Class com.xpn.xwiki.plugin.charts.params.NumberFormatChartParam removed
230 com.xpn.xwiki.plugin.charts.params.NumberTickUnitChartParam: Class com.xpn.xwiki.plugin.charts.params.NumberTickUnitChartParam removed
231 com.xpn.xwiki.plugin.charts.params.PlotOrientationChartParam: Class com.xpn.xwiki.plugin.charts.params.PlotOrientationChartParam removed
232 com.xpn.xwiki.plugin.charts.params.Point2DChartParam: Class com.xpn.xwiki.plugin.charts.params.Point2DChartParam removed
233 com.xpn.xwiki.plugin.charts.params.RangeTypeChartParam: Class com.xpn.xwiki.plugin.charts.params.RangeTypeChartParam removed
234 com.xpn.xwiki.plugin.charts.params.RectangleAnchorChartParam: Class com.xpn.xwiki.plugin.charts.params.RectangleAnchorChartParam removed
235 com.xpn.xwiki.plugin.charts.params.RectangleEdgeChartParam: Class com.xpn.xwiki.plugin.charts.params.RectangleEdgeChartParam removed
236 com.xpn.xwiki.plugin.charts.params.RectangleInsetsChartParam: Class com.xpn.xwiki.plugin.charts.params.RectangleInsetsChartParam removed
237 com.xpn.xwiki.plugin.charts.params.RendererClassChartParam: Class com.xpn.xwiki.plugin.charts.params.RendererClassChartParam removed
238 com.xpn.xwiki.plugin.charts.params.ShapeChartParam: Class com.xpn.xwiki.plugin.charts.params.ShapeChartParam removed
239 com.xpn.xwiki.plugin.charts.params.StringChartParam: Class com.xpn.xwiki.plugin.charts.params.StringChartParam removed
240 com.xpn.xwiki.plugin.charts.params.StrokeChartParam: Class com.xpn.xwiki.plugin.charts.params.StrokeChartParam removed
241 com.xpn.xwiki.plugin.charts.params.TimePeriodClassChartParam: Class com.xpn.xwiki.plugin.charts.params.TimePeriodClassChartParam removed
242 com.xpn.xwiki.plugin.charts.params.VerticalAlignmentChartParam: Class com.xpn.xwiki.plugin.charts.params.VerticalAlignmentChartParam removed
243 com.xpn.xwiki.plugin.charts.plots.AreaPlotFactory: Class com.xpn.xwiki.plugin.charts.plots.AreaPlotFactory removed
244 com.xpn.xwiki.plugin.charts.plots.BarPlotFactory: Class com.xpn.xwiki.plugin.charts.plots.BarPlotFactory removed
245 com.xpn.xwiki.plugin.charts.plots.CategoryPlotFactory: Class com.xpn.xwiki.plugin.charts.plots.CategoryPlotFactory removed
246 com.xpn.xwiki.plugin.charts.plots.LinePlotFactory: Class com.xpn.xwiki.plugin.charts.plots.LinePlotFactory removed
247 com.xpn.xwiki.plugin.charts.plots.PiePlotFactory: Class com.xpn.xwiki.plugin.charts.plots.PiePlotFactory removed
248 com.xpn.xwiki.plugin.charts.plots.PlotFactory: Class com.xpn.xwiki.plugin.charts.plots.PlotFactory removed
249 com.xpn.xwiki.plugin.charts.plots.TableXYDatasetFactory: Class com.xpn.xwiki.plugin.charts.plots.TableXYDatasetFactory removed
250 com.xpn.xwiki.plugin.charts.plots.TimePlotFactory: Class com.xpn.xwiki.plugin.charts.plots.TimePlotFactory removed
251 com.xpn.xwiki.plugin.charts.plots.TimeSeriesCollectionFactory: Class com.xpn.xwiki.plugin.charts.plots.TimeSeriesCollectionFactory removed
252 com.xpn.xwiki.plugin.charts.plots.XYPlotFactory: Class com.xpn.xwiki.plugin.charts.plots.XYPlotFactory removed
253 com.xpn.xwiki.plugin.charts.source.DataSource: Class com.xpn.xwiki.plugin.charts.source.DataSource removed
254 com.xpn.xwiki.plugin.charts.source.DataSourceFactory: Class com.xpn.xwiki.plugin.charts.source.DataSourceFactory removed
255 com.xpn.xwiki.plugin.charts.source.DefaultDataSource: Class com.xpn.xwiki.plugin.charts.source.DefaultDataSource removed
256 com.xpn.xwiki.plugin.charts.source.MainDataSourceFactory: Class com.xpn.xwiki.plugin.charts.source.MainDataSourceFactory removed
257 com.xpn.xwiki.plugin.charts.source.ObjectDataSourceFactory: Class com.xpn.xwiki.plugin.charts.source.ObjectDataSourceFactory removed
258 com.xpn.xwiki.plugin.charts.source.ObjectidDataSourceFactory: Class com.xpn.xwiki.plugin.charts.source.ObjectidDataSourceFactory removed
259 com.xpn.xwiki.plugin.charts.source.TableDataSource: Class com.xpn.xwiki.plugin.charts.source.TableDataSource removed
260 com.xpn.xwiki.plugin.charts.source.TableDataSourceFactory: Class com.xpn.xwiki.plugin.charts.source.TableDataSourceFactory removed
261 com.xpn.xwiki.plugin.charts.wizard.DatasourceDefaultsHelper: Class com.xpn.xwiki.plugin.charts.wizard.DatasourceDefaultsHelper removed
262 com.xpn.xwiki.plugin.charts.wizard.FontHelper: Class com.xpn.xwiki.plugin.charts.wizard.FontHelper removed
263 {{/code}}
264 )))
265 * {{todo/}}Andreas, please explain why we have to break backward compatibility for the Chart module.(((
266 {{code language="none"}}
267 org.xwiki.chart.model.ChartModel: Method 'public org.jfree.chart.axis.Axis getAxis(int)' has been added to an interface
268 org.xwiki.chart.model.ChartModel: Method 'public java.lang.Number getCellValue(int, int)' has been removed
269 org.xwiki.chart.model.ChartModel: Method 'public int getColumnCount()' has been removed
270 org.xwiki.chart.model.ChartModel: Method 'public java.lang.String getColumnHeader(int)' has been removed
271 org.xwiki.chart.model.ChartModel: Method 'public org.jfree.data.general.Dataset getDataset()' has been added to an interface
272 org.xwiki.chart.model.ChartModel: Method 'public int getRowCount()' has been removed
273 org.xwiki.chart.model.ChartModel: Method 'public java.lang.String getRowHeader(int)' has been removed
274 org.xwiki.chart.model.DefaultChartModel: Class org.xwiki.chart.model.DefaultChartModel removed
275 org.xwiki.rendering.macro.chart.ChartDataSource: Field PARAMS has been removed, but it was previously a constant
276 org.xwiki.rendering.macro.chart.ChartDataSource: Field SOURCE has been removed, but it was previously a constant
277 {{/code}}
278 )))

Get Connected