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.dynamic;
05:
06: import org.apache.xmlbeans.XmlObject;
07:
08: import com.tc.config.schema.context.ConfigContext;
09:
10: /**
11: * An {@link XPathBasedConfigItem} that returns an array of objects. Subclasses must override the
12: * {@link #fetchDataFromXmlObject(XmlObject)} method to return the actual array in question.
13: */
14: public abstract class ObjectArrayXPathBasedConfigItem extends
15: XPathBasedConfigItem implements ObjectArrayConfigItem {
16:
17: public ObjectArrayXPathBasedConfigItem(ConfigContext context,
18: String xpath) {
19: super (context, xpath);
20: }
21:
22: public ObjectArrayXPathBasedConfigItem(ConfigContext context,
23: String xpath, Object defaultValue) {
24: super (context, xpath, defaultValue);
25: }
26:
27: public Object[] getObjects() {
28: return (Object[]) getObject();
29: }
30:
31: }
|