
org.lwapp.notification.sms.Sms Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwapp-notification Show documentation
Show all versions of lwapp-notification Show documentation
Lwapp notification is a utility jar file with most common notification features(email, sms, twitter) needed in daily java programming.
The newest version!
package org.lwapp.notification.sms;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.Validate;
@XmlRootElement(name = "Sms")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Sms", propOrder = { "toNumbers", "messageBody" })
public class Sms implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@XmlElementWrapper(name = "toNumbers")
@XmlElement(name = "toNumber")
private final List toNumbers = new ArrayList<>();
private final String messageBody;
@SuppressWarnings("unused")
private Sms() {
this.messageBody = null;
}
public Sms(final String messageBody, final String... toAddresses) {
Validate.notEmpty(toAddresses, "No toNumber is provided.");
Validate.notBlank(messageBody, "No message is provided.");
this.toNumbers.addAll(Arrays.asList(toAddresses));
this.messageBody = messageBody;
}
public List getToNumbers() {
return toNumbers;
}
public String getMessageBody() {
return messageBody;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy