@Immutable public class WebSiteResourceWithCondition extends Object
WebSiteResource together with an optional
conditional comment.| Modifier | Constructor and Description |
|---|---|
|
WebSiteResourceWithCondition(EWebSiteResourceType eType,
String sPath,
Charset aCharset,
String sConditionalComment,
boolean bIsBundlable,
com.helger.css.media.ICSSMediaList aMediaList)
Constructor
|
protected |
WebSiteResourceWithCondition(WebSiteResource aResource,
String sConditionalComment,
boolean bIsBundlable,
com.helger.css.media.ICSSMediaList aMediaList) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeBundledWith(WebSiteResourceWithCondition aOther)
Check if this resource can be bundled with the passed resource.
|
static WebSiteResourceWithCondition |
createForCSS(com.helger.html.resource.css.ICSSPathProvider aPP,
boolean bRegular)
Factory method for CSS resources.
|
static WebSiteResourceWithCondition |
createForCSS(String sPath,
String sConditionalComment,
boolean bIsBundlable,
com.helger.css.media.ICSSMediaList aMediaList) |
static WebSiteResourceWithCondition |
createForJS(com.helger.html.resource.js.IJSPathProvider aPP,
boolean bRegular)
Factory method for JavaScript resources.
|
static WebSiteResourceWithCondition |
createForJS(String sPath,
String sConditionalComment,
boolean bIsBundlable) |
boolean |
equals(Object o) |
com.helger.html.resource.css.ConstantCSSPathProvider |
getAsCSSPathProvider() |
com.helger.html.resource.js.ConstantJSPathProvider |
getAsJSPathProvider() |
String |
getConditionalComment() |
com.helger.css.media.ICSSMediaList |
getMediaList() |
WebSiteResource |
getResource() |
boolean |
hasConditionalComment() |
int |
hashCode() |
boolean |
isBundlable()
Check if this resource can be bundled, independent of the conditional
comment.
|
String |
toString() |
public WebSiteResourceWithCondition(@Nonnull EWebSiteResourceType eType, @Nonnull @Nonempty String sPath, @Nonnull Charset aCharset, @Nullable String sConditionalComment, boolean bIsBundlable, @Nullable com.helger.css.media.ICSSMediaList aMediaList)
eType - Resource type. May not be null.sPath - Path to the resource. May neither be null nor empty.aCharset - Charset to read the file contents. May not be null.sConditionalComment - Optional conditional comment.bIsBundlable - true if this resource can be bundled. Use
true if you are unsure.aMediaList - Optional media list, used only for CSS resources.protected WebSiteResourceWithCondition(@Nonnull WebSiteResource aResource, @Nullable String sConditionalComment, boolean bIsBundlable, @Nullable com.helger.css.media.ICSSMediaList aMediaList)
@Nonnull public WebSiteResource getResource()
null.public boolean canBeBundledWith(@Nonnull WebSiteResourceWithCondition aOther)
aOther - The resource to check against. May not be null.true if this resource can be bundled with the passed
resource, false if not.public boolean hasConditionalComment()
true if a conditional comment is present,
false if not.@Nullable public String getConditionalComment()
null if no such
conditional comment is present.public boolean isBundlable()
true if this resource can be bundled,
false if not.@Nullable public com.helger.css.media.ICSSMediaList getMediaList()
@Nonnull public com.helger.html.resource.css.ConstantCSSPathProvider getAsCSSPathProvider()
@Nonnull public com.helger.html.resource.js.ConstantJSPathProvider getAsJSPathProvider()
@Nonnull public static WebSiteResourceWithCondition createForJS(@Nonnull com.helger.html.resource.js.IJSPathProvider aPP, boolean bRegular)
aPP - The path provider.bRegular - true for regular version, false for the
minified/optimized version.WebSiteResourceWithCondition object. Never
null.@Nonnull public static WebSiteResourceWithCondition createForJS(@Nonnull @Nonempty String sPath, @Nullable String sConditionalComment, boolean bIsBundlable)
@Nonnull public static WebSiteResourceWithCondition createForCSS(@Nonnull com.helger.html.resource.css.ICSSPathProvider aPP, boolean bRegular)
aPP - The path provider.bRegular - true for regular version, false for the
minified/optimized version.WebSiteResourceWithCondition object. Never
null.Copyright © 2014–2023 Philip Helger. All rights reserved.