Changes for page Release Notes for XWiki 7.4
Last modified by Thomas Mortagne on 2023/10/13
From version 15.1
edited by Guillaume Delhumeau
on 2015/12/28
on 2015/12/28
Change comment:
There is no comment for this version
To version 16.1
edited by Guillaume Delhumeau
on 2015/12/28
on 2015/12/28
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -110,6 +110,67 @@ 110 110 111 111 A public ##org.xwiki.job.AbstractJob## (and corresponding ##AbstractJobStatus##) is now provided to help implementing a Job. An ##AbstractJob## class already existed since a long time but it was in an internal package. 112 112 113 +== New lifespan LRU Cache setup == 114 + 115 +It's now possible to define the maximum time to live since the entry is put in the cache. It used to be possible to set it only since the last time the value was used. 116 + 117 +{{code language="java"}} 118 +// Configure cache eviction policy 119 +LRUEvictionConfiguration lru = new LRUEvictionConfiguration(); 120 +// Set maximum size of the cache as 1000 entries 121 +lru.setMaxEntries(1000); 122 +// Set the maximum time to live since when the entry is used to 1 hour 123 +lru.setMaxIdle(3600) 124 +// Set the maximum time to live since when the entry is put in the cache to 1 hour 125 +lru.setLifespan(3600) 126 +{{/code}} 127 + 128 +[[Cache Macro>>extensions:Extension.Cache Macro]] and [[Rendering Cache>>platform:AdminGuide.Performances||anchor="HRenderingcache"]] are now based on this behavior. 129 + 130 +== VFS API == 131 + 132 +{{warning}} 133 +Right now the [[VFS API is missing authorization checks>>http://jira.xwiki.org/browse/XWIKI-12912]], meaning that you should use it only for public archives. 134 +{{/warning}} 135 + 136 +Replacement of the [[Zip Explorer Plugin>>extensions:Extension.ZIP Explorer Plugin]]. API to access the content of archives files (zip, jar, gzip, tar, etc) located as attachments in wiki pages or elsewhere (external URLs, file system, et). 137 + 138 +In addition a new [[Velocity Tool>>extensions:Extension.Velocity Module||anchor="HVelocityTools"]] was added in order to be able to use a portion of the NIO2 API from Velocity: ##niotool##. 139 + 140 +See [[VFS API>>extensions:Extension.VFS API]] and [[VFS Tree Macro>>extensions:Extension.VFS Tree Macro]] for more details. Some API examples: 141 + 142 +{{code language="velocity"}} 143 +{{velocity}} 144 +## Get the URL to access the content of a file inside a zip: 145 +[[link to file in zip>>$services.vfs.url("attach:Sandbox.WebHome@vma.txt.zip/vma.txt")]] 146 + 147 +## Display inline an image from a zip attached to a wiki page: 148 +[[image:path:$services.vfs.url("attach:Sandbox.WebHome@test.zip/test.png")]] 149 + 150 +## Read the content of a file inside a zip attached to a page: 151 +$stringtool.toString($niotool.readAllBytes("attach:Sandbox.WebHome@vma.txt.zip/vma.txt"), "utf-8") 152 + 153 +## List all entries inside a zip attached to a page: 154 +#set ($dirStream = $niotool.newDirectoryStream("attach:Sandbox.WebHome@vma.txt.zip/")) 155 +#foreach ($entry in $dirStream) 156 + * {{{$entry}}} - $niotool.isDirectory($entry) 157 +#end 158 +{{/velocity}} 159 + 160 +{{vfsTree root="attach:Sandbox.WebHome@vma.txt.zip/"/}} 161 +{{/code}} 162 + 163 +Example of using the ##vfsTree## Macro: 164 + 165 +{{code language="none"}} 166 +{{vfsTree root="attach:Sandbox.WebHome@vma.txt.zip/"/}} 167 +{{/code}} 168 + 169 +Results in: 170 + 171 +{{image reference="ReleaseNotesXWiki74M2@vfstree.png"/}} 172 + 173 + 113 113 == Miscellaneous == 114 114 115 115 * A new ##extractFirstReference(EntityType)## API has been added to ##EntityReference##: Extract the first entity of the given type from this one by traversing the current entity to the root. This differentiates it from ##extractReference(EntityType)## which extracts the last entity of the given type. ... ... @@ -125,7 +125,59 @@ 125 125 {{/code}} 126 126 ))) 127 127 * Temporary resources can now be forced to be downloaded by using the ##force-download=1## URL parameter 189 +* [[WebJars URL format>>extensions:Extension.WebJars Integration||anchor="HURLFormat"]] now supports a ##wiki## query string parameter to specify the wiki in which the webjars resource is available. For example: {{code language="none"}}/xwiki/webjars/AjaxQ/0.0.2/ajaxq.js?wiki=mywiki{{/code}} 190 +* The default link behaviour can be disabled for a tree node, when you use the [[Tree Widget>>extensions:Extension.Tree Widget]], by using the 'jstree-no-link' CSS class on the node anchor, which can be set from the node JSON:((( 191 +{{code language="none"}} 192 +{ 193 + ... (node JSON) ... 194 + 'a_attr': { 195 + 'class': 'jstree-no-link', 196 + 'href': 'some/url' 197 + } 198 +} 199 +{{/code}} 200 +))) 201 +* The ##$regextool## [[Velocity Tool>>extensions:Extension.Velocity Module||anchor="HVelocityTools"]] has a new method:((( 202 +{{code language="java"}} 203 +/** 204 + * @param content the content to parse 205 + * @param regex the regular expression to look for in the passed content 206 + * @return an empty list if the passed regular expression doesn't match the content, several {@link RegexResult} 207 + * objects containing the matched position and matched content for all capturing groups and sub-groups 208 + * otherwise 209 + */ 210 +public List<List<RegexResult>> findAll(String content, String regex) 211 +{{/code}} 128 128 213 +We had to add a new method because the existing ##RegexTool#find(String, String)## returns information about only the first capturing group. Here's a test to show how the new method works: 214 + 215 +{{code language="java"}} 216 +@Test 217 +public void findAll() 218 +{ 219 + RegexTool tool = new RegexTool(); 220 + List<List<RegexResult>> result = 221 + tool.findAll("one :two three (:four) five :six seven=:eight", ":(\\w+) (\\w+)"); 222 + 223 + Assert.assertEquals(2, result.size()); 224 + Assert.assertEquals(":two three", result.get(0).get(0).getGroup()); 225 + Assert.assertEquals(":six seven", result.get(1).get(0).getGroup()); 226 + 227 + Assert.assertEquals(3, result.get(0).size()); 228 + Assert.assertEquals("two", result.get(0).get(1).getGroup()); 229 + Assert.assertEquals("three", result.get(0).get(2).getGroup()); 230 + 231 + Assert.assertEquals(3, result.get(1).size()); 232 + Assert.assertEquals("six", result.get(1).get(1).getGroup()); 233 + Assert.assertEquals("seven", result.get(1).get(2).getGroup()); 234 +} 235 +{{/code}} 236 +))) 237 + 238 +== Deprecated and Retired projects == 239 + 240 +* XML-RPC module have been moved to https://github.com/xwiki-contrib/xwiki-platform-xmlrpc 241 + 129 129 == Upgrades == 130 130 131 131 The following dependencies have been upgraded: ... ... @@ -140,6 +140,11 @@ 140 140 * [[Woodstox 4.4.1>>http://jira.xwiki.org/browse/XWIKI-12853]] 141 141 * [[commons-net 3.4>>http://jira.xwiki.org/browse/XCOMMONS-887]] 142 142 * [[commons-collections 4.1>>http://jira.xwiki.org/browse/XCOMMONS-889]] 256 +* [[Batik 1.8>>http://jira.xwiki.org/browse/XWIKI-12904]] 257 +* [[FOP 2.0>>http://jira.xwiki.org/browse/XWIKI-12871]] 258 +* [[Jackson 2.6.4>>http://jira.xwiki.org/browse/XCOMMONS-893]] 259 +* [[guava 19>>http://jira.xwiki.org/browse/XCOMMONS-894]] 260 +* [[Less4j 1.15.4>>http://jira.xwiki.org/browse/XWIKI-12905]] 143 143 144 144 = Translations = 145 145