Package org.kohsuke.stapler.export
Class ExportInterceptor
java.lang.Object
org.kohsuke.stapler.export.ExportInterceptor
Allows caller to intercept exporting of properties.
Implementation can choose to ignore properties in case of failure during serialization.
- Author:
- Vivek Pandey, James Dumay
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExportInterceptor
static final Logger
static final Object
Constant to tell if return ofgetValue(Property, Object, ExportConfig)
should be skipped. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
getValue
(Property property, Object model, ExportConfig config) Subclasses must callProperty.getValue(Object)
to retrieve the property.
-
Field Details
-
LOGGER
-
SKIP
Constant to tell if return ofgetValue(Property, Object, ExportConfig)
should be skipped. Constant to skip serializaing a property in case of error -
DEFAULT
-
-
Constructor Details
-
ExportInterceptor
public ExportInterceptor()
-
-
Method Details
-
getValue
public abstract Object getValue(Property property, Object model, ExportConfig config) throws IOException Subclasses must callProperty.getValue(Object)
to retrieve the property. If the subclass decides the value can be included in the request return the value otherwise, returnSKIP
to skip the property.- Parameters:
property
- to get the value from model objectmodel
- object with this property- Returns:
- the value of the property, if
SKIP
is returned, this property will be skipped - Throws:
IOException
- if there was a problem with serialization that should prevent the serialization from proceeding- See Also:
-