@Retention(value=RUNTIME) @Documented @Target(value={FIELD,METHOD}) public @interface Exported
ExportedBean
Modifier and Type | Optional Element and Description |
---|---|
boolean |
inline
Visibility adjustment for traversing this property.
|
String |
name
Name of the exposed property.
|
String |
verboseMap
If a string value "key/value" is given, produce a map in more verbose following form:
"[{key:KEY1, value:VALUE1}, {key:KEY2, value:VALUE2}, ...]
(whereas normally it produces more compact {KEY1:VALUE1, KEY2:VALUE2, ...}
|
int |
visibility
Controls how visible this property is.
|
public abstract int visibility
If the value is 1, the property will be visible only when the current model object is exposed as the top-level object.
If the value is 2, in addition to above, the property will still be visible if the current model object is exposed as the 2nd-level object.
And the rest goes in the same way. If the value is N, the object is exposed as the Nth level object.
The default value of this property is determined by
ExportedBean.defaultVisibility()
.
So bigger the number, more important the property is.
public abstract String name
This token is used as the XML element name or the JSON property name. The default is to use the Java property name.
public abstract boolean inline
If true, visiting this property won't increase the depth count, so the referenced object is exported as if it were a part of this object.
This flag can be used to selectively expand the subree to be returned to the client.
public abstract String verboseMap
So for example, if you say "name/value", you might see something like "[{name:"kohsuke", value:"abc"], ...}
The verboose form is useful/necessary when you use complex data structure as a key, or if the string representation of the key can contain letters that are unsafe in some flavours (such as XML, which prohibits a number of characters to be used as tag names.)
Copyright © 2014. All rights reserved.