public InboundConnection getWithId(String theId) { for (InboundConnection next : myConnections) { if (next.getId().equals(theId)) { return next; } } return null; }
public static InboundConnectionList fromXml(Controller theController, String theXml) { InboundConnectionList retVal = JAXB.unmarshal(new StringReader(theXml), InboundConnectionList.class); retVal.myController = theController; for (InboundConnection next : retVal.getConnections()) { next.setController(theController); } return retVal; }
public void addConnection(InboundConnection theCon) { Validate.notNull(theCon); myConnections.add(theCon); theCon.setController(myController); firePropertyChange(PROP_LIST, null, null); }
public InboundConnection createDefaultConnection(int port) { InboundConnection initialConnection = new InboundConnection(); initialConnection.setCharSet( Prefs.getInstance().getMostRecentConnectionCharset().displayName()); initialConnection.setDualPort(false); initialConnection.setIncomingOrSinglePort(port); initialConnection.setHost("localhost"); initialConnection.setEncoding(Hl7V2EncodingTypeEnum.ER_7); initialConnection.setController(myController); return initialConnection; }