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
ConstructorDescriptionBuildTemplateWebResourcesEvent
(String templateName, WebResourceRegistry webResourceRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(WebResource webResource) Deprecated.void
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
addPackage
(String... packageNames) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
addWithKey
(String type, String key, Object data) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
addWithKey
(String type, String key, Object data, String location) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
applyResourceRules
(WebResourceRule... rules) Apply a set of template specificWebResourceRule
instances to the registry.void
Apply a set of template specificWebResourceRule
instances to the registry.void
removePackage
(String... packageNames) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
removeResource
(Object data) Deprecated.since 3.2.0 - useapplyResourceRules(WebResourceRule...)
insteadvoid
removeResource
(String type, Object data) Deprecated.void
Deprecated.void
removeResourceWithKey
(String type, String key) Deprecated.
-
Constructor Details
-
BuildTemplateWebResourcesEvent
-
-
Method Details
-
getEventName
- Specified by:
getEventName
in interfaceNamedAcrossEvent
-
applyResourceRules
Apply a set of template specificWebResourceRule
instances to the registry.- Parameters:
rules
- to apply
-
applyResourceRules
Apply a set of template specificWebResourceRule
instances 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, seeWebResource
for 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, seeWebResource
for 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, seeWebResource
for 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, seeWebResource
for 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, seeWebResource
for 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, seeWebResource
for 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