Annotation Interface Exported
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Visibility adjustment for traversing this property.boolean
Include an object referenced by this property as if all its properties are merged into properties of the current object.Name of the exposed property.boolean
If the value is null, don't even write the property.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
Controls how visible this property is.
-
Element Details
-
visibility
int visibilityControls how visible this property is.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.
- Default:
- 0
-
name
String nameName of the exposed property.This token is used as the XML element name or the JSON property name. The default is to use the Java property name.
- Default:
- ""
-
inline
boolean inlineVisibility adjustment for traversing this property.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 subtree to be returned to the client.
- Default:
- false
-
merge
boolean mergeInclude an object referenced by this property as if all its properties are merged into properties of the current object.Any duplicate properties from the referenced object will be masked.
- Default:
- false
-
skipNull
boolean skipNullIf the value is null, don't even write the property. By default, the property will be produced with null value, such as this:{ foo: null, bar: "abc" }
With this switch enabled on the 'foo' field, the above will become this:{ bar: "abc" }
- Default:
- false
-
verboseMap
String verboseMapIf 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, ...}So for example, if you say "name/value", you might see something like "[{name:"kohsuke", value:"abc"], ...}
The verbose 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.)
- Default:
- ""
-