public void add(AttributeCoercions acs) { for (AttributeCoercion ac : acs.list) add(ac); }
public AttributeCoercion getAttributeCoercion(String aeTitle, String sopClass, Role role, Dimse dimse) { return attributeCoercions.findAttributeCoercion(sopClass, dimse, role, aeTitle); }
public void add(AttributeCoercion ac) { if (findByCommonName(ac.getCommonName()) != null) throw new IllegalStateException("AttributeCoercion with cn: '" + ac.getCommonName() + "' already exists"); int index = Collections.binarySearch(list, ac); if (index < 0) index = -(index+1); list.add(index, ac); }
@Override public void reconfigure(AEExtension from) { ProxyAEExtension proxyAEE = (ProxyAEExtension) from; setForwardRules(proxyAEE.forwardRules); setForwardOptions(proxyAEE.forwardOptions); setRetries(proxyAEE.retries); setSpoolDirectory(proxyAEE.spoolDirectory); setAcceptDataOnFailedAssociation(proxyAEE.acceptDataOnFailedAssociation); setEnableAuditLog(proxyAEE.enableAuditLog); setProxyPIXConsumerApplication(proxyAEE.proxyPIXConsumerApplication); setRemotePIXManagerApplication(proxyAEE.remotePIXManagerApplication); setDeleteFailedDataWithoutRetryConfiguration(proxyAEE.deleteFailedDataWithoutRetryConfiguration); setFallbackDestinationAET(proxyAEE.fallbackDestinationAET); setMergeStgCmtMessagesUsingANDLogic(proxyAEE.mergeStgCmtMessagesUsingANDLogic); attributeCoercions.clear(); for (AttributeCoercion ac : proxyAEE.getAttributeCoercions()) addAttributeCoercion(ac); }
public void add(AttributeCoercion ac) { if (findByCommonName(ac.getCommonName()) != null) throw new IllegalStateException("AttributeCoercion with cn: '" + ac.getCommonName() + "' already exists"); int index = Collections.binarySearch(list, ac); if (index < 0) index = -(index+1); list.add(index, ac); }
public void add(AttributeCoercions acs) { for (AttributeCoercion ac : acs.list) add(ac); }
public void merge(ConfigurationChanges diffs, AttributeCoercions prevs, AttributeCoercions acs, String parentDN) throws NamingException { for (AttributeCoercion prev : prevs) { String cn = prev.getCommonName(); if (acs.findByCommonName(cn) == null) { String dn = LdapUtils.dnOf("cn", cn, parentDN); destroySubcontext(dn); ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.D); } } for (AttributeCoercion ac : acs) { String cn = ac.getCommonName(); String dn = LdapUtils.dnOf("cn", cn, parentDN); AttributeCoercion prev = prevs.findByCommonName(cn); if (prev == null) { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.C); createSubcontext(dn, storeTo(ac, new BasicAttributes(true))); } else { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.U); modifyAttributes(dn, storeDiffs(ldapObj, prev, ac, new ArrayList<ModificationItem>())); ConfigurationChanges.removeLastIfEmpty(diffs, ldapObj); } } }
public void addAttributeCoercion(AttributeCoercion ac) { attributeCoercions.add(ac); }
public void merge(ConfigurationChanges diffs, AttributeCoercions prevs, AttributeCoercions acs, String parentDN) throws NamingException { for (AttributeCoercion prev : prevs) { String cn = prev.getCommonName(); if (acs.findByCommonName(cn) == null) { String dn = LdapUtils.dnOf("cn", cn, parentDN); destroySubcontext(dn); ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.D); } } for (AttributeCoercion ac : acs) { String cn = ac.getCommonName(); String dn = LdapUtils.dnOf("cn", cn, parentDN); AttributeCoercion prev = prevs.findByCommonName(cn); if (prev == null) { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.C); createSubcontext(dn, storeTo(ac, new BasicAttributes(true))); } else { ConfigurationChanges.ModifiedObject ldapObj = ConfigurationChanges.addModifiedObject(diffs, dn, ConfigurationChanges.ChangeType.U); modifyAttributes(dn, storeDiffs(ldapObj, prev, ac, new ArrayList<ModificationItem>())); ConfigurationChanges.removeLastIfEmpty(diffs, ldapObj); } } }
public void load(AttributeCoercions acs, String dn) throws NamingException { NamingEnumeration<SearchResult> ne = search(dn, "(objectclass=dcmAttributeCoercion)"); try { while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); acs.add(new AttributeCoercion( LdapUtils.stringValue(attrs.get("cn"), null), LdapUtils.stringArray(attrs.get("dcmSOPClass")), Dimse.valueOf(LdapUtils.stringValue(attrs.get("dcmDIMSE"), null)), TransferCapability.Role.valueOf( LdapUtils.stringValue(attrs.get("dicomTransferRole"), null)), LdapUtils.stringArray(attrs.get("dcmAETitle")), LdapUtils.stringValue(attrs.get("dcmURI"), null))); } } finally { LdapUtils.safeClose(ne); } }
public void load(AttributeCoercions acs, String dn) throws NamingException { NamingEnumeration<SearchResult> ne = search(dn, "(objectclass=dcmAttributeCoercion)"); try { while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); acs.add(new AttributeCoercion( LdapUtils.stringValue(attrs.get("cn"), null), LdapUtils.stringArray(attrs.get("dcmSOPClass")), Dimse.valueOf(LdapUtils.stringValue(attrs.get("dcmDIMSE"), null)), TransferCapability.Role.valueOf( LdapUtils.stringValue(attrs.get("dicomTransferRole"), null)), LdapUtils.stringArray(attrs.get("dcmAETitle")), LdapUtils.stringValue(attrs.get("dcmURI"), null))); } } finally { LdapUtils.safeClose(ne); } }