org.kohsuke.stapler.export
Annotation Type Exported


@Retention(value=RUNTIME)
@Documented
@Target(value={FIELD,METHOD})
public @interface Exported

Mark the field or the getter method whose value gets exposed to the remote API.

Author:
Kohsuke Kawaguchi
See Also:
ExportedBean

Optional Element Summary
 boolean inline
          Visibility adjustment for traversing this property.
 java.lang.String name
          Name of the exposed property.
 java.lang.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.
 

visibility

public abstract int visibility
Controls 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

public abstract java.lang.String name
Name 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

public abstract boolean inline
Visibility 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 subree to be returned to the client.

Default:
false

verboseMap

public abstract java.lang.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, ...}

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.)

Default:
""


Copyright © 2011. All Rights Reserved.