Package org.faceless.publisher.resource
Interface ResourceFlavor
public interface ResourceFlavor
A
Resource
may have one or more ResourceFlavors-
Method Summary
Modifier and TypeMethodDescriptiongetObject
(ResourceDescriptor d, Resource resource, Report report) Return the specified object.default boolean
Return true if the connection supplied to the loader to load this flavor should be left to linger.default boolean
Return true if this object can only be used once - i.e. it's a stream.boolean
Return true if this ResourceDescriptor can return an object of the specified type.
-
Method Details
-
supports
Return true if this ResourceDescriptor can return an object of the specified type. -
getObject
Return the specified object. Note that the flavor must never, ever return a type that wouldn't claim to be supported bysupports(org.faceless.publisher.resource.ResourceDescriptor)
- Parameters:
d
- the ResourceDescriptorresource
- the Resourcereport
- the Report requesting the object- Throws:
Exception
-
isLingering
default boolean isLingering()Return true if the connection supplied to the loader to load this flavor should be left to linger. This is false (the default) unless this makes use of partial loading, as it does for (eg) loading PDFs -
isSingleUse
default boolean isSingleUse()Return true if this object can only be used once - i.e. it's a stream. It will never be cached
-