Constructors Summary |
---|
public Configs()
this(Common.USE_DEFAULT_VALUES);
|
public Configs(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(1);
this.createProperty("config", CONFIG,
Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY,
Config.class);
this.createAttribute(CONFIG, "name", "Name",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(CONFIG, "dynamic-reconfiguration-enabled", "DynamicReconfigurationEnabled",
AttrProp.CDATA,
null, "true");
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addConfig(Config value)
return addConfig(value, true);
|
public int | addConfig(Config value, boolean overwrite)
Config old = getConfigByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(Configs.class).getString("cannotAddDuplicate", "Config"));
}
return this.addValue(CONFIG, value, overwrite);
|
public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("Config["+this.sizeConfig()+"]"); // NOI18N
for(int i=0; i<this.sizeConfig(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getConfig(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(CONFIG, i, str, indent);
}
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("Configs\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public Config | getConfig(int index)
return (Config)this.getValue(CONFIG, index);
|
public Config[] | getConfig()
return (Config[])this.getValues(CONFIG);
|
public Config | getConfigByName(java.lang.String id)
if (null != id) { id = id.trim(); }
Config[] o = getConfig();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
return o[i];
}
}
return null;
|
public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
return null;
|
protected java.lang.String | getRelativeXPath()get the xpath representation for this element
returns something like abc[@name='value'] or abc
depending on the type of the bean
String ret = null;
ret = "configs";
return (null != ret ? ret.trim() : null);
|
void | initialize(int options)
|
public Config | newConfig()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new Config();
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removeConfig(Config value)
return this.removeValue(CONFIG, value);
|
public int | removeConfig(Config value, boolean overwrite)
return this.removeValue(CONFIG, value, overwrite);
|
public void | setConfig(Config[] value)
this.setValue(CONFIG, value);
|
public int | sizeConfig()
return this.size(CONFIG);
|
public void | validate()
|