public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException { String key = bean.getDDBean().getRoot().getFilename(); if (configBeans.containsKey(key)) { System.out.println("its here... not anymore"); configBeans.remove(key); } else { throw new BeanNotFoundException("BNF"); } }
protected String[] getXPathsFromNamespace(String uri, String[][] xpathSegments) { String[] attributeNames = ddBean.getRoot().getAttributeNames(); for (int i = 0; i < attributeNames.length; i++) { String attributeName = attributeNames[i]; if (attributeName.startsWith("xmlns")) { if (ddBean.getRoot().getAttributeValue(attributeName).equals(uri)) { if (attributeName.equals("xmlns")) { return getXPathsWithPrefix(null , xpathSegments); } return getXPathsWithPrefix(attributeName.substring(6), xpathSegments); } } } //we can't determine the namespace from looking at attributes, since the namespace is not an attribute. //try assuming that the ddbeans strip namespaces from their xpath handing. return getXPathsWithPrefix(null , xpathSegments); }
protected String[] getXPathsFromNamespace(String uri, String[][] xpathSegments) { String[] attributeNames = ddBean.getRoot().getAttributeNames(); for (int i = 0; i < attributeNames.length; i++) { String attributeName = attributeNames[i]; if (attributeName.startsWith("xmlns")) { if (ddBean.getRoot().getAttributeValue(attributeName).equals(uri)) { if (attributeName.equals("xmlns")) { return getXPathsWithPrefix(null , xpathSegments); } return getXPathsWithPrefix(attributeName.substring(6), xpathSegments); } } } //we can't determine the namespace from looking at attributes, since the namespace is not an attribute. //try assuming that the ddbeans strip namespaces from their xpath handing. return getXPathsWithPrefix(null , xpathSegments); }
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()); } }
WebAppDConfigBean(DDBean ddBean, GerWebAppType webApp) { super(ddBean, webApp); ENCHelper.XmlEnvRefs envRefs = new ENCHelper.XmlEnvRefs(webApp.getEjbRefArray(), webApp.getEjbLocalRefArray(), webApp.getResourceRefArray(), webApp.getResourceEnvRefArray()); //which version are we dealing with? String version = ddBean.getRoot().getAttributeValue("version"); if ("2.4".equals(version)) { encHelper = new ENCHelper(ddBean, envRefs, getXPathsForJ2ee_1_4(ENCHelper.ENC_XPATHS), getXPathsForJ2ee_1_4(ENCHelper.NAME_XPATHS)); } else { encHelper = new ENCHelper(ddBean, envRefs, getXPathsWithPrefix(null, ENCHelper.ENC_XPATHS), getXPathsWithPrefix(null, ENCHelper.NAME_XPATHS)); } }