1 |
| package photospace; |
2 |
| |
3 |
| import org.springframework.context.*; |
4 |
| import photospace.meta.*; |
5 |
| import photospace.search.*; |
6 |
| import photospace.vfs.*; |
7 |
| |
8 |
| |
9 |
| public class Application |
10 |
| implements java.io.Serializable, ApplicationContextAware |
11 |
| { |
12 |
| |
13 |
| private static ApplicationContext context; |
14 |
| |
15 |
1
| public void setApplicationContext(ApplicationContext app)
|
16 |
| { |
17 |
1
| context = app;
|
18 |
| } |
19 |
| |
20 |
0
| public static Browser browser()
|
21 |
| { |
22 |
0
| return (Browser) context.getBean("browser");
|
23 |
| } |
24 |
| |
25 |
0
| public static Persister persister()
|
26 |
| { |
27 |
0
| return (Persister) context.getBean("persister");
|
28 |
| } |
29 |
| |
30 |
2
| public static Indexer indexer()
|
31 |
| { |
32 |
2
| return (Indexer) context.getBean("indexer");
|
33 |
| } |
34 |
| |
35 |
3
| public static Searcher searcher()
|
36 |
| { |
37 |
3
| return (Searcher) context.getBean("searcher");
|
38 |
| } |
39 |
| |
40 |
| } |