/*
 * Copyright 2012 s_wolff.
 *
 * 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.aegee.runanddine.information;

import java.io.Serializable;

import org.aegee.runanddine.runanddine.RunAndDine;

/**
 * Model for InformationMails
 * @author s_wolff
 */
public class InformationMail implements Serializable {

    /**
     * Mail subject
     */
    private String subject;
    
    /**
     * Mail content
     */
    private String content;
    
    /**
     * Related RunAndDine
     */
    private RunAndDine event;

    public InformationMail(RunAndDine event) {
        this.event = event;
        InformationMailTemplate template = InformationMailTemplate.getTemplate();
        this.subject = template.getSubject();
        this.content = template.getContent();
    }

    public InformationMail(RunAndDine event, String subject, String content) {
        this.event = event;
        this.subject = subject;
        this.content = content;
    }

    /**
     * Get mail content
     * @return Content of InformationMail
     */
    public String getContent() {
        return content;
    }

    /**
     * Get mail subject
     * @return Subject of InformationMail
     */
    public String getSubject() {
        return subject;
    }

    /**
     * Get related RunAndDine
     * @return RunAndDine the InformationMail is related to
     */
    public RunAndDine getEvent() {
        return event;
    }

    /**
     * Set mail content
     * @param content New content of InformationMail
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * Set mail subject
     * @param subject New subject of InformationMail
     */
    public void setSubject(String subject) {
        this.subject = subject;
    }

    /**
     * Set related RunAndDine
     * @param event New RunAndDine the InformationMail is related to
     */
    public void setEvent(RunAndDine event) {
        this.event = event;
    }

    /**
     * Not supported
     */
    public void send() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
