@Override public synchronized HL7ApplicationInfo[] listHL7AppInfos(HL7ApplicationInfo keys) throws ConfigurationException { if (!config.configurationExists()) return new HL7ApplicationInfo[0]; ArrayList<HL7ApplicationInfo> results = new ArrayList<HL7ApplicationInfo>(); NamingEnumeration<SearchResult> ne = null; try { String deviceName = keys.getDeviceName(); ne = config.search(deviceName, HL7_ATTRS, toFilter(keys)); while (ne.hasMore()) { HL7ApplicationInfo hl7AppInfo = new HL7ApplicationInfo(); SearchResult ne1 = ne.next(); loadFrom(hl7AppInfo, ne1.getAttributes(), deviceName != null ? deviceName : LdapUtils.cutDeviceName(ne1.getName())); results.add(hl7AppInfo); } } catch (NameNotFoundException e) { return new HL7ApplicationInfo[0]; } catch (NamingException e) { throw new ConfigurationException(e); } finally { LdapUtils.safeClose(ne); } return results.toArray(new HL7ApplicationInfo[results.size()]); }
@Override public synchronized ApplicationEntityInfo[] listAETInfos(ApplicationEntityInfo keys) throws ConfigurationException { if (!configurationExists()) return new ApplicationEntityInfo[0]; ArrayList<ApplicationEntityInfo> results = new ArrayList<ApplicationEntityInfo>(); NamingEnumeration<SearchResult> ne = null; try { String deviceName = keys.getDeviceName(); ne = search(deviceName, AE_ATTRS, toFilter(keys)); while (ne.hasMore()) { ApplicationEntityInfo aetInfo = new ApplicationEntityInfo(); SearchResult ne1 = ne.next(); loadFrom(aetInfo, ne1.getAttributes(), deviceName != null ? deviceName : LdapUtils.cutDeviceName(ne1.getName())); results.add(aetInfo); } } catch (NameNotFoundException e) { return new ApplicationEntityInfo[0]; } catch (NamingException e) { throw new ConfigurationException(e); } finally { LdapUtils.safeClose(ne); } return results.toArray(new ApplicationEntityInfo[results.size()]); }
@Override public synchronized WebApplicationInfo[] listWebApplicationInfos(WebApplicationInfo keys) throws ConfigurationException { if (!configurationExists()) return new WebApplicationInfo[0]; ArrayList<WebApplicationInfo> results = new ArrayList<WebApplicationInfo>(); NamingEnumeration<SearchResult> ne = null; try { String deviceName = keys.getDeviceName(); ne = search(deviceName, WEBAPP_ATTRS, toFilter(keys)); while (ne.hasMore()) { WebApplicationInfo webappInfo = new WebApplicationInfo(); SearchResult ne1 = ne.next(); loadFrom(webappInfo, ne1.getAttributes(), deviceName != null ? deviceName : LdapUtils.cutDeviceName(ne1.getName())); results.add(webappInfo); } } catch (NameNotFoundException e) { return new WebApplicationInfo[0]; } catch (NamingException e) { throw new ConfigurationException(e); } finally { LdapUtils.safeClose(ne); } return results.toArray(new WebApplicationInfo[results.size()]); }
@Override public synchronized ApplicationEntityInfo[] listAETInfos(ApplicationEntityInfo keys) throws ConfigurationException { if (!configurationExists()) return new ApplicationEntityInfo[0]; ArrayList<ApplicationEntityInfo> results = new ArrayList<ApplicationEntityInfo>(); NamingEnumeration<SearchResult> ne = null; try { String deviceName = keys.getDeviceName(); ne = search(deviceName, AE_ATTRS, toFilter(keys)); while (ne.hasMore()) { ApplicationEntityInfo aetInfo = new ApplicationEntityInfo(); SearchResult ne1 = ne.next(); loadFrom(aetInfo, ne1.getAttributes(), deviceName != null ? deviceName : LdapUtils.cutDeviceName(ne1.getName())); results.add(aetInfo); } } catch (NameNotFoundException e) { return new ApplicationEntityInfo[0]; } catch (NamingException e) { throw new ConfigurationException(e); } finally { LdapUtils.safeClose(ne); } return results.toArray(new ApplicationEntityInfo[results.size()]); }
@Override public synchronized WebApplicationInfo[] listWebApplicationInfos(WebApplicationInfo keys) throws ConfigurationException { if (!configurationExists()) return new WebApplicationInfo[0]; ArrayList<WebApplicationInfo> results = new ArrayList<WebApplicationInfo>(); NamingEnumeration<SearchResult> ne = null; try { String deviceName = keys.getDeviceName(); ne = search(deviceName, WEBAPP_ATTRS, toFilter(keys)); while (ne.hasMore()) { WebApplicationInfo webappInfo = new WebApplicationInfo(); SearchResult ne1 = ne.next(); loadFrom(webappInfo, ne1.getAttributes(), deviceName != null ? deviceName : LdapUtils.cutDeviceName(ne1.getName())); results.add(webappInfo); } } catch (NameNotFoundException e) { return new WebApplicationInfo[0]; } catch (NamingException e) { throw new ConfigurationException(e); } finally { LdapUtils.safeClose(ne); } return results.toArray(new WebApplicationInfo[results.size()]); }