KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > config > schema > context > ConfigContext


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.config.schema.context;
5
6 import org.apache.xmlbeans.XmlException;
7 import org.apache.xmlbeans.XmlObject;
8
9 import com.tc.config.schema.IllegalConfigurationChangeHandler;
10 import com.tc.config.schema.defaults.DefaultValueProvider;
11 import com.tc.config.schema.dynamic.BooleanConfigItem;
12 import com.tc.config.schema.dynamic.ConfigItem;
13 import com.tc.config.schema.dynamic.FileConfigItem;
14 import com.tc.config.schema.dynamic.IntConfigItem;
15 import com.tc.config.schema.dynamic.StringArrayConfigItem;
16 import com.tc.config.schema.dynamic.StringConfigItem;
17 import com.tc.config.schema.repository.BeanRepository;
18
19 /**
20  * Binds together a {@link BeanRepository} and a {@link DefaultValueProvider}, and provides convenience methods for
21  * creating various items.
22  */

23 public interface ConfigContext {
24
25   void ensureRepositoryProvides(Class JavaDoc theClass);
26
27   boolean hasDefaultFor(String JavaDoc xpath) throws XmlException;
28
29   XmlObject defaultFor(String JavaDoc xpath) throws XmlException;
30
31   boolean isOptional(String JavaDoc xpath) throws XmlException;
32
33   IllegalConfigurationChangeHandler illegalConfigurationChangeHandler();
34
35   XmlObject bean();
36   
37   Object JavaDoc syncLockForBean();
38
39   void itemCreated(ConfigItem item);
40
41   IntConfigItem intItem(String JavaDoc xpath);
42
43   StringConfigItem stringItem(String JavaDoc xpath);
44
45   StringArrayConfigItem stringArrayItem(String JavaDoc xpath);
46
47   FileConfigItem fileItem(String JavaDoc xpath);
48
49   FileConfigItem substitutedFileItem(String JavaDoc xpath);
50
51   FileConfigItem configRelativeSubstitutedFileItem(String JavaDoc xpath);
52
53   BooleanConfigItem booleanItem(String JavaDoc xpath);
54
55   BooleanConfigItem booleanItem(String JavaDoc xpath, boolean defaultValue);
56
57 }
Popular Tags