01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.config.schema.defaults;
05:
06: import org.apache.xmlbeans.SchemaType;
07: import org.apache.xmlbeans.XmlException;
08: import org.apache.xmlbeans.XmlObject;
09:
10: /**
11: * Knows how to tell you the default value for an element in the config.
12: */
13: public interface DefaultValueProvider {
14:
15: boolean possibleForXPathToHaveDefault(String xpath);
16:
17: XmlObject defaultFor(SchemaType baseType, String xpath)
18: throws XmlException;
19:
20: boolean hasDefault(SchemaType baseType, String xpath)
21: throws XmlException;
22:
23: boolean isOptional(SchemaType baseType, String xpath)
24: throws XmlException;
25:
26: }
|