package jp.sourceforge.shovel.form.impl;

import static jp.sourceforge.shovel.RepliesType.*;

import org.seasar.struts.annotation.tiger.StrutsActionForm;

import jp.sourceforge.shovel.RepliesType;
import jp.sourceforge.shovel.form.INoticesForm;

@StrutsActionForm(name = "noticesForm")
public class NoticesFormImpl implements INoticesForm {
    boolean autoNudge_;
    RepliesType repliesType_;
    boolean newFriends_;
    boolean reply_;
    boolean receiptDirectMessage_;
    boolean growl_;
    String growlHost_;
    String growlPassword_;
    
    public boolean isAutoNudge() {
        return autoNudge_;
    }
    public void setAutoNudge(boolean autoNudge) {
        autoNudge_ = autoNudge;
    }
    public String getReplies() {
        return getRepliesType().getKey();
    }
    public void setReplies(String replies) {
        setRepliesType(RepliesType.find(replies));
    }
    public RepliesType getRepliesType() {
        return repliesType_ == null ? ALWAYS : repliesType_;
    }
    public void setRepliesType(RepliesType repliesType) {
        repliesType_ = repliesType;
    }
    public boolean isNewFriends() {
        return newFriends_;
    }
    public void setNewFriends(boolean newFriends) {
        newFriends_ = newFriends;
    }
    public boolean isReply() {
        return reply_;
    }
    public void setReply(boolean reply) {
        reply_ = reply;
    }
    public boolean isReceiptDirectMessage() {
        return receiptDirectMessage_;
    }
    public void setReceiptDirectMessage(boolean receiptDirectMessage) {
        receiptDirectMessage_ = receiptDirectMessage;
    }
    public boolean isGrowl() {
        return growl_;
    }
    public void setGrowl(boolean growl) {
        growl_ = growl;
    }
    public String getGrowlHost() {
        return growlHost_ == null ? "" : growlHost_;
    }
    public void setGrowlHost(String growlHost) {
        growlHost_ = growlHost;
    }
    public String getGrowlPassword() {
        return growlPassword_ == null ? "" : growlPassword_;
    }
    public void setGrowlPassword(String growlPassword) {
        growlPassword_ = growlPassword;
    }
}
