Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

December/2024
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
222324252627 28
293031    

[ Archives News
for 'Java Technology' ]

home > news > java technology > declarative hyperlinking enhancements

Declarative Hyperlinking Enhancements

I've spent some time fleshing out the code in the experimental declarative hyperlinking module I blogged about earlier. In that earlier entry I showed how you could use the new @Link annotation with existing URI templates either explicitly like this: @Link("widgets/{id}") URI link; or by referencing a resource class @Path annotation value like this: @Link(resource=WidgetResource.class) URI link; Expression Language Support With the latest trunk code you can now use EL in explicit @Link templates, thanks to Ed Burns for helping to get me bootstrapped with the EL APIs. E.g.: @Link("widgets/${instance.id}") URI link; The above would extract the value of the id property of the instance bean. Three beans are currently supported: instanceThe object whose class contains the @Link annotation currently being processed. entityThe response entity object returned by the resource class method. resourceThe resource class instance that returned the entity. Its straightforward to add others but these seemed like a useful set to start with. Custom Bindings By default, a URI template parameter is replaced by the value of a same-named property in the current instance. The following two annotations are therefore equivalent: @Link("{id}") @Link("${instance.id}") Custom bindings allow the source of the value of a URI template parameter to be changed, e.g.: @Link(value="{id}", bindings={ @Binding(name="id", value="${resource.widget...


Date: March, 17 2010
Url: http://www.java.net/blog/mhadley/archive/2010/03/17/declarative-hyperlinking-enhancements


Others News

©2002-2019Java-Virtual-Machine.net website maker | top website builder | bootstrap modal popup | easyhtml5video.com | free bootstrap templates