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 ExportInterceptorstatic final Loggerstatic final ObjectConstant to tell if return ofgetValue(Property, Object, ExportConfig)should be skipped. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectgetValue(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, returnSKIPto skip the property.- Parameters:
property- to get the value from model objectmodel- object with this property- Returns:
- the value of the property, if
SKIPis returned, this property will be skipped - Throws:
IOException- if there was a problem with serialization that should prevent the serialization from proceeding- See Also:
-