public void setApplicationName(String name) { if (name.isEmpty()) throw new IllegalArgumentException("name cannot be empty"); Device device = this.device; if (device != null) device.removeWebApplication(this.applicationName); this.applicationName = name; if (device != null) device.addWebApplication(this); }
public void setApplicationName(String name) { if (name.isEmpty()) throw new IllegalArgumentException("name cannot be empty"); Device device = this.device; if (device != null) device.removeWebApplication(this.applicationName); this.applicationName = name; if (device != null) device.addWebApplication(this); }
private void reconfigureWebApplications(Device from) { webapps.keySet().retainAll(from.webapps.keySet()); for (WebApplication src : from.webapps.values()) { WebApplication webapp = webapps.get(src.getApplicationName()); if (webapp == null) addWebApplication(webapp = new WebApplication(src.getApplicationName())); webapp.reconfigure(src); } }
private void reconfigureWebApplications(Device from) { webapps.keySet().retainAll(from.webapps.keySet()); for (WebApplication src : from.webapps.values()) { WebApplication webapp = webapps.get(src.getApplicationName()); if (webapp == null) addWebApplication(webapp = new WebApplication(src.getApplicationName())); webapp.reconfigure(src); } }
private void loadWebApplications(Device device, String deviceDN) throws NamingException, ConfigurationException { NamingEnumeration<SearchResult> ne = search(deviceDN, "(objectclass=dcmWebApp)"); try { while (ne.hasMore()) { device.addWebApplication( loadWebApplication(ne.next(), deviceDN, device)); } } finally { LdapUtils.safeClose(ne); } }
private void loadWebApplications(Device device, String deviceDN) throws NamingException, ConfigurationException { NamingEnumeration<SearchResult> ne = search(deviceDN, "(objectclass=dcmWebApp)"); try { while (ne.hasMore()) { device.addWebApplication( loadWebApplication(ne.next(), deviceDN, device)); } } finally { LdapUtils.safeClose(ne); } }
private void loadWebApplications(Device device, JsonReader reader) { reader.next(); reader.expect(JsonParser.Event.START_ARRAY); while (reader.next() == JsonParser.Event.START_OBJECT) { WebApplication webapp = new WebApplication(); loadFrom(webapp, reader, device); device.addWebApplication(webapp); } reader.expect(JsonParser.Event.END_ARRAY); }
private void loadWebApplications(Device device, JsonReader reader) { reader.next(); reader.expect(JsonParser.Event.START_ARRAY); while (reader.next() == JsonParser.Event.START_OBJECT) { WebApplication webapp = new WebApplication(); loadFrom(webapp, reader, device); device.addWebApplication(webapp); } reader.expect(JsonParser.Event.END_ARRAY); }