1
2
3
4
5 package org.rcfaces.core.internal.repository;
6
7 import java.io.IOException;
8 import java.io.InputStream;
9 import java.io.Serializable;
10 import java.util.Locale;
11
12
13
14
15
16
17 public interface IRepository extends Serializable {
18
19 String getVersion();
20
21 IContext createContext(Locale locale);
22
23 IFile getFileByName(String filename);
24
25 IFile getFileByURI(String uri);
26
27
28
29
30
31
32 public interface IFile extends Serializable {
33 IRepository getRepository();
34
35 IContentProvider getContentProvider();
36
37 String getFilename();
38
39 Object[] getContentReferences(Locale locale);
40
41 String getURI(Locale locale);
42 }
43
44
45
46
47
48
49 public interface IContext {
50 Locale getLocale();
51
52 boolean contains(IFile file);
53
54 boolean add(IFile file);
55
56 IContext copy();
57
58 Object saveState();
59
60 void restoreState(IRepository repository, Object state);
61 }
62
63
64
65
66
67
68 public interface IContentProvider {
69 IContent getContent(Object contentReference, Locale locale);
70
71 Object searchLocalizedContentReference(Object contentReference,
72 Locale locale);
73 }
74
75
76
77
78
79
80 public interface IContent {
81 InputStream getInputStream() throws IOException;
82
83 long getLastModified() throws IOException;
84
85 long getLength() throws IOException;
86
87 void release();
88 }
89 }