public class DefaultMessageBundleFactory extends AbstractSpecFactory<MessageBundle> implements MessageBundleFactory
AbstractSpecFactory.Query, AbstractSpecFactory.SpecRetrievalFailedException| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_NAME |
| Constructor and Description |
|---|
DefaultMessageBundleFactory(ExecutorService executor,
RequestPipeline pipeline,
CacheProvider cacheProvider,
long refresh) |
| Modifier and Type | Method and Description |
|---|---|
MessageBundle |
getBundle(GadgetSpec spec,
Locale locale,
boolean ignoreCache,
String container)
Retrieves a messagMessageBundle for the provided GadgetSpec and Locale.
|
protected MessageBundle |
parse(String content,
AbstractSpecFactory.Query query)
Parse and return a new spec object from the network.
|
fetchFromNetwork, getSpecpublic static final String CACHE_NAME
@Inject public DefaultMessageBundleFactory(ExecutorService executor, RequestPipeline pipeline, CacheProvider cacheProvider, long refresh)
protected MessageBundle parse(String content, AbstractSpecFactory.Query query) throws GadgetException
AbstractSpecFactoryparse in class AbstractSpecFactory<MessageBundle>content - the content located at specUriquery - same as was passed AbstractSpecFactory.getSpec(Query)GadgetExceptionpublic MessageBundle getBundle(GadgetSpec spec, Locale locale, boolean ignoreCache, String container) throws GadgetException
MessageBundleFactorygetBundle in interface MessageBundleFactoryspec - 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 bundleGadgetException - if retrieval fails for any reason.Copyright © 2007-2012. All Rights Reserved.