@Test public void testInsert() throws Exception { MultiPayloadStringOutputParameter parameter = new MultiPayloadStringOutputParameter(); MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage)new MultiPayloadMessageFactory().newMessage(); parameter.insert(PAYLOAD, ID, message); assertEquals(PAYLOAD, message.getContent(ID)); }
@Override public void insert(String data, InterlokMessage m) throws InterlokException { if (m instanceof MultiPayloadAdaptrisMessage) { insert(data, m.resolve(getPayloadId()), (MultiPayloadAdaptrisMessage)m); } else { throw new InterlokException("Cannot insert payload into message type " + m.getClass().getName() + " as it does not support multiple payloads."); } }
MultiPayloadStringOutputParameter extends StringPayloadDataOutputParameter implements DataOutputParameter<String> { @Override public void insert(String data, InterlokMessage m) throws InterlokException { if (m instanceof MultiPayloadAdaptrisMessage) { insert(data, m.resolve(getPayloadId()), (MultiPayloadAdaptrisMessage)m); } else { throw new InterlokException("Cannot insert payload into message type " + m.getClass().getName() + " as it does not support multiple payloads."); } } }
MultiPayloadStringOutputParameter extends StringPayloadDataOutputParameter implements DataOutputParameter<String> { @Override public void insert(String data, InterlokMessage m) throws InterlokException { if (m instanceof MultiPayloadAdaptrisMessage) { insert(data, m.resolve(getPayloadId()), (MultiPayloadAdaptrisMessage)m); } else { throw new InterlokException("Cannot insert payload into message type " + m.getClass().getName() + " as it does not support multiple payloads."); } }  }
MultiPayloadStringOutputParameter extends StringPayloadDataOutputParameter implements DataOutputParameter<String> { @Override public void insert(String data, InterlokMessage m) throws InterlokException { if (m instanceof MultiPayloadAdaptrisMessage) { insert(data, m.resolve(getPayloadId()), (MultiPayloadAdaptrisMessage)m); } else { throw new InterlokException("Cannot insert payload into message type " + m.getClass().getName() + " as it does not support multiple payloads."); } }  String getPayloadId(); void setPayloadId(String payloadId); @Override void insert(String data, InterlokMessage m); void insert(String data, String id, MultiPayloadAdaptrisMessage m); }
MultiPayloadStringOutputParameter extends StringPayloadDataOutputParameter implements DataOutputParameter<String> { @Override public void insert(String data, InterlokMessage m) throws InterlokException { if (m instanceof MultiPayloadAdaptrisMessage) { insert(data, m.resolve(getPayloadId()), (MultiPayloadAdaptrisMessage)m); } else { throw new InterlokException("Cannot insert payload into message type " + m.getClass().getName() + " as it does not support multiple payloads."); } }  String getPayloadId(); void setPayloadId(String payloadId); @Override void insert(String data, InterlokMessage m); void insert(String data, String id, MultiPayloadAdaptrisMessage m);  }