public static Exports getExports(final ApplicationContext appContext) { Exports exports = (Exports) appContext.getAttribute(Exports.class); if (exports == null) { return NULL_EXPORTS; } return exports; }
/** * Gets the Map of RuleProviders that exist in the Smooks AppcliationContext. * * @param context The Smooks {@link ApplicationContext}. * @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider. */ @SuppressWarnings("unchecked") public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context) { return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class); }
public static Exports getExports(final ApplicationContext appContext) { Exports exports = (Exports) appContext.getAttribute(Exports.class); if (exports == null) { return NULL_EXPORTS; } return exports; }
public static Exports getExports(final ApplicationContext appContext) { Exports exports = (Exports) appContext.getAttribute(Exports.class); if (exports == null) { return NULL_EXPORTS; } return exports; }
public static Exports getExports(final ApplicationContext appContext) { Exports exports = (Exports) appContext.getAttribute(Exports.class); if (exports == null) { return NULL_EXPORTS; } return exports; }
private CamelContext getCamelContext() { if (camelContext == null) return (CamelContext) applicationContext.getAttribute(CamelContext.class); else return camelContext; }
/** * Gets the Map of RuleProviders that exist in the Smooks AppcliationContext. * * @param context The Smooks {@link ApplicationContext}. * @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider. */ @SuppressWarnings("unchecked") public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context) { return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class); }
/** * Gets the Map of RuleProviders that exist in the Smooks AppcliationContext. * * @param context The Smooks {@link ApplicationContext}. * @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider. */ @SuppressWarnings("unchecked") public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context) { return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class); }
@SuppressWarnings("unchecked") private static LinkedHashMap<String, ContentDeliveryConfig> getDeliveryConfigTable(ApplicationContext applicationContext) { return (LinkedHashMap) applicationContext.getAttribute(DELIVERY_CONFIG_TABLE_CTX_KEY); }
public static ModelSet get(ApplicationContext appContext) { return (ModelSet) appContext.getAttribute(ModelSet.class); } }
/** * Get the prefix-to-namespace mannings from the {@link ApplicationContext}. * @param appContext The {@link ApplicationContext}. * @return The prefix-to-namespace mannings. */ public static Properties getMappings(ApplicationContext appContext) { Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class); if(properties == null) { return new Properties(); } return properties; }
/** * Get the prefix-to-namespace mannings from the {@link ApplicationContext}. * @param appContext The {@link ApplicationContext}. * @return The prefix-to-namespace mannings. */ public static Properties getMappings(ApplicationContext appContext) { Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class); if(properties == null) { return new Properties(); } return properties; }
/** * Get the prefix-to-namespace mannings from the {@link ApplicationContext}. * @param appContext The {@link ApplicationContext}. * @return The prefix-to-namespace mannings. */ public static Properties getMappings(ApplicationContext appContext) { Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class); if(properties == null) { return new Properties(); } return properties; }
/** * Get the prefix-to-namespace mannings from the {@link ApplicationContext}. * @param appContext The {@link ApplicationContext}. * @return The prefix-to-namespace mannings. */ public static Properties getMappings(ApplicationContext appContext) { Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class); if(properties == null) { return new Properties(); } return properties; }
@SuppressWarnings("unchecked") private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) { Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY); if(runtimeInfoMap == null) { runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>(); appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap); } return runtimeInfoMap; }
public static Map<Class<?>, Map<String, BeanWriter>> getBeanWriters(ApplicationContext appContext) { Map<Class<?>, Map<String, BeanWriter>> beanWriters = (Map<Class<?>, Map<String, BeanWriter>>) appContext.getAttribute(BeanWriter.class); if(beanWriters == null) { beanWriters = new HashMap<Class<?>, Map<String, BeanWriter>>(); appContext.setAttribute(BeanWriter.class, beanWriters); } return beanWriters; } }
public static Map<Class<?>, Map<String, BeanWriter>> getBeanWriters(ApplicationContext appContext) { Map<Class<?>, Map<String, BeanWriter>> beanWriters = (Map<Class<?>, Map<String, BeanWriter>>) appContext.getAttribute(BeanWriter.class); if(beanWriters == null) { beanWriters = new HashMap<Class<?>, Map<String, BeanWriter>>(); appContext.setAttribute(BeanWriter.class, beanWriters); } return beanWriters; } }
@SuppressWarnings("unchecked") private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) { Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY); if(runtimeInfoMap == null) { runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>(); appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap); } return runtimeInfoMap; }
@SuppressWarnings("unchecked") private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) { Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY); if(runtimeInfoMap == null) { runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>(); appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap); } return runtimeInfoMap; }
public static LocatorIndex getLocatorIndex(ApplicationContext applicationContext) { LocatorIndex counter = (LocatorIndex) applicationContext.getAttribute(CONTEXT); if(counter == null) { counter = new LocatorIndex(); applicationContext.setAttribute(CONTEXT, counter); } return counter; }