Package org.ametys.core.cocoon
Class XMLResourceBundleFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.i18n.XMLResourceBundleFactory
org.ametys.core.cocoon.XMLResourceBundleFactory
- All Implemented Interfaces:
Observer
,Disposable
,Initializable
,Component
,Configurable
,LogEnabled
,Serviceable
,ThreadSafe
,BundleFactory
public class XMLResourceBundleFactory
extends XMLResourceBundleFactory
implements Observer, Initializable
This XMLResourceBundleFactory creates a
Bundle
for XML resources which can be invalidated-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cocoon.i18n.BundleFactory
BundleFactory.ConfigurationKeys
-
Field Summary
Fields inherited from class org.apache.cocoon.i18n.XMLResourceBundleFactory
cache, directory, interval, manager, resolver
Fields inherited from interface org.apache.cocoon.i18n.BundleFactory
ROLE
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected XMLResourceBundle
create
(String sourceURI, Locale locale, XMLResourceBundle parent) int
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.void
void
invalidateCatalogue
(String location, String name, String localeName) Invalidate cataloguevoid
Observes an event.void
service
(ServiceManager smanager) boolean
Checks if the event is supported.Methods inherited from class org.apache.cocoon.i18n.XMLResourceBundleFactory
dispose, getCacheKey, getDirectory, getParentLocale, getSourceURI, release, select, select, select, select, select, selectCached, updateCache
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
XMLResourceBundleFactory
public XMLResourceBundleFactory()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classXMLResourceBundleFactory
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classXMLResourceBundleFactory
- Throws:
ConfigurationException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
create
- Overrides:
create
in classXMLResourceBundleFactory
-
invalidateCatalogue
public void invalidateCatalogue(String location, String name, String localeName) throws ComponentException Invalidate catalogue- Parameters:
location
- catalogue base location (URI)name
- bundle namelocaleName
- locale name- Throws:
ComponentException
- If an error occurred
-
getPriority
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
supports
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called. -
observe
Description copied from interface:Observer
Observes an event.- Specified by:
observe
in interfaceObserver
- Parameters:
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event. This may allow optimizations between observers.- Throws:
Exception
- if an error occurs. All exceptions will be logged but not propagated, as the observation mechanism should never fail.
-