org.apache.shindig.gadgets
Class DefaultMessageBundleFactory
java.lang.Object
org.apache.shindig.gadgets.AbstractSpecFactory<MessageBundle>
org.apache.shindig.gadgets.DefaultMessageBundleFactory
- All Implemented Interfaces:
- MessageBundleFactory
public class DefaultMessageBundleFactory
- extends AbstractSpecFactory<MessageBundle>
- implements MessageBundleFactory
Default implementation of a message bundle factory.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_NAME
public static final String CACHE_NAME
- See Also:
- Constant Field Values
DefaultMessageBundleFactory
@Inject
public DefaultMessageBundleFactory(ExecutorService executor,
RequestPipeline pipeline,
CacheProvider cacheProvider,
long refresh)
parse
protected MessageBundle parse(String content,
AbstractSpecFactory.Query query)
throws GadgetException
- Description copied from class:
AbstractSpecFactory
- Parse and return a new spec object from the network.
- Specified by:
parse in class AbstractSpecFactory<MessageBundle>
- Parameters:
content - the content located at specUriquery - same as was passed AbstractSpecFactory.getSpec(Query)
- Throws:
GadgetException
getBundle
public MessageBundle getBundle(GadgetSpec spec,
Locale locale,
boolean ignoreCache,
String container)
throws GadgetException
- Description copied from interface:
MessageBundleFactory
- Retrieves a messagMessageBundle for the provided GadgetSpec and Locale. Implementations must be
sure to perform proper merging of message bundles of lower specifity with exact matches
(exact > lang only > country only > all / all)
- Specified by:
getBundle in interface MessageBundleFactory
- Parameters:
spec - The gadget to inspect for Locales.locale - The language and country to get a message bundle for.ignoreCache - True to bypass any caching of message bundles for debugging purposes.container - The container that is requesting this message bundle
- Returns:
- The newly created MesageBundle.
- Throws:
GadgetException - if retrieval fails for any reason.
Copyright © 2007-2012. All Rights Reserved.