public static ModifiedObject addModifiedObjectIfVerbose(ConfigurationChanges diffs, String dn, ChangeType changeType) { if (diffs == null || !diffs.isVerbose()) return null; ModifiedObject object = new ModifiedObject(dn, changeType); diffs.add(object); return object; }
public static ModifiedObject addModifiedObject(ConfigurationChanges diffs, String dn, ChangeType changeType) { if (diffs == null) return null; ModifiedObject object = new ModifiedObject(dn, changeType); diffs.add(object); return object; }
public static void removeLastIfEmpty(ConfigurationChanges diffs, ModifiedObject obj) { if (obj != null && obj.isEmpty()) diffs.removeLast(); }
@Override public synchronized X509Certificate[] findCertificates(String dn) throws ConfigurationException { try { return loadCertificates(dn); } catch (NameNotFoundException e) { throw new ConfigurationNotFoundException(e); } catch (NamingException e) { throw new ConfigurationException(e); } catch (CertificateException e) { throw new ConfigurationException(e); } }
@Override public Device findDevice(String deviceName) throws ConfigurationException { Device device = get(deviceName); if (device == null) throw new ConfigurationNotFoundException("Unknown Device: " + deviceName); if (!device.isInstalled()) throw new ConfigurationNotFoundException("Device: " + deviceName + " not installed"); return device; } }
public ApplicationEntity findApplicationEntity(String aet) throws ConfigurationException { ApplicationEntity ae = get(aet); if (ae == null) throw new ConfigurationNotFoundException( "Unknown AE: " + aet); if (!ae.isInstalled()) throw new ConfigurationNotFoundException( "AE: " + aet + " not installed"); return ae; } }
public static void storeNotDef(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, int val, int defVal) { if (val != defVal) { LdapUtils.storeInt(attrs, attrID, val); if (ldapObj != null) { ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); attribute.addValue(val); ldapObj.add(attribute); } } }
public ModifiedAttribute(String name, Object prev, Object val) { this.name = name; removeValue(prev); addValue(val); }
public void add(AttributeCoercions acs) { for (AttributeCoercion ac : acs.list) add(ac); }
public AttributeCoercion findAttributeCoercion(String sopClass, Dimse dimse, Role role, String aeTitle) { for (AttributeCoercion ac : list) if (ac.matchesCondition(sopClass, dimse, role, aeTitle)) return ac; return null; }
@Override protected ApplicationEntity find(DicomConfiguration conf, String key) throws ConfigurationException { return conf.findApplicationEntity(key); }
public boolean matches(String sopClass, Dimse dimse, Role role, String aeTitle) { return this.dimse == dimse && this.role == role && isEmptyOrContains(this.aeTitles, aeTitle) && isEmptyOrContains(this.sopClasses, sopClass); }
@Override public int compareTo(AttributeCoercion o) { return condition.compareTo(o.condition); }
@Override public Device findDevice(String deviceName) throws ConfigurationException { Device device = get(deviceName); if (device == null) throw new ConfigurationNotFoundException("Unknown Device: " + deviceName); if (!device.isInstalled()) throw new ConfigurationNotFoundException("Device: " + deviceName + " not installed"); return device; } }
public static void storeNotDef(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, int val, int defVal) { if (val != defVal) { LdapUtils.storeInt(attrs, attrID, val); if (ldapObj != null) { ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); attribute.addValue(val); ldapObj.add(attribute); } } }
public static ModifiedObject addModifiedObjectIfVerbose(ConfigurationChanges diffs, String dn, ChangeType changeType) { if (diffs == null || !diffs.isVerbose()) return null; ModifiedObject object = new ModifiedObject(dn, changeType); diffs.add(object); return object; }
public static ModifiedObject addModifiedObject(ConfigurationChanges diffs, String dn, ChangeType changeType) { if (diffs == null) return null; ModifiedObject object = new ModifiedObject(dn, changeType); diffs.add(object); return object; }
public static void removeLastIfEmpty(ConfigurationChanges diffs, ModifiedObject obj) { if (obj != null && obj.isEmpty()) diffs.removeLast(); }
public AttributeCoercion findAttributeCoercion(String sopClass, Dimse dimse, Role role, String aeTitle) { for (AttributeCoercion ac : list) if (ac.matchesCondition(sopClass, dimse, role, aeTitle)) return ac; return null; }
@Override protected ApplicationEntity find(DicomConfiguration conf, String key) throws ConfigurationException { return conf.findApplicationEntity(key); }