Class BuildTemplateWebResourcesEvent
java.lang.Object
com.foreach.across.modules.web.events.BuildTemplateWebResourcesEvent
- All Implemented Interfaces:
AcrossEvent,NamedAcrossEvent
Event published by a
LayoutTemplateProcessorAdapterBean after
a named template has been prepared.- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorsConstructorDescriptionBuildTemplateWebResourcesEvent(String templateName, WebResourceRegistry webResourceRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(WebResource webResource) Deprecated.voidDeprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidDeprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidaddPackage(String... packageNames) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidaddWithKey(String type, String key, Object data) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidaddWithKey(String type, String key, Object data, String location) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidapplyResourceRules(WebResourceRule... rules) Apply a set of template specificWebResourceRuleinstances to the registry.voidApply a set of template specificWebResourceRuleinstances to the registry.voidremovePackage(String... packageNames) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidremoveResource(Object data) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadvoidremoveResource(String type, Object data) Deprecated.voidDeprecated.voidremoveResourceWithKey(String type, String key) Deprecated.
-
Constructor Details
-
BuildTemplateWebResourcesEvent
-
-
Method Details
-
getEventName
- Specified by:
getEventNamein interfaceNamedAcrossEvent
-
applyResourceRules
Apply a set of template specificWebResourceRuleinstances to the registry.- Parameters:
rules- to apply
-
applyResourceRules
Apply a set of template specificWebResourceRuleinstances to the registry.- Parameters:
rules- to apply
-
add
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)instead -
add
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadRegister a new resource with the default location. Since there is no key, any other resource of the same type with the same data will be replaced.- Parameters:
type- Type of the resource, seeWebResourcefor constants.data- Data to register.
-
add
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadRegisters a resource with the location specified. Since there is no key, any other resource of the same type with the same data will be replaced.- Parameters:
type- Type of the resource, seeWebResourcefor constants.data- Data to register.location- Where the data is available.
-
addWithKey
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadRegisters a resource under the given key. For complex interactions, it is often better to provide a key. Existing resources of this type with the same key will be replaced.- Parameters:
type- Type of the resource, seeWebResourcefor constants.key- Unique key under which to register a resource.data- Data to register.
-
addWithKey
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadRegisters a resource under the given key. For complex interactions, it is often better to provide a key. Existing resources of this type with the same key will be replaced.- Parameters:
type- Type of the resource, seeWebResourcefor constants.key- Unique key under which to register a resource.data- Data to register.
-
removeResource
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadWill remove all registered resources with the given content. Requires that the resource data equals() the requested data.- Parameters:
data- Content the resource should have.
-
removeResource
Deprecated.Will remove all registered resources of that type with the given content.- Parameters:
type- Type of the resource, seeWebResourcefor constants.data- Content the resource should have.
-
removeResourceWithKey
Deprecated.Will remove all resources registered under the key specified.- Parameters:
key- Key the resource is registered under.
-
removeResourceWithKey
Deprecated.Will remove all resources of that type registered under the key specified.- Parameters:
type- Type of the resource, seeWebResourcefor constants.key- Key the resource is registered under.
-
addPackage
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadInstalls all resources attached to the packages with the names specified. This requires the packages to be registered in the attached WebResourcePackageManager.- Parameters:
packageNames- Names of the packages to install.
-
removePackage
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)insteadWill remove all resources of the packages with the specified names.- Parameters:
packageNames- Names of the packages.
-
getTemplateName
-
getWebResourceRegistry
-
applyResourceRules(WebResourceRule...)instead