KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > roller > pojos > PlanetConfigData


1 /*
2  * Copyright 2005 Sun Microsystems, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.roller.pojos;
17
18 import java.io.Serializable JavaDoc;
19
20 import org.apache.roller.pojos.PersistentObject;
21
22 /**
23  * @struts.form include-all="true"
24  * @hibernate.class lazy="false" table="rag_config"
25  * @author Dave Johnson
26  */

27 public class PlanetConfigData extends PersistentObject implements Serializable JavaDoc
28 {
29     /** Database ID */
30     protected String JavaDoc id;
31     
32     /** Deftault group of planet */
33     protected PlanetGroupData defaultGroup;
34     
35     /** Base URL of planet */
36     protected String JavaDoc siteURL;
37     
38     /** Proxy port or null if none */
39     protected String JavaDoc proxyHost;
40     
41     /** proxy port, ignored if proxyHost is null */
42     protected int proxyPort;
43     
44     /** Name of template to be used for main page */
45     protected String JavaDoc mainPage;
46     
47     /** Name of template to be used for groups that don't provide a template */
48     protected String JavaDoc groupPage;
49     
50     /** Name of administrator responsible for site */
51     protected String JavaDoc adminName = null;
52     
53     /** Email of administrator responsible for site */
54     protected String JavaDoc adminEmail = null;
55     
56     /** Title of site */
57     protected String JavaDoc title = null;
58     
59     /** Description of site */
60     protected String JavaDoc description = null;
61     
62     /** Where to place the generated files */
63     protected String JavaDoc outputDir = null;
64     
65     /** Where to find the Velocity templates on disk */
66     protected String JavaDoc templateDir = null;
67     
68     /** Location for caching newsfeed data */
69     protected String JavaDoc cacheDir = "";
70     
71     
72     //----------------------------------------------------------- persistent fields
73
/**
74      * @hibernate.id column="id"
75      * generator-class="uuid.hex" unsaved-value="null"
76      */

77     public String JavaDoc getId()
78     {
79         return id;
80     }
81     public void setId(String JavaDoc id)
82     {
83         this.id = id;
84     }
85
86     /**
87      * @hibernate.many-to-one column="default_group_id" cascade="all" not-null="false"
88      */

89     public PlanetGroupData getDefaultGroup()
90     {
91         return defaultGroup;
92     }
93     public void setDefaultGroup(PlanetGroupData group)
94     {
95         this.defaultGroup = group;
96     }
97
98     /**
99      * @hibernate.property column="group_page" non-null="false" unique="false"
100      */

101     public String JavaDoc getGroupPage()
102     {
103         return groupPage;
104     }
105     public void setGroupPage(String JavaDoc groupPage)
106     {
107         this.groupPage = groupPage;
108     }
109     
110     /**
111      * @hibernate.property column="main_page" non-null="false" unique="false"
112      */

113     public String JavaDoc getMainPage()
114     {
115         return mainPage;
116     }
117     public void setMainPage(String JavaDoc mainPage)
118     {
119         this.mainPage = mainPage;
120     }
121     
122     /**
123      * @hibernate.property column="proxy_host" non-null="false" unique="false"
124      */

125     public String JavaDoc getProxyHost()
126     {
127         return proxyHost;
128     }
129     public void setProxyHost(String JavaDoc proxyHost)
130     {
131         this.proxyHost = proxyHost;
132     }
133     
134     /**
135      * @hibernate.property column="proxy_port" non-null="false" unique="false"
136      */

137     public int getProxyPort()
138     {
139         return proxyPort;
140     }
141     public void setProxyPort(int proxyPort)
142     {
143         this.proxyPort = proxyPort;
144     }
145
146     /**
147      * @hibernate.property column="site_url" non-null="false" unique="false"
148      */

149     public String JavaDoc getSiteURL()
150     {
151         return siteURL;
152     }
153     public void setSiteURL(String JavaDoc siteURL)
154     {
155         this.siteURL = siteURL;
156     }
157     
158     /**
159      * @hibernate.property column="admin_email" non-null="true" unique="false"
160      */

161     public String JavaDoc getAdminEmail()
162     {
163         return adminEmail;
164     }
165     public void setAdminEmail(String JavaDoc adminEmail)
166     {
167         this.adminEmail = adminEmail;
168     }
169     
170     /**
171      * @hibernate.property column="admin_name" non-null="false" unique="false"
172      */

173     public String JavaDoc getAdminName()
174     {
175         return adminName;
176     }
177     public void setAdminName(String JavaDoc adminName)
178     {
179         this.adminName = adminName;
180     }
181
182     /**
183      * @hibernate.property column="output_dir" non-null="false" unique="false"
184      */

185     public String JavaDoc getOutputDir()
186     {
187         return outputDir;
188     }
189     public void setOutputDir(String JavaDoc outputDir)
190     {
191         this.outputDir = outputDir;
192     }
193     
194     /**
195      * @hibernate.property column="template_dir" non-null="false" unique="false"
196      */

197     public String JavaDoc getTemplateDir()
198     {
199         return templateDir;
200     }
201     public void setTemplateDir(String JavaDoc templateDir)
202     {
203         this.templateDir = templateDir;
204     }
205
206     /**
207      * @hibernate.property column="description" non-null="false" unique="false"
208      */

209     public String JavaDoc getDescription()
210     {
211         return description;
212     }
213     public void setDescription(String JavaDoc description)
214     {
215         this.description = description;
216     }
217
218     /**
219      * @hibernate.property column="title" non-null="true" unique="false"
220      */

221     public String JavaDoc getTitle()
222     {
223         return title;
224     }
225     public void setTitle(String JavaDoc title)
226     {
227         this.title = title;
228     }
229
230     /**
231      * Not longer stored in database, but we keep this field for compatibility
232      * with standalone version of planet (which persists config in XML).
233      *
234      * @hibernate.property column="cache_dir" non-null="true" unique="false"
235      */

236     public String JavaDoc getCacheDir()
237     {
238         return cacheDir;
239     }
240     public void setCacheDir(String JavaDoc dir)
241     {
242         if (dir != null) cacheDir = dir;
243     }
244
245     //-------------------------------------------------------------- implementation
246
public void setData(PersistentObject vo)
247     {
248         // TODO Auto-generated method stub
249
}
250 }
Popular Tags