/** * Public Default Constructor. * * Resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. */ public Smooks() { context = new StandaloneApplicationContext(true); visitorConfigMap = new VisitorConfigMap(context); }
/** * Get the ClassLoader associated with this Smooks instance. * @return The ClassLoader instance. */ public ClassLoader getClassLoader() { return context.getClassLoader(); }
/** * Close this Smooks instance and all associated resources. * <p/> * Should result in the {@link org.milyn.delivery.annotation.Uninitialize uninitialization} * of all allocated {@link org.milyn.delivery.ContentHandler} instances. */ public void close() { context.getStore().close(); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Set the ClassLoader associated with this Smooks instance. * @param classLoader The ClassLoader instance. */ public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; context.setClassLoader(classLoader); }
beanContext.addBean(Time.BEAN_ID, new Time()); beanContext.addBean(UniqueID.BEAN_ID, new UniqueID()); for(BeanContextLifecycleObserver observer : context.getBeanContextLifecycleObservers()) { beanContext.addObserver(observer);
/** * Public Default Constructor. * <p/> * Resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. */ public Smooks() { context = StandaloneApplicationContext.createNewInstance(true); visitorConfigMap = new VisitorConfigMap(context); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * Set the ClassLoader associated with this Smooks instance. * @param classLoader The ClassLoader instance. */ public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; context.setClassLoader(classLoader); }
beanContext.addBean(Time.BEAN_ID, new Time()); beanContext.addBean(UniqueID.BEAN_ID, new UniqueID()); for(BeanContextLifecycleObserver observer : context.getBeanContextLifecycleObservers()) { beanContext.addObserver(observer);
/** * Public Default Constructor. * <p/> * Resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. */ public Smooks() { context = StandaloneApplicationContext.createNewInstance(true); visitorConfigMap = new VisitorConfigMap(context); }
/** * Close this Smooks instance and all associated resources. * * Should result in the {@link org.milyn.delivery.annotation.Uninitialize uninitialization} * of all allocated {@link org.milyn.delivery.ContentHandler} instances. */ public void close() { context.getStore().close(); }
/** * Public constructor. * <p/> * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * <p/> * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }
/** * create a new context * @return the StandaloneApplicationContext instance */ public static StandaloneApplicationContext createNewInstance(boolean registerInstalledResources) { StandaloneApplicationContext sac = new StandaloneApplicationContext(); sac.resStore = new SmooksResourceConfigurationStore(sac, registerInstalledResources); // Add the open profile... sac.profileStore.addProfileSet(new DefaultProfileSet(Profile.DEFAULT_PROFILE)); return sac; }
/** * Set the ClassLoader associated with this Smooks instance. * @param classLoader The ClassLoader instance. */ public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; context.setClassLoader(classLoader); }
/** * Get the ClassLoader associated with this Smooks instance. * @return The ClassLoader instance. */ public ClassLoader getClassLoader() { return context.getClassLoader(); }
beanContext.addBean(Time.BEAN_ID, new Time()); beanContext.addBean(UniqueID.BEAN_ID, new UniqueID()); for(BeanContextLifecycleObserver observer : context.getBeanContextLifecycleObservers()) { beanContext.addObserver(observer);
/** * Public Default Constructor. * <p/> * Resource configurations can be added through calls to * {@link #addConfigurations(String)} or {@link #addConfigurations(String,java.io.InputStream)}. */ public Smooks() { context = StandaloneApplicationContext.createNewInstance(true); visitorConfigMap = new VisitorConfigMap(context); }
/** * Close this Smooks instance and all associated resources. * <p/> * Should result in the {@link org.milyn.delivery.annotation.Uninitialize uninitialization} * of all allocated {@link org.milyn.delivery.ContentHandler} instances. */ public void close() { context.getStore().close(); }
/** * Public constructor. * * Adds the set of {@link SmooksResourceConfiguration resources} via the {@link #addConfigurations(java.io.InputStream)}. * * Additional resource configurations can be added through calls to * <code>addConfigurations</code> method set. * * @param resourceConfigStream XML resource configuration stream. * @throws IOException Error reading resource stream. * @throws SAXException Error parsing the resource stream. * @see SmooksResourceConfiguration */ public Smooks(InputStream resourceConfigStream) throws IOException, SAXException { this(); context.setResourceLocator(new URIResourceLocator()); addConfigurations(resourceConfigStream); }