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, resolverFields inherited from interface org.apache.cocoon.i18n.BundleFactory
ROLEFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) protected XMLResourceBundlecreate(String sourceURI, Locale locale, XMLResourceBundle parent) intgetPriority(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.voidvoidinvalidateCatalogue(String location, String name, String localeName) Invalidate cataloguevoidObserves an event.voidservice(ServiceManager smanager) booleanChecks 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, updateCacheMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
XMLResourceBundleFactory
public XMLResourceBundleFactory()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classXMLResourceBundleFactory- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classXMLResourceBundleFactory- Throws:
ConfigurationException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
create
- Overrides:
createin 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:ObserverRetrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriorityin 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:ObserverChecks if the event is supported. If true, the observe(Event) method will be called. -
observe
Description copied from interface:ObserverObserves an event.- Specified by:
observein 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.
-