Class SubresourceHeaderResponse
- java.lang.Object
-
- org.apache.wicket.markup.html.DecoratingHeaderResponse
-
- org.apache.wicket.markup.head.filter.SubresourceHeaderResponse
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IHeaderResponse
public abstract class SubresourceHeaderResponse extends DecoratingHeaderResponse
Add Subresource integrity and crossOrigin to allISubresourceHeaderItem
s.The subclass implementation of
configure(ISubresourceHeaderItem)
has to decide on how to configure the item.Note: please don't forget to wrap with
ResourceAggregator
when setting it up withApplication.setHeaderResponseDecorator(org.apache.wicket.markup.html.IHeaderResponseDecorator)
, otherwise dependencies will not be rendered.- See Also:
ISubresourceHeaderItem
-
-
Constructor Summary
Constructors Constructor Description SubresourceHeaderResponse(IHeaderResponse real)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
configure(ISubresourceHeaderItem item)
Configure the item Subresource.void
render(HeaderItem item)
Renders the givenHeaderItem
to the response if none of its tokens has been rendered before.-
Methods inherited from class org.apache.wicket.markup.html.DecoratingHeaderResponse
close, getRealResponse, getResponse, isClosed, markRendered, wasRendered
-
-
-
-
Constructor Detail
-
SubresourceHeaderResponse
public SubresourceHeaderResponse(IHeaderResponse real)
-
-
Method Detail
-
render
public void render(HeaderItem item)
Description copied from interface:IHeaderResponse
Renders the givenHeaderItem
to the response if none of its tokens has been rendered before.Automatically marks all item's tokens as rendered.
- Specified by:
render
in interfaceIHeaderResponse
- Overrides:
render
in classDecoratingHeaderResponse
- Parameters:
item
- The item to render.- See Also:
IHeaderResponse.markRendered(Object)
-
configure
protected abstract void configure(ISubresourceHeaderItem item)
Configure the item Subresource.- Parameters:
item
- to configure
-
-