package jp.sourceforge.shovel.form.impl;

import java.util.TimeZone;

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

import jp.sourceforge.shovel.form.ISettingsForm;

@StrutsActionForm(name = "settingsForm")
public class SettingsFormImpl implements ISettingsForm {
    String displayName_;
    String foreignKey_;
    String email_;
    TimeZone timeZone_;
    boolean protect_;
    String url_;
    String description_;
    String location_;
    int viewLines_;
    
    public String getDisplayName() {
        return displayName_ == null ? "" : displayName_;
    }
    public void setDisplayName(String displayName) {
        displayName_ = displayName;
    }
    public String getForeignKey() {
        return foreignKey_ == null ? "" : foreignKey_;
    }
    public void setForeignKey(String foreignKey) {
        foreignKey_ = foreignKey;
    }
    public String getEmail() {
        return email_ == null ? "" : email_;
    }
    public void setEmail(String email) {
        email_ = email;
    }
    public String getTimeZoneId() {
        return getTimeZone().getID();
    }
    public void setTimeZoneId(String timeZoneId) {
        setTimeZone(TimeZone.getTimeZone(timeZoneId));
    }
    public TimeZone getTimeZone() {
        return timeZone_ == null ? TimeZone.getDefault() : timeZone_;
    }
    void setTimeZone(TimeZone timeZone) {
        timeZone_ = timeZone;
    }
    public boolean isProtect() {
        return protect_;
    }
    public void setProtect(boolean protect) {
        protect_ = protect;
    }
    public String getUrl() {
        return url_ == null ? "" : url_;
    }
    public void setUrl(String url) {
        url_ = url;
    }
    public String getDescription() {
        return description_ == null ? "" : description_;
    }
    public void setDescription(String description) {
        description_ = description;
    }
    public String getLocation() {
        return location_ == null ? "" : location_;
    }
    public void setLocation(String location) {
        location_ = location;
    }
    public int getViewLines() {
        return viewLines_;
    }
    public void setViewLines(int viewLines) {
        viewLines_ = viewLines;
    }
}
