org.granite.messaging.annotations
Annotation Type Include


@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Include

The Include annotation can be used to include a property with no corresponding Java field and which content has to be retrieved from a getter.

Typical usage:

 @Include
 public String getComputedData() {
     return "something that can only be computed on the server";
 }
 
The pseudo-field will be serialized just like if there were a field named "calculatedData". The implementation accepts the get/is convention of Java beans. Note that even if the client is actually serializing non empty data when the property is sent back to the server, its content will be ignored on the server side.

Author:
Franck WOLFF