Package org.kohsuke.stapler.export
Class ExportInterceptor
- java.lang.Object
-
- org.kohsuke.stapler.export.ExportInterceptor
-
public abstract class ExportInterceptor extends Object
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
Fields Modifier and Type Field Description static ExportInterceptor
DEFAULT
static Logger
LOGGER
static Object
SKIP
Constant to tell if return ofgetValue(Property, Object, ExportConfig)
should be skipped.
-
Constructor Summary
Constructors Constructor Description ExportInterceptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Object
getValue(Property property, Object model, ExportConfig config)
Subclasses must callProperty.getValue(Object)
to retrieve the property.
-
-
-
Field Detail
-
LOGGER
public static final Logger LOGGER
-
SKIP
public static final Object SKIP
Constant to tell if return ofgetValue(Property, Object, ExportConfig)
should be skipped. Constant to skip serializaing a property in case of error
-
DEFAULT
public static final ExportInterceptor DEFAULT
-
-
Method Detail
-
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:
Exported.skipNull()
-
-