/** * Changes the body of the message. * * @param body is a new body for the message. */ public void setBody(String body) { BodyExtension bodyExtension = getExtension(BodyExtension.class); if (bodyExtension == null) { bodyExtension = new BodyExtension(); setExtension(bodyExtension); } bodyExtension.setValue(body); }
/** * Returns the body of the message. * * @return the body of the message. */ public String getBody() { BodyExtension bodyExtension = getExtension(BodyExtension.class); if (bodyExtension == null) { return null; } return bodyExtension.getValue(); }
/** * Changes the body of the message. * * @param body is a new body for the message. */ public void setBody(String body) { BodyExtension bodyExtension = getExtension(BodyExtension.class); if (bodyExtension == null) { bodyExtension = new BodyExtension(); setExtension(bodyExtension); } bodyExtension.setValue(body); }
/** * Returns the body of the message. * * @return the body of the message. */ public String getBody() { BodyExtension bodyExtension = getExtension(BodyExtension.class); if (bodyExtension == null) { return null; } return bodyExtension.getValue(); }