KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. The ASF licenses this file to You
4  * under the Apache License, Version 2.0 (the "License"); you may not
5  * 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. For additional information regarding
15  * copyright in this work, please see the NOTICE file in the top level
16  * directory of this distribution.
17  */

18
19 package org.apache.roller.pojos;
20
21 import java.io.Serializable JavaDoc;
22 import java.util.Date JavaDoc;
23
24
25 /**
26  * Represents a simple static Template.
27  *
28  * This template is not persisted or managed in any way, this class is here
29  * mainly as a wrapper so that we can represent our static template files as
30  * an object.
31  */

32 public class StaticTemplate implements Template, Serializable JavaDoc {
33     
34     private String JavaDoc id = null;
35     private String JavaDoc name = null;
36     private String JavaDoc description = null;
37     private String JavaDoc contents = null;
38     private String JavaDoc link = null;
39     private Date JavaDoc lastModified = new Date JavaDoc();
40     private String JavaDoc templateLanguage = null;
41     private boolean hidden = false;
42     private boolean navbar = false;
43     
44     
45     public StaticTemplate() {}
46     
47     public StaticTemplate(String JavaDoc id, String JavaDoc contents, String JavaDoc lang) {
48         this.id = id;
49         this.name = id;
50         this.description = id;
51         this.contents = contents;
52         this.link = id;
53         this.templateLanguage = lang;
54     }
55
56     
57     public Template getDecorator() {
58         return null;
59     }
60     
61     public String JavaDoc getId() {
62         return id;
63     }
64
65     public void setId(String JavaDoc id) {
66         this.id = id;
67     }
68
69     public String JavaDoc getName() {
70         return name;
71     }
72
73     public void setName(String JavaDoc name) {
74         this.name = name;
75     }
76
77     public String JavaDoc getDescription() {
78         return description;
79     }
80
81     public void setDescription(String JavaDoc description) {
82         this.description = description;
83     }
84
85     public String JavaDoc getContents() {
86         return contents;
87     }
88
89     public void setContents(String JavaDoc contents) {
90         this.contents = contents;
91     }
92
93     public String JavaDoc getLink() {
94         return link;
95     }
96
97     public void setLink(String JavaDoc link) {
98         this.link = link;
99     }
100
101     public Date JavaDoc getLastModified() {
102         return lastModified;
103     }
104
105     public void setLastModified(Date JavaDoc lastModified) {
106         this.lastModified = lastModified;
107     }
108
109     public String JavaDoc getTemplateLanguage() {
110         return templateLanguage;
111     }
112
113     public void setTemplateLanguage(String JavaDoc templateLanguage) {
114         this.templateLanguage = templateLanguage;
115     }
116
117     public boolean isHidden() {
118         return hidden;
119     }
120
121     public void setHidden(boolean hidden) {
122         this.hidden = hidden;
123     }
124
125     public void setNavbar(boolean navbar) {
126         this.navbar = navbar;
127     }
128     
129     public boolean isNavbar() {
130         return navbar;
131     }
132     
133     
134 }
135
Popular Tags