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
,Prioritizable
,Supporter<Event>
,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
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Create the i18n cacheget the i18n cache (link language and I18nizable text to a translated value)void
configure
(Configuration configuration) protected XMLResourceBundle
create
(String sourceURI, Locale locale, XMLResourceBundle parent) int
Get the priority for the component.void
void
invalidateCatalogue
(String location, String name, String localeName) Invalidate cataloguevoid
Observes an event.void
service
(ServiceManager smanager) boolean
Check if an element is supportedMethods inherited from class org.apache.cocoon.i18n.XMLResourceBundleFactory
dispose, getCacheKey, getDirectory, getParentLocale, getSourceURI, release, select, select, select, select, selectCached, updateCache
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
BUNDLE_CACHE
bundle cache id
-
-
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:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
supports
Description copied from interface:Supporter
Check if an element is supported -
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.
-
select
- Specified by:
select
in interfaceBundleFactory
- Overrides:
select
in classXMLResourceBundleFactory
- Throws:
ComponentException
-
_getBundleCache
get the i18n cache (link language and I18nizable text to a translated value)- Returns:
- the i18n cache
-
_createCache
Create the i18n cache
-