Package org.opencms.loader
Class CmsStoredContentDeliveryHelper
java.lang.Object
org.opencms.loader.CmsStoredContentDeliveryHelper
Helper for delivering externally stored VFS content directly to an HTTP response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDelivery result. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new delivery helper without explicit client cache max age.CmsStoredContentDeliveryHelper(long clientCacheMaxAge) Creates a new delivery helper. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDeliver(CmsStoredContentInfo info, I_CmsStorageDelivery storage) Returns if the given content can be delivered by this helper.deliver(CmsStoredContentInfo info, I_CmsStorageDelivery storage, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Delivers stored content to the servlet response.
-
Constructor Details
-
CmsStoredContentDeliveryHelper
public CmsStoredContentDeliveryHelper()Creates a new delivery helper without explicit client cache max age. -
CmsStoredContentDeliveryHelper
Creates a new delivery helper.- Parameters:
clientCacheMaxAge- the maximum age for delivered contents in the clients cache
-
-
Method Details
-
canDeliver
Returns if the given content can be delivered by this helper.- Parameters:
info- the stored content infostorage- the delivery storage- Returns:
- if the content can be delivered
-
deliver
public CmsStoredContentDeliveryHelper.DeliveryResult deliver(CmsStoredContentInfo info, I_CmsStorageDelivery storage, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws IOException, CmsException Delivers stored content to the servlet response.- Parameters:
info- the stored content infostorage- the delivery storagereq- the servlet requestres- the servlet response- Returns:
- the delivery result
- Throws:
IOException- in case writing to the response failsCmsException- in case delivery fails
-