public <T extends DeviceExtension> T getDeviceExtensionNotNull(Class<T> clazz) { T devExt = getDeviceExtension(clazz); if (devExt == null) throw new IllegalStateException("No " + clazz.getName() + " configured for Device: " + deviceName); return devExt; } }
public <T extends DeviceExtension> T getDeviceExtensionNotNull(Class<T> clazz) { T devExt = getDeviceExtension(clazz); if (devExt == null) throw new IllegalStateException("No " + clazz.getName() + " configured for Device: " + deviceName); return devExt; } }
@Override protected void storeChilds(ConfigurationChanges diffs, String deviceDN, Device device) throws NamingException { AuditRecordRepository arr = device.getDeviceExtension(AuditRecordRepository.class); if (arr != null) store(diffs, deviceDN, arr); }
public HL7MessageListener getHL7MessageListener() { HL7MessageListener listener = hl7MessageListener; if (listener != null) return listener; HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); return hl7Ext != null ? hl7Ext.getHL7MessageListener() : null; }
@Override protected void markForUnregister(Device prev, Device device, List<String> dns) { HL7DeviceExtension prevHL7Ext = prev.getDeviceExtension(HL7DeviceExtension.class); if (prevHL7Ext == null) return; HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); for (String name : prevHL7Ext.getHL7ApplicationNames()) { if (!name.equals("*") && (hl7Ext == null || hl7Ext.getHL7Application(name) == null)) dns.add(hl7appDN(name, appNamesRegistryDN)); } }
public void setCommonName(String commonName) { if (commonName.isEmpty()) throw new IllegalArgumentException("name cannot be empty"); AuditLoggerDeviceExtension ext = device != null ? device.getDeviceExtension(AuditLoggerDeviceExtension.class) : null; if (ext != null) ext.removeAuditLogger(this.commonName); this.commonName = commonName; if (ext != null) ext.addAuditLogger(this); }
@Override protected void register(Device device, List<String> dns) throws ConfigurationException { HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); if (hl7Ext == null) return; for (String name : hl7Ext.getHL7ApplicationNames()) { if (!name.equals("*")) dns.add(registerHL7App(name)); } }
public void setApplicationName(String name) { if (name.isEmpty()) throw new IllegalArgumentException("name cannot be empty"); HL7DeviceExtension ext = device != null ? device.getDeviceExtension(HL7DeviceExtension.class) : null; if (ext != null) ext.removeHL7Application(this.name); this.name = name; if (ext != null) ext.addHL7Application(this); }
public void setCommonName(String commonName) { if (commonName.isEmpty()) throw new IllegalArgumentException("name cannot be empty"); AuditLoggerDeviceExtension ext = device != null ? device.getDeviceExtension(AuditLoggerDeviceExtension.class) : null; if (ext != null) ext.removeAuditLogger(this.commonName); this.commonName = commonName; if (ext != null) ext.addAuditLogger(this); }
@Override protected void storeChilds(ConfigurationChanges diffs, String deviceDN, Device device) throws NamingException { HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); if (hl7Ext == null) return; for (HL7Application hl7App : hl7Ext.getHL7Applications()) store(diffs, hl7App, deviceDN); }
@Override protected void storeChilds(ConfigurationChanges diffs, String deviceDN, Device device) throws NamingException { ImageWriterExtension ext = device.getDeviceExtension(ImageWriterExtension.class); if (ext != null) store(diffs, deviceDN, ext.getImageWriterFactory()); }
@Override public HL7Application findHL7Application(String name) throws ConfigurationException { Device device = config.findDevice( "(&(objectclass=hl7Application)(hl7ApplicationName=" + name + "))", name); HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); return hl7Ext.getHL7Application(name); }
@Override protected void storeChilds(ConfigurationChanges diffs, String deviceDN, Device device) throws NamingException { AuditLoggerDeviceExtension auditLoggerExt = device.getDeviceExtension(AuditLoggerDeviceExtension.class); if (auditLoggerExt == null) return; for (AuditLogger auditLogger : auditLoggerExt.getAuditLoggers()) store(diffs, deviceDN, auditLogger); }
@Override protected void storeChilds(ConfigurationChanges diffs, String deviceDN, Device device) throws NamingException { ImageReaderExtension ext = device.getDeviceExtension(ImageReaderExtension.class); if (ext != null) store(diffs, deviceDN, ext.getImageReaderFactory()); }
public Collection<AuditLogger> getAuditLoggers() throws ConfigurationException { Device device = this.device; if (device == null) { device = findDevice(); this.device = device; } AuditLoggerDeviceExtension ext = findDevice().getDeviceExtension(AuditLoggerDeviceExtension.class); return ext != null ? ext.getAuditLoggers() : null; }
@Override protected void storeTo(Device device, JsonWriter writer) { AuditLoggerDeviceExtension ext = device.getDeviceExtension(AuditLoggerDeviceExtension.class); if (ext == null) return; writer.writeStartArray("dcmAuditLogger"); for (AuditLogger logger : ext.getAuditLoggers()) writeTo(device, logger, writer); writer.writeEnd(); }
@Override protected void storeTo(Device device, JsonWriter writer) { HL7DeviceExtension ext = device.getDeviceExtension(HL7DeviceExtension.class); if (ext == null) return; writer.writeStartArray("hl7Application"); for (HL7Application hl7App : ext.getHL7Applications()) writeTo(device, hl7App, writer); writer.writeEnd(); }
@Override protected void storeTo(Device device, JsonWriter writer) { HL7DeviceExtension ext = device.getDeviceExtension(HL7DeviceExtension.class); if (ext == null) return; writer.writeStartArray("hl7Application"); for (HL7Application hl7App : ext.getHL7Applications()) writeTo(device, hl7App, writer); writer.writeEnd(); }
@Override protected void storeTo(Device device, JsonWriter writer) { AuditRecordRepository arr = device.getDeviceExtension(AuditRecordRepository.class); if (arr == null) return; writer.writeStartObject("dcmAuditRecordRepository"); writer.writeConnRefs(device.listConnections(), arr.getConnections()); writer.writeNotNull("dicomInstalled", arr.getInstalled()); writer.writeEnd(); }
@Override protected void storeTo(Device device, JsonWriter writer) { AuditRecordRepository arr = device.getDeviceExtension(AuditRecordRepository.class); if (arr == null) return; writer.writeStartObject("dcmAuditRecordRepository"); writer.writeConnRefs(device.listConnections(), arr.getConnections()); writer.writeNotNull("dicomInstalled", arr.getInstalled()); writer.writeEnd(); }