Methods Summary |
---|
private void | addToConfigChangeList(java.lang.String xpath, java.lang.String tag, java.lang.String oldValue, java.lang.String newValue)
ConfigChange cChange = null;
if(ctx != null) {
cChange = this.ctx.addToConfigChangeList(
(null != xpath ? xpath.trim() : xpath),
(null != tag ? tag.trim() : tag),
(null != oldValue ? oldValue.trim() : oldValue),
(null != newValue ? newValue.trim() : newValue));
if(cChange!=null) //can be null for "description" change
cChange.setGlobalLastModified(getGlobalLastModified());
}
|
public int | addValue(java.lang.String name, java.lang.Object value)
int i=0;
try {
i= addValue(name, value, true);
} catch(StaleWriteConfigException swce) {
//dont throw it!!
}
return i;
|
public int | addValue(java.lang.String name, java.lang.Object value, boolean overwrite)throws StaleWriteConfigException for the case of checking timestamps
throws exception if overwrite is false and file changed
externally
if (null != name){
name = name.trim();
}
if(!overwrite && this.ctx != null && this.ctx.isFileChangedExternally()) {
throw new StaleWriteConfigException
("ConfigBean: cannot change since FileChangedExternally");
}
preAddValue(name, value);
int i = super.addValue(name, value);
postAddValue(name, value);
return i;
|
private void | addXPathToChild(java.lang.Object obj)
if(obj!=null && obj instanceof ConfigBean)
{
//set XPath for child bean
ConfigBean cb = (ConfigBean)obj;
if(cb.xpath==null && this.xpath!=null)
cb.setXPath(cb.getAbsoluteXPath(this.xpath));
}
|
private void | addXPathToChild(java.lang.Object[] obj)
if(obj==null)
return;
for(int i=0; i<obj.length; i++)
{
addXPathToChild(obj[i]);
}
|
public static java.lang.String | camelize(java.lang.String name)camelize will convert the lower case into upper case in the following
format. Eg: user-group ==> UserGroup
Convert a DTD name into a bean name:
Any - or _ character is removed. The letter following - and _
is changed to be upper-case.
If the user mixes upper-case and lower-case, the case is not
changed.
If the Word is entirely in upper-case, the word is changed to
lower-case (except the characters following - and _)
The first letter is always upper-case.
if (null != name) {
name = name.trim();
}
CharacterIterator ci;
StringBuffer n = new StringBuffer();
boolean up = true;
boolean keepCase = false;
char c;
ci = new StringCharacterIterator(name);
c = ci.first();
// If everything is uppercase, we'll lowercase the name.
while (c != CharacterIterator.DONE)
{
if (Character.isLowerCase(c))
{
keepCase = true;
break;
}
c = ci.next();
}
c = ci.first();
while (c != CharacterIterator.DONE)
{
if (c == '-" || c == '_")
up = true;
else
{
if (up)
c = Character.toUpperCase(c);
else
if (!keepCase)
c = Character.toLowerCase(c);
n.append(c);
up = false;
}
c = ci.next();
}
return n.toString();
|
public boolean | canHaveSiblings()Indicate if the receiver can have siblings (i.e. there can be
more than one of this kind of child under the current parent).
return beanProp() != null && beanProp().isIndexed();
|
public void | changed()
|
public void | cleanup()
this.ctx = null;
this._interceptor = null;
setInvalidState();
|
public synchronized java.lang.Object | clone()We must support a clone() operation in which attribute values
are not expanded. In other words the clone must have all system property
references kept in the form ${xxxx} without expanding xxxx. The clone
operation is synchronized with getAttributeValue so that an invocation of
get AttributeValue while a clone is in progress will not result in a
raw attribute value.
We also clone the last modified timestamp.
final Object orig = preClone();
final ConfigBean result = (ConfigBean) super.clone();
if (this == parent()){
result.setDoctype(this.getPublicId(), this.getSystemId());
}
postClone(orig, result);
result.setGlobalLastModified(getThisLastModified());
return result;
|
public void | dumpAttributes(java.lang.String name, int index, java.lang.StringBuffer str, java.lang.String indent)overriding BaseBean.java to maskout user names and passwords
if (null != name) {
name = name.trim();
}
String[] names = this.getAttributeNames(name);
for (int i=0; i<names.length; i++) {
String v = null;
//To mask out Password and UserName
if(names[i].indexOf("Password") != -1 || names[i].indexOf("UserName") != -1) {
v = "*****";
} else {
v = this.getAttributeValue(name, index, names[i]);
}
if (v != null) {
str.append(indent + "\t attr: "); // NOI18N
str.append(names[i]);
str.append("="); // NOI18N
str.append(v);
}
}
|
public java.lang.String | getAbsoluteXPath(java.lang.String parentXpath)get absolute xpath given the parent xpath
if(xpath!=null)
return this.xpath.trim();
if(parentXpath==null)
return null;
String rel = getRelativeXPath();
if(rel == null) return null;
return parentXpath.trim() + "/" + getRelativeXPath().trim();
|
public com.sun.enterprise.config.ConfigBean[] | getAllChildBeans()get All child beans
ArrayList cbRet = new ArrayList();
String[] childNames = getChildBeanNames();
if(childNames == null || childNames.length == 0) return null;
for(int i = 0;i<childNames.length;i++) {
ConfigBean[] cb = getChildBeansByName(childNames[i]);
if (cb == null) continue;
for(int k=0;k<cb.length;k++) {
cbRet.add(cb[k]);
}
}
return toConfigBeanArray(cbRet);
|
public synchronized java.lang.String | getAttributeValue(java.lang.String name)All attribute values containing strings of form ${system-property}
are modified such that all occurrences of ${system-property} are
replaced by the corresponding value of the specifed system
property. If you wish to fetch the un-mapped value you must invoke
getRawAttributeValue instead.
if (null != name) {
name = name.trim();
}
String res = getRawAttributeValue(name);
return postGetAttributeValue(name, res);
|
private java.lang.String | getAttributeValueSafe(java.lang.String name)remove this if getattribute value is always safe
try {
return this.getAttributeValue(name);
} catch(Throwable t){
//ignore exceptions. all kind.
}
return null;
|
private com.sun.enterprise.config.ConfigBean[] | getChildBeanByName(java.lang.String childBeanName)
ConfigBean[] ret = null;
try {
ConfigBean cb = (ConfigBean) getValue(childBeanName);
if(cb!=null)
{
ret = new ConfigBean[1];
ret[0] = cb;
}
} catch (Exception c) {}
return ret;
|
private java.lang.String[] | getChildBeanNames()getAll child bean names
BaseProperty[] bp = super.listProperties();
if(bp == null) return null;
String[] s = new String[bp.length];
for(int i = 0;i< bp.length;i++) {
s[i] = bp[i].getDtdName();
}
return s;
|
public com.sun.enterprise.config.ConfigBean[] | getChildBeansByName(java.lang.String childBeanName)to get the child element generically
validateState();
if(childBeanName == null) return null;
childBeanName = childBeanName.trim();
childBeanName = _cbSettings.mapElementName(childBeanName);
ConfigBean[] ret = null;
try {
ret = (ConfigBean[]) getValues(childBeanName);
} catch(Exception e) {
// is a single valued element
ret = getChildBeanByName(childBeanName);
}
return ret;
|
private com.sun.enterprise.config.pluggable.ConfigBeansSettings | getConfigBeansSettings()
return EnvironmentFactory.
getEnvironmentFactory().
getConfigEnvironment().
getConfigBeansSettings();
|
public ConfigContext | getConfigContext()
return ctx;
|
public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)generic method to get default value from dtd. will be over ridden in beans
note that it is also static which can cause some confusion
return null;
|
public static java.lang.String | getDefaultAttributeValueFromDtd(java.lang.String attr)generic method to get default value from dtd. will be over ridden in beans
note that it is also static which can cause some confusion
if (null != attr) {
attr = attr.trim();
}
return getDefaultAttributeValue(attr);
|
private org.w3c.dom.DocumentType | getDoctype()
return (graphManager().getXmlDocument() != null
? graphManager().getXmlDocument().getDoctype()
: (DocumentType) null);
|
public long | getGlobalLastModified()is package scope since it is called from configcontext
FIXME: temporarily making it public for testing
return globalLastModified;
|
public synchronized com.sun.enterprise.config.pluggable.ConfigBeanInterceptor | getInterceptor()
if (null != _interceptor) {
return _interceptor;
}
ConfigBeanInterceptor cbi = null;
//get interceptor of ctx.
if (null != ctx) {
/**
* Should have used the ConfigContext interface. Too late and
* risky to change the interface.
*/
cbi = ((ConfigContextImpl)ctx).getConfigBeanInterceptor();
} else {
//get interceptor of parent.
ConfigBean parent = (ConfigBean)parent();
/*
Hack :- BaseBean.parent() returns 'this' if this is root.
Added the check (this != parent) to avoid recursion.
*/
if ((null != parent) && (this != parent)) {
cbi = parent.getInterceptor();
}
}
/*
if (null == cbi) {
cbi = EnvironmentFactory.getEnvironmentFactory().
getConfigEnvironment().getConfigBeanInterceptor();
}*/
//_interceptor = cbi;
return cbi;
|
private java.lang.String | getPublicId()
if (getDoctype() != null){
publicId = getDoctype().getPublicId();
}
return publicId.trim();
|
public java.lang.String | getRawAttributeValue(java.lang.String name)
if (null != name) {
name = name.trim();
}
//FIXME: description fix later for config change event.
if(_cbSettings.isSpecialElement(name)) {
final String v = (String)super.getValue(name);
return (null != v ? v.trim() : v);
}
preRawGetAttributeValue(name);
String s = super.getAttributeValue(name);
postRawGetAttributeValue(name, s);
return (null != s ? s.trim() : s);
|
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
return null;
|
private java.lang.String | getSystemId()
if (getDoctype() != null){
systemId = getDoctype().getSystemId();
}
return systemId.trim();
|
public long | getThisLastModified()
return thisLastModified;
|
public java.lang.Object | getTransientProperty(java.lang.String name)Get transient property value
returns value for transientProperty or null if it did not have one
if(name==null || transientProperties==null)
return null;
return transientProperties.get(name);
|
public java.lang.Object | getValue(java.lang.String name)
if (null != name) {
name = name.trim();
}
Object res = super.getValue(name);
res = postGetValue(name, res);
return res;
|
public java.lang.Object | getValue(java.lang.String name, int index)
if (null != name) {
name = name.trim();
}
Object res = super.getValue(name, index);
res = postGetValue(name, res);
return res;
|
public java.lang.Object | getValueById(java.lang.String name, int id)
if (null != name) {
name = name.trim();
}
Object res = super.getValueById(name, id);
res = postGetValue(name, res);
return res;
|
public java.lang.Object[] | getValues(java.lang.String name)
if (null != name) {
name = name.trim();
}
Object[] res = super.getValues(name);
res = postGetValues(name, res);
return res;
|
public java.lang.String | getXPath()
return (null != xpath ? xpath.trim() : xpath);
|
public boolean | isEnabled()
//FIXME: to be removed
return true;
|
public boolean | isMonitoringEnabled()
//FIXME: to be removed
return false;
|
private void | postAddValue(java.lang.String name, java.lang.Object value)
//reset the lastmodified timestamp
setThisLastModified();
//notification
if(ctx != null) {
if(value instanceof ConfigBean) {
try {
//FIXME: clone?
ConfigChange cChange =
this.ctx.addToConfigChangeList(
this.xpath,
((ConfigBean)value).getAbsoluteXPath(this.xpath),
name,
//this clone adds a lot of overhead and was there
//because of a bug in schema2beans
//((ConfigBean)this.ctx.getRootConfigBean().clone()));
((ConfigBean)this.ctx.getRootConfigBean()));
if(cChange != null) cChange.setGlobalLastModified(this.getGlobalLastModified());
} catch(Exception ce) {
ce.printStackTrace();
}
((ConfigBean)value).setConfigContext(this.ctx);
((ConfigBean)value).setXPath(((ConfigBean)value).getAbsoluteXPath(this.xpath));
}
ConfigContextEvent ccce = new ConfigContextEvent(ctx, ConfigContextEvent.POST_ADD_CHANGE,name,value,"ADD");
this.ctx.postChange(ccce);
} else {
//_logger.log(Level.INFO,"config.change_not_registered");
}
|
private void | postClone(java.lang.Object o, java.lang.Object result)
final ConfigBeanInterceptor cbi = getInterceptor();
if(cbi != null) {
cbi.postClone(o);
}
|
private java.lang.String | postGetAttributeValue(java.lang.String name, java.lang.String res)
String s = (getInterceptor()==null)
?res:getInterceptor().postGetAttributeValue(name, res);
return (null != s ? s.trim() : s);
|
private java.lang.Object | postGetValue(java.lang.String name, java.lang.Object res)
addXPathToChild(res);
return (getInterceptor()==null)
?res:getInterceptor().postGetValue(this, name, res);
|
private java.lang.Object[] | postGetValues(java.lang.String name, java.lang.Object[] res)
addXPathToChild(res);
return (getInterceptor()==null)
?res:getInterceptor().postGetValues(name, res);
|
private void | postRawGetAttributeValue(java.lang.String name, java.lang.String s)
if(ctx !=null) {
ConfigContextEvent ccce = new ConfigContextEvent(ctx, ConfigContextEvent.POST_ACCESS);
ctx.postChange(ccce);
}
|
private void | postRemoveValue(java.lang.String name, java.lang.Object value)
//reset the lastmodified timestamp
setThisLastModified();
//notification
if(value instanceof ConfigBean){
if(ctx != null) {
ConfigChange cChange = this.ctx.addToConfigChangeList(((ConfigBean)value).getXPath());
if(cChange != null) cChange.setGlobalLastModified(this.getGlobalLastModified());
// <addition> srini@sun.com server.xml verifier
//ctx.postChange(ConfigContextEvent.POST_DELETE_CHANGE);
ConfigContextEvent ccce = new ConfigContextEvent(ctx, ConfigContextEvent.POST_DELETE_CHANGE,name,value,"DELETE");
ctx.postChange(ccce);
// </addition> server.xml verifier
} else {
//_logger.log(Level.INFO,"config.change_not_registered");
}
}
|
private void | postSetArrayValue(java.lang.String name, java.lang.Object[] value)
//reset the lastmodified timestamp
setThisLastModified();
if(ctx != null) {
ConfigChange cChange =
this.ctx.addToConfigChangeList(this.xpath, name, null, value);
if(cChange != null) {
cChange.setGlobalLastModified(this.getGlobalLastModified());
}
ConfigContextEvent ccce =
new ConfigContextEvent(ctx,
ConfigContextEvent.POST_SET_CHANGE,
name,
value,
"SET");
//ccce.setClassObject(this); //why FIXME??
ccce.setBeanName(this.name());
try {
ctx.postChange(ccce);
} catch(Exception e) {
//catch for now. may remove later.
//e.printStackTrace(); //FIXME
}
} else {
//_logger.log(Level.INFO,"config.change_not_registered");
}
|
private void | postSetAttributeValue(java.lang.String name, java.lang.String value, java.lang.String oldValue)
//reset the lastmodified timestamp
setThisLastModified();
ConfigChange cChange = null;
if(ctx != null) {
cChange = this.ctx.addToConfigChangeList(this.xpath, name, oldValue, value);
if(cChange != null) cChange.setGlobalLastModified(this.getGlobalLastModified());
// <addition> srini@sun.com server.xml verifier
//this.ctx.postChange(ConfigContextEvent.POST_UPDATE_CHANGE);
ConfigContextEvent ccce = new ConfigContextEvent(ctx, ConfigContextEvent.POST_UPDATE_CHANGE,name,value,"UPDATE");
this.ctx.postChange(ccce);
// </addition> server.xml verifier
}
|
private void | postSetAttributeValueSpecial(java.lang.String name, java.lang.String value, java.lang.String oldValue)
//reset the lastmodified timestamp
setThisLastModified();
addToConfigChangeList(this.xpath,
name,
oldValue,
value);
|
private void | postSetValue(java.lang.String name, java.lang.Object value)
//reset the lastmodified timestamp
setThisLastModified();
if(ctx != null) {
// this.ctx.addToConfigChangeList(this.xpath, name, value, null);
//FIXME: remove later
if(value instanceof ConfigBean) {
//FIXME: clone?
ConfigChange cChange = this.ctx.addToConfigChangeList(this.xpath, name, ((ConfigBean)value).clone(), null);
if(cChange != null) cChange.setGlobalLastModified(this.getGlobalLastModified());
((ConfigBean)value).setConfigContext(this.ctx); //incase of description
((ConfigBean)value).setXPath(((ConfigBean)value).getAbsoluteXPath(this.xpath));
// <addition> srini@sun.com
//ctx.postChange(ConfigContextEvent.POST_SET_CHANGE);
ConfigContextEvent ccce = new ConfigContextEvent(ctx,ConfigContextEvent.POST_SET_CHANGE,name,value,"SET");
ctx.postChange(ccce);
// </addition> server.xml verifier
} else {
ConfigChange cChange = this.ctx.addToConfigChangeList(this.xpath, name, value, null);
if(cChange != null) cChange.setGlobalLastModified(this.getGlobalLastModified());
}
} else {
//_logger.log(Level.INFO,"config.change_not_registered");
}
|
private void | preAddValue(java.lang.String name, java.lang.Object value)
preConfigChange(name, value, ConfigContextEvent.PRE_ADD_CHANGE, "ADD");
|
private java.lang.Object | preClone()
if(getInterceptor() != null)
return getInterceptor().preClone();
return null;
|
private void | preConfigChange(java.lang.String name, java.lang.Object value, java.lang.String type, java.lang.String operation)
preConfigChange(name, value, type,operation, null);
|
private void | preConfigChange(java.lang.String name, java.lang.Object value, java.lang.String type, java.lang.String operation, java.lang.String beanName)
validateState();
if(ctx !=null) {
ConfigContextEvent ccce = new ConfigContextEvent(ctx, type,name,value,operation, beanName);
ccce.setClassObject(this);
ctx.preChange(ccce);
}
|
private void | preRawGetAttributeValue(java.lang.String name)
validateState();
if(ctx !=null) {
ConfigContextEvent ccce = new ConfigContextEvent(ctx, ConfigContextEvent.PRE_ACCESS);
ccce.setClassObject(this);
ctx.preChange(ccce);
}
|
private void | preRemoveValue(java.lang.String name, java.lang.Object value)
preConfigChange(name, value, ConfigContextEvent.PRE_DELETE_CHANGE, "DELETE");
|
private void | preSetArrayValue(java.lang.String name, java.lang.Object[] value)
validateState();
if(ctx !=null) {
ConfigContextEvent ccce =
new ConfigContextEvent(ctx,
ConfigContextEvent.PRE_SET_CHANGE,
name,
value,
"SET");
ccce.setClassObject(this);
ccce.setBeanName(this.name());
ctx.preChange(ccce);
}
|
private java.lang.String | preSetAttributeValue(java.lang.String name, java.lang.String value)
preConfigChange(name, value, ConfigContextEvent.PRE_UPDATE_CHANGE, "UPDATE",
(null != this.name() ? this.name().trim() : this.name()));
return this.getAttributeValueSafe(name);
|
private java.lang.String | preSetAttributeValueSpecial(java.lang.String name)
return getAttributeValueSafe(name);
|
private void | preSetValue(java.lang.String name, java.lang.Object value)
preConfigChange(name, value, ConfigContextEvent.PRE_SET_CHANGE, "SET");
|
public int | removeChild(com.sun.enterprise.config.ConfigBean child)
//FIXME: remove???
return removeChild(child, true);
|
public int | removeChild(com.sun.enterprise.config.ConfigBean child, boolean overwrite)generically remove child
returns the index of removed child
//FIXME: to be removed??
if(!overwrite && this.ctx != null && this.ctx.isFileChangedExternally()) {
throw new StaleWriteConfigException
("ConfigBean: cannot change since FileChangedExternally");
}
if(child == null)
throw new ConfigException("Cannot remove null child");
return this.removeValue(child.name(), child);
|
public int | removeValue(java.lang.String name, java.lang.Object value)
if (null != name){
name = name.trim();
}
int i=0;
try {
i= removeValue(name, value, true);
} catch (StaleWriteConfigException swce) {
//dont throw it!!
}
return i;
|
public int | removeValue(java.lang.String name, java.lang.Object value, boolean overwrite)
if (null != name) {
name = name.trim();
}
if(!overwrite && this.ctx != null && this.ctx.isFileChangedExternally()) {
throw new StaleWriteConfigException
("ConfigBean: cannot change since FileChangedExternally");
}
preRemoveValue(name, value);
int i = super.removeValue(name, value);
postRemoveValue(name, value);
return i;
|
public void | setAttributeValue(java.lang.String name, java.lang.String value)
try {
setAttributeValue(name, value, true);
} catch(StaleWriteConfigException swce) {
String url = (this.ctx==null)?" ":ctx.getUrl();
LoggerHelper.finest("Detected external changes to config file \"" +
url +
"\". Ignoring the condition and proceeding");
}
|
public void | setAttributeValue(java.lang.String name, java.lang.String value, boolean overwrite)
final String nm = (null != name ? name.trim() : name);
final String vl = (null != value ? value.trim() : value);
//FIXME: make this private.
// Do nothing if the value hasn't actually changed
if (getAttributeValueSafe(nm) != null && getAttributeValueSafe(nm).equals(vl)){
return;
}
if(!overwrite && this.ctx != null && this.ctx.isFileChangedExternally()) {
throw new StaleWriteConfigException
("ConfigBean: cannot change since FileChangedExternally");
}
String oldValue = UNINITIALIZED_ATTRIBUTE_VALUE;
//special case for description
if(_cbSettings.isSpecialElement(nm)) {
oldValue = preSetAttributeValueSpecial(nm);
super.setValue(nm, vl);
postSetAttributeValueSpecial(nm, vl, oldValue);
} else {
oldValue = preSetAttributeValue(nm, vl);
super.setAttributeValue(nm, vl);
postSetAttributeValue(nm, vl, oldValue);
}
|
public void | setConfigContext(ConfigContext ctx)
//FIXME make it package specific
this.ctx = ctx;
|
private void | setDoctype(java.lang.String pid, java.lang.String sid)
publicId = (null != pid ? pid.trim() : pid);
systemId = (null != sid ? sid.trim() : sid);
if (graphManager() != null){
graphManager().setDoctype(pid,sid);
}
|
public void | setEnabled(boolean enabled)
//FIXME: to be removed
//do nothing
|
private void | setGlobalLastModified(long timestamp)should be called ONLY from clone
sets the lastmodified to timestamp
globalLastModified = timestamp;
|
public synchronized void | setInterceptor(com.sun.enterprise.config.pluggable.ConfigBeanInterceptor cbi)
this._interceptor = cbi;
|
private void | setInvalidState()
_state = INVALID_STATE;
|
private void | setThisLastModified()should be called from the constructor and
all the changeable methods
Sets the lastModified to current time.
thisLastModified = System.currentTimeMillis();
|
public java.lang.Object | setTransientProperty(java.lang.String name, java.lang.Object value)Set value for named transientProperty
if value==null then the property will be removed
returns the previous value of the specified key,
or null if it did not have one
if(name==null)
return null;
if(value==null)
{
if(transientProperties==null)
return null;
value = transientProperties.get(name);
if(value!=null)
transientProperties.remove(name);
return value;
}
if(transientProperties==null)
transientProperties=new Hashtable();
return transientProperties.put(name, value);
|
public void | setValue(java.lang.String name, java.lang.Object value)
if (null != name) {
name = name.trim();
}
try {
setValue(name, value, true);
} catch(StaleWriteConfigException swce) {
// dont throw it!!
}
|
public void | setValue(java.lang.String name, java.lang.Object value, boolean overwrite)
if (null != name) {
name = name.trim();
}
if(!overwrite && this.ctx != null && this.ctx.isFileChangedExternally()) {
throw new StaleWriteConfigException
("ConfigBean: cannot change since FileChangedExternally");
}
Object oldValue = super.getValue(name);
preSetValue(name, value);
super.setValue(name, value);
if(oldValue!=null && oldValue!=value && oldValue instanceof ConfigBean)
postRemoveValue(name, oldValue);
postSetValue(name, value);
|
public void | setValue(java.lang.String name, java.lang.Object[] value)
if (null != name) {
name = name.trim();
}
preSetArrayValue(name, value);
super.setValue(name, value);
postSetArrayValue(name, value);
|
public void | setXPath(java.lang.String xpath)
this.xpath = (null != xpath ? xpath.trim() : xpath);
|
public static boolean | toBoolean(java.lang.String value)This method is used to convert a string value to boolean.
final String v = (null != value ? value.trim() : value);
return null != v && (v.equals("true")
|| v.equals("yes")
|| v.equals("on")
|| v.equals("1"));
|
private com.sun.enterprise.config.ConfigBean[] | toConfigBeanArray(java.util.ArrayList cbRet)
ConfigBean[] ret = new ConfigBean[cbRet.size()];
for(int j=0;j<cbRet.size();j++) {
ret[j] = (ConfigBean) cbRet.get(j);
}
return ret;
|
private void | validateState()is used to validate state before any operation to the config bean.
If the state is not valid, a runtime exception will be thrown
if(!VALID_STATE.equals(_state)) {
throw new ConfigRuntimeException("Config API Usage Error: State of ConfigBean is INVALID. No operations are permitted");
}
|