private void loadChilds(ApplicationEntity ae, String aeDN) throws NamingException, ConfigurationException { loadTransferCapabilities(ae, aeDN); for (LdapDicomConfigurationExtension ext : extensions) ext.loadChilds(ae, aeDN); }
private void markForUnregister(Device prev, Device device, List<String> dns) { for (String aet : prev.getApplicationAETitles()) { if (!aet.equals("*") && device.getApplicationEntity(aet) == null) dns.add(aetDN(aet, aetsRegistryDN)); } for (LdapDicomConfigurationExtension ext : extensions) ext.markForUnregister(prev, device, dns); }
private void register(Device device, List<String> dns) throws ConfigurationException { for (String aet : device.getApplicationAETitles()) { if (!aet.equals("*")) dns.add(registerAET(aet)); } for (LdapDicomConfigurationExtension ext : extensions) ext.register(device, dns); }
private void mergeChilds(ConfigurationChanges diffs, Device prev, Device device, String deviceDN, boolean preserveVendorData) throws NamingException, ConfigurationException { mergeConnections(diffs, prev, device, deviceDN); mergeAEs(diffs, prev, device, deviceDN, preserveVendorData); mergeWebApps(diffs, prev, device, deviceDN); for (LdapDicomConfigurationExtension ext : extensions) ext.mergeChilds(diffs, prev, device, deviceDN); }
public boolean removeDicomConfigurationExtension( LdapDicomConfigurationExtension ext) { if (!extensions.remove(ext)) return false; ext.setDicomConfiguration(null); return true; }
private void storeChilds(ConfigurationChanges diffs, String aeDN, ApplicationEntity ae) throws NamingException { for (TransferCapability tc : ae.getTransferCapabilities()) { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, aeDN, ConfigurationChanges.ChangeType.C); createSubcontext(dnOf(tc, aeDN), storeTo(ldapObj, tc, new BasicAttributes(true))); } if (extended) for (LdapDicomConfigurationExtension ext : extensions) ext.storeChilds(diffs, aeDN, ae); }
private void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException { ae.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); ae.setVendorData(byteArrays(attrs.get("dicomVendorData"))); ae.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); ae.setPreferredCallingAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCallingAETitle"))); ae.setPreferredCalledAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCalledAETitle"))); ae.setAssociationInitiator(LdapUtils.booleanValue(attrs.get("dicomAssociationInitiator"), false)); ae.setAssociationAcceptor(LdapUtils.booleanValue(attrs.get("dicomAssociationAcceptor"), false)); ae.setSupportedCharacterSets(LdapUtils.stringArray(attrs.get("dicomSupportedCharacterSet"))); ae.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); if (!LdapUtils.hasObjectClass(attrs, "dcmNetworkAE")) return; ae.setAcceptedCallingAETitles(LdapUtils.stringArray(attrs.get("dcmAcceptedCallingAETitle"))); ae.setPreferredTransferSyntaxes(LdapUtils.removeOrdinalPrefix( LdapUtils.stringArray(attrs.get("dcmPreferredTransferSyntax")))); ae.setOtherAETitles(LdapUtils.stringArray(attrs.get("dcmOtherAETitle"))); ae.setMasqueradeCallingAETitles(LdapUtils.stringArray(attrs.get("dcmMasqueradeCallingAETitle"))); ae.setHl7ApplicationName(LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); for (LdapDicomConfigurationExtension ext : extensions) ext.loadFrom(ae, attrs); }
private Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, ApplicationEntity ae, String deviceDN, Attributes attrs) { BasicAttribute objectclass = new BasicAttribute("objectclass", "dicomNetworkAE"); attrs.put(objectclass); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomAETitle", ae.getAETitle(), null); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomDescription", ae.getDescription(), null); storeNotEmpty(ldapObj, attrs, "dicomVendorData", ae.getVendorData()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomApplicationCluster", ae.getApplicationClusters()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomPreferredCallingAETitle", ae.getPreferredCallingAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomPreferredCalledAETitle", ae.getPreferredCalledAETitles()); LdapUtils.storeBoolean(ldapObj, attrs, "dicomAssociationInitiator", ae.isAssociationInitiator()); LdapUtils.storeBoolean(ldapObj, attrs, "dicomAssociationAcceptor", ae.isAssociationAcceptor()); LdapUtils.storeConnRefs(ldapObj, attrs, ae.getConnections(), deviceDN); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomSupportedCharacterSet", ae.getSupportedCharacterSets()); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomInstalled", ae.getInstalled(), null); if (!extended) return attrs; objectclass.add("dcmNetworkAE"); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmPreferredTransferSyntax", LdapUtils.addOrdinalPrefix(ae.getPreferredTransferSyntaxes())); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "hl7ApplicationName", ae.getHl7ApplicationName(), null); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmAcceptedCallingAETitle", ae.getAcceptedCallingAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmOtherAETitle", ae.getOtherAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmMasqueradeCallingAETitle", ae.getMasqueradeCallingAETitles()); for (LdapDicomConfigurationExtension ext : extensions) ext.storeTo(ldapObj, ae, attrs); return attrs; }
b.getHl7ApplicationName(), null); for (LdapDicomConfigurationExtension ext : extensions) ext.storeDiffs(ldapObj, a, b, mods); return mods;
private void registerDiff(Device prev, Device device, List<String> dns) throws ConfigurationException { for (String aet : device.getApplicationAETitles()) { if (!aet.equals("*") && prev.getApplicationEntity(aet) == null) dns.add(registerAET(aet)); } for (LdapDicomConfigurationExtension ext : extensions) ext.registerDiff(prev, device, dns); }
private void mergeChilds(ConfigurationChanges diffs, ApplicationEntity prev, ApplicationEntity ae, String aeDN) throws NamingException { merge(diffs, prev.getTransferCapabilities(), ae.getTransferCapabilities(), aeDN); for (LdapDicomConfigurationExtension ext : extensions) ext.mergeChilds(diffs, prev, ae, aeDN); }
public boolean removeDicomConfigurationExtension( LdapDicomConfigurationExtension ext) { if (!extensions.remove(ext)) return false; ext.setDicomConfiguration(null); return true; }
private void storeChilds(ConfigurationChanges diffs, String aeDN, ApplicationEntity ae) throws NamingException { for (TransferCapability tc : ae.getTransferCapabilities()) { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, aeDN, ConfigurationChanges.ChangeType.C); createSubcontext(dnOf(tc, aeDN), storeTo(ldapObj, tc, new BasicAttributes(true))); } if (extended) for (LdapDicomConfigurationExtension ext : extensions) ext.storeChilds(diffs, aeDN, ae); }
private void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException { ae.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); ae.setVendorData(byteArrays(attrs.get("dicomVendorData"))); ae.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); ae.setPreferredCallingAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCallingAETitle"))); ae.setPreferredCalledAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCalledAETitle"))); ae.setAssociationInitiator(LdapUtils.booleanValue(attrs.get("dicomAssociationInitiator"), false)); ae.setAssociationAcceptor(LdapUtils.booleanValue(attrs.get("dicomAssociationAcceptor"), false)); ae.setSupportedCharacterSets(LdapUtils.stringArray(attrs.get("dicomSupportedCharacterSet"))); ae.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); if (!LdapUtils.hasObjectClass(attrs, "dcmNetworkAE")) return; ae.setAcceptedCallingAETitles(LdapUtils.stringArray(attrs.get("dcmAcceptedCallingAETitle"))); ae.setPreferredTransferSyntaxes(LdapUtils.removeOrdinalPrefix( LdapUtils.stringArray(attrs.get("dcmPreferredTransferSyntax")))); ae.setOtherAETitles(LdapUtils.stringArray(attrs.get("dcmOtherAETitle"))); ae.setMasqueradeCallingAETitles(LdapUtils.stringArray(attrs.get("dcmMasqueradeCallingAETitle"))); ae.setHl7ApplicationName(LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); for (LdapDicomConfigurationExtension ext : extensions) ext.loadFrom(ae, attrs); }
private Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, ApplicationEntity ae, String deviceDN, Attributes attrs) { BasicAttribute objectclass = new BasicAttribute("objectclass", "dicomNetworkAE"); attrs.put(objectclass); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomAETitle", ae.getAETitle(), null); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomDescription", ae.getDescription(), null); storeNotEmpty(ldapObj, attrs, "dicomVendorData", ae.getVendorData()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomApplicationCluster", ae.getApplicationClusters()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomPreferredCallingAETitle", ae.getPreferredCallingAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomPreferredCalledAETitle", ae.getPreferredCalledAETitles()); LdapUtils.storeBoolean(ldapObj, attrs, "dicomAssociationInitiator", ae.isAssociationInitiator()); LdapUtils.storeBoolean(ldapObj, attrs, "dicomAssociationAcceptor", ae.isAssociationAcceptor()); LdapUtils.storeConnRefs(ldapObj, attrs, ae.getConnections(), deviceDN); LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomSupportedCharacterSet", ae.getSupportedCharacterSets()); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dicomInstalled", ae.getInstalled(), null); if (!extended) return attrs; objectclass.add("dcmNetworkAE"); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmPreferredTransferSyntax", LdapUtils.addOrdinalPrefix(ae.getPreferredTransferSyntaxes())); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "hl7ApplicationName", ae.getHl7ApplicationName(), null); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmAcceptedCallingAETitle", ae.getAcceptedCallingAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmOtherAETitle", ae.getOtherAETitles()); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmMasqueradeCallingAETitle", ae.getMasqueradeCallingAETitles()); for (LdapDicomConfigurationExtension ext : extensions) ext.storeTo(ldapObj, ae, attrs); return attrs; }
b.getHl7ApplicationName(), null); for (LdapDicomConfigurationExtension ext : extensions) ext.storeDiffs(ldapObj, a, b, mods); return mods;
private void registerDiff(Device prev, Device device, List<String> dns) throws ConfigurationException { for (String aet : device.getApplicationAETitles()) { if (!aet.equals("*") && prev.getApplicationEntity(aet) == null) dns.add(registerAET(aet)); } for (LdapDicomConfigurationExtension ext : extensions) ext.registerDiff(prev, device, dns); }
private void markForUnregister(String deviceDN, List<String> dns) throws NamingException, ConfigurationException { NamingEnumeration<SearchResult> ne = search(deviceDN, "(objectclass=dicomNetworkAE)", StringUtils.EMPTY_STRING); try { while (ne.hasMore()) { String rdn = ne.next().getName(); if (!rdn.equals("dicomAETitle=*")) dns.add(rdn + ',' + aetsRegistryDN); } } finally { LdapUtils.safeClose(ne); } for (LdapDicomConfigurationExtension ext : extensions) ext.markForUnregister(deviceDN, dns); }
private void loadChilds(ApplicationEntity ae, String aeDN) throws NamingException, ConfigurationException { loadTransferCapabilities(ae, aeDN); for (LdapDicomConfigurationExtension ext : extensions) ext.loadChilds(ae, aeDN); }
private void mergeChilds(ConfigurationChanges diffs, Device prev, Device device, String deviceDN, boolean preserveVendorData) throws NamingException, ConfigurationException { mergeConnections(diffs, prev, device, deviceDN); mergeAEs(diffs, prev, device, deviceDN, preserveVendorData); mergeWebApps(diffs, prev, device, deviceDN); for (LdapDicomConfigurationExtension ext : extensions) ext.mergeChilds(diffs, prev, device, deviceDN); }