public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { if (XPATHS[0].equals(bean.getXpath())) { return webAppBean; } return null; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { if (getXpaths()[0].equals(bean.getXpath())) { return connectionDefinitionDConfigBean; } return null; }
/** * @return a meaningful string about myself */ public String toString() { String s = "DConfigBean"; s = s + "\nDConfigBeanRoot = " + getDConfigBeanRoot(); s = s + "\nParent = " + parent; s = s + "\nXPath = " + ddBean.getXpath(); return s; } }
/** * @return a meaningful string about myself */ public String toString() { String s = "DConfigBean"; s = s + "\nDConfigBeanRoot = " + getDConfigBeanRoot(); s = s + "\nParent = " + parent; s = s + "\nXPath = " + ddBean.getXpath(); return s; } }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { if (getXpaths()[0].equals(bean.getXpath())) { return connectionDefinitionDConfigBean; } return null; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { if (getXpaths()[0].equals(bean.getXpath())) { return resourceAdapterDConfigBean; } return null; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths) xpaths.get(path); if (cPath == null) { return null; } AbstractJBossConfigBean retBean = new JBossNullConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; }
/** * All children attempts will return null. */ public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { throw new ConfigurationException(bean.getXpath()); } }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { if (getXpaths()[0].equals(bean.getXpath())) { return resourceAdapterDConfigBean; } return null; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths)xpaths.get(path); if (cPath == null) { return null; } AbstractJBossConfigBean retBean = new JBossNullConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths) xpaths.get(path); if (cPath == null) { throw new ConfigurationException("Config Bean Not Found"); } AbstractJBossConfigBean retBean = new JbossWebConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths) xpaths.get(path); if (cPath == null) { throw new ConfigurationException("Config Bean Not Found"); } AbstractJBossConfigBean retBean = new JBossNullConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; } }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths)xpaths.get(path); if (cPath == null) { throw new ConfigurationException("Config Bean Not Found"); } AbstractJBossConfigBean retBean = new JbossWebConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; }
public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException { // get a child bean String path = bean.getXpath(); ConfigBeanXPaths cPath = (ConfigBeanXPaths)xpaths.get(path); if (cPath == null) { throw new ConfigurationException("Config Bean Not Found"); } AbstractJBossConfigBean retBean = new JBossNullConfigBean(bean, this.myRoot, cPath); children.add(retBean); return retBean; } }
public DDBean[] getChildBean(String xpath) { if (xpath.startsWith("/")) { xpath = xpath.substring(1); } int index = xpath.indexOf('/'); String childName = (index == -1) ? xpath : xpath.substring(0, index); if (("/" + childName).equals(docBean.getXpath())) { if (index == -1) { return new DDBean[]{new DDBeanImpl((DDBeanImpl) docBean, xpath)}; } else { DDBean[] newDDBeans = docBean.getChildBean(xpath.substring(index + 1)); if (newDDBeans != null) { for (int i = 0; i < newDDBeans.length; i++) { newDDBeans[i] = new DDBeanImpl((DDBeanImpl) newDDBeans[i], xpath); } } return newDDBeans; } } else { return null; } }
public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException { String key = bean.getDDBean().getRoot().getFilename(); if (configBeans.containsKey(key)) { configBeans.remove(key); } else { throw new BeanNotFoundException(bean.getDDBean().getXpath()); } }
public static void traverse(DConfigBean config, DDBean dd, int indent) throws ConfigurationException { indent += 3; indentPrint(indent, "starting \"" + dd.getXpath() + "\", config of type " + trimClass(config.getClass())); String[] pathsToFollow = config.getXpaths(); if (pathsToFollow.length > 0) indentPrint(indent, "- There are " + pathsToFollow.length + " xpaths returned."); indent += 4; for (int i = 0; i < pathsToFollow.length; i++) { String s = "path " + i + ": " + pathsToFollow[i]; DDBean[] lesserBeans = dd.getChildBean(pathsToFollow[i]); indentPrint(indent, s + " , " + lesserBeans.length + " found."); for (int j = 0; j < lesserBeans.length; j++) { DConfigBean cb = config.getDConfigBean(lesserBeans[j]); traverse(cb, lesserBeans[j], indent); } } }
public static void traverse(DConfigBean config, DDBean dd, int indent) throws ConfigurationException { indent += 3; indentPrint(indent, "starting \"" + dd.getXpath() + "\", config of type " + trimClass(config.getClass())); String[] pathsToFollow = config.getXpaths(); if (pathsToFollow.length > 0) indentPrint(indent, "- There are " + pathsToFollow.length + " xpaths returned."); indent += 4; for (int i = 0; i < pathsToFollow.length; i++) { String s = "path " + i + ": " + pathsToFollow[i]; DDBean[] lesserBeans = dd.getChildBean(pathsToFollow[i]); indentPrint(indent, s + " , " + lesserBeans.length + " found."); for (int j = 0; j < lesserBeans.length; j++) { DConfigBean cb = config.getDConfigBean(lesserBeans[j]); traverse(cb, lesserBeans[j], indent); } } }