public TransferCapability addTransferCapability(TransferCapability tc) { tc.setApplicationEntity(this); TransferCapability prev = (tc.getRole() == TransferCapability.Role.SCU ? scuTCs : scpTCs).put(tc.getSopClass(), tc); if (prev != null && prev != tc) prev.setApplicationEntity(null); return prev; }
public TransferCapability removeTransferCapabilityFor( String sopClass, TransferCapability.Role role) { TransferCapability tc = (role == TransferCapability.Role.SCU ? scuTCs : scpTCs).remove(sopClass); if (tc != null) tc.setApplicationEntity(null); return tc; }
public void setTransferCapabilities(Collection<TransferCapability> transferCapabilities) { scpTCs.clear(); scuTCs.clear(); for (TransferCapability tc : transferCapabilities) { tc.setApplicationEntity(this); switch (tc.getRole()) { case SCP: scpTCs.put(tc.getSopClass(), tc); break; case SCU: scuTCs.put(tc.getSopClass(), tc); } } }