/**
* Copyright (C) 2013 Arman Gal
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.clevermore.monitor.server.model.config;
import java.util.ArrayList;
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;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "mailupdaterconfig")
public class MailUpdaterConfig {
private Boolean enabled = false;
private Integer period = 60; // min
private String fromAddress;
private String fromName;
@XmlElement(name = "to")
@XmlElementWrapper
private List<String> addresses = new ArrayList<String>();
public MailUpdaterConfig() {}
public Boolean isEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public List<String> getTo() {
return addresses;
}
public void setTo(List<String> to) {
this.addresses = to;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public String getFromAddress() {
return fromAddress;
}
public String getFromName() {
return fromName;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("MailUpdaterConfig [enabled=").append(enabled).append(", period=").append(period).append(", to=").append(addresses).append("]");
return builder.toString();
}
}