01: package org.osbl.client;
02:
03: import org.osbl.client.feeder.Feed;
04: import org.osbl.client.feeder.FeedInitializer;
05: import org.osbl.client.ClientServiceProvider;
06: import org.conform.BeanMetaProvider;
07: import org.conform.format.ResourceProvider;
08:
09: public class DefaultFeedInitializer implements FeedInitializer {
10: public void preInitialization(Feed feed) {
11: ClientServiceProvider serviceProvider = ClientServiceProvider
12: .getInstance();
13: feed.setServiceProvider(serviceProvider);
14:
15: ResourceProvider resourceProvider = (ResourceProvider) serviceProvider
16: .getService("ResourceProvider");
17: feed.setResourceProvider(resourceProvider);
18:
19: BeanMetaProvider staticBeanMetaProvider = (BeanMetaProvider) serviceProvider
20: .getService("StaticBeanMetaProvider");
21: BeanMetaProvider webappBeanMetaProvider = new WebappBeanMetaProvider(
22: staticBeanMetaProvider);
23: BeanMetaProvider sessionMetaProvider = new SessionBeanMetaProvider(
24: webappBeanMetaProvider);
25: feed.setBeanMetaProvider(sessionMetaProvider);
26: }
27:
28: public void postInitialization(Feed feed) {
29: }
30: }
|