Class AddWebResourceRule
java.lang.Object
com.foreach.across.modules.web.resource.rules.AddWebResourceRule
- All Implemented Interfaces:
 WebResourceRule
A rule which specifies that a 
ViewElementBuilder must be added to a specific bucket of a WebResourceRegistry.
 Allows specifying key and order related properties of the resulting WebResourceRegistry.
 
 Unlike directly calling WebResourceRegistry.addResourceToBucket(WebResourceReference, String) using this rule will
 not replace a previously registered resource with the same key, unless replaceIfPresent(boolean) has explicitly
 been set to true.- Since:
 - 3.2.0
 - Author:
 - Marc Vanbrabant
 - See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(WebResourceRegistry webResourceRegistry) getAfter()getKey()getOrder()booleanof(@NonNull ViewElementBuilder viewElementBuilder) order(int order) replaceIfPresent(boolean replaceIfPresent) Should the web resource be replaced if it is already present (based on the key). 
- 
Constructor Details
- 
AddWebResourceRule
public AddWebResourceRule() 
 - 
 - 
Method Details
- 
withKey
 - 
toBucket
 - 
before
 - 
after
 - 
order
 - 
replaceIfPresent
Should the web resource be replaced if it is already present (based on the key). Defaults tofalse.- Parameters:
 replaceIfPresent- true if any previously registered resource with that key should be replaced- Returns:
 - rule
 
 - 
of
 - 
applyTo
- Specified by:
 applyToin interfaceWebResourceRule
 - 
getViewElementBuilder
 - 
getAfter
 - 
getBefore
 - 
getOrder
 - 
getKey
 - 
getBucket
 - 
isReplaceIfPresent
public boolean isReplaceIfPresent() 
 -