001: /*
002: * (C) Copyright 2000 - 2005 Nabh Information Systems, Inc.
003: *
004: * This program is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU General Public License
006: * as published by the Free Software Foundation; either version 2
007: * of the License, or (at your option) any later version.
008: *
009: * This program is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: * GNU General Public License for more details.
013: *
014: * You should have received a copy of the GNU General Public License
015: * along with this program; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: *
018: */
019: package com.nabhinc.portlet.news;
020:
021: import java.util.Date;
022: import java.util.Vector;
023:
024: /**
025: *
026: *
027: * @author Padmanabh Dabke
028: * (c) 2005 Nabh Information Systems, Inc. All Rights Reserved.
029: */
030: public class NewsChannel {
031: public static final int UPDATE_PERIOD_UNSPECIFIED = -1;
032: public static final int UPDATE_PERIOD_HOUR = 0;
033: public static final int UPDATE_PERIOD_DAY = 1;
034: public static final int UPDATE_PERIOD_WEEK = 2;
035: public static final int UPDATE_PERIOD_MONTH = 3;
036: public static final int UPDATE_PERIOD_YEAR = 4;
037:
038: private String ncTitle = null;
039: private String ncCopyright = null;
040: private String ncCreator = null;
041: private String ncDescr = null;
042: private String ncGenerator = null;
043: private String ncPublisher = null;
044: private String ncLang = null;
045: private Date ncLastUpdated = null;
046: private Date ncLastBuildDate = null;
047: private String ncLink = null;
048: private ChannelImage ncImage = null;
049: private TextInput ncTextInput = null;
050: private Vector ncItems = new Vector();
051: private int ncUpdatePeriod = UPDATE_PERIOD_UNSPECIFIED;
052: private int ncUpdateFrequency = -1;
053: private Date ncUpdateBase = null;
054:
055: public String getTitle() {
056: return ncTitle;
057: }
058:
059: public void setTitle(String title) {
060: ncTitle = title;
061: }
062:
063: public String getCopyright() {
064: return ncCopyright;
065: }
066:
067: public void setCopyright(String copyright) {
068: ncCopyright = copyright;
069: }
070:
071: public String getCreator() {
072: return ncCreator;
073: }
074:
075: public void setCreator(String creator) {
076: ncCreator = creator;
077: }
078:
079: public String getDescription() {
080: return ncDescr;
081: }
082:
083: public void setDescription(String descr) {
084: ncDescr = descr;
085: }
086:
087: public String getGenerator() {
088: return ncGenerator;
089: }
090:
091: public void setGenerator(String gen) {
092: ncGenerator = gen;
093: }
094:
095: public String getPublisher() {
096: return ncPublisher;
097: }
098:
099: public void setPublisher(String gen) {
100: ncPublisher = gen;
101: }
102:
103: public String getLanguage() {
104: return ncLang;
105: }
106:
107: public void setLanguage(String lang) {
108: ncLang = lang;
109: }
110:
111: public Date getLastUpdated() {
112: return ncLastUpdated;
113: }
114:
115: public void setLastUpdated(Date d) {
116: ncLastUpdated = d;
117: }
118:
119: public Date getLastBuildDate() {
120: return ncLastBuildDate;
121: }
122:
123: public void setLastBuildDate(Date d) {
124: ncLastBuildDate = d;
125: }
126:
127: public String getLink() {
128: return ncLink;
129: }
130:
131: public void setLink(String link) {
132: ncLink = link;
133: }
134:
135: public ChannelImage getImage() {
136: return ncImage;
137: }
138:
139: public void setImage(ChannelImage img) {
140: ncImage = img;
141: }
142:
143: public TextInput getTextInput() {
144: return ncTextInput;
145: }
146:
147: public void setTextInput(TextInput ti) {
148: ncTextInput = ti;
149: }
150:
151: public Vector getItems() {
152: return ncItems;
153: }
154:
155: public void addItem(NewsItem item) {
156: ncItems.addElement(item);
157: }
158:
159: public int getUpdatePeriod() {
160: return ncUpdatePeriod;
161: }
162:
163: public void setUpdatePeriod(int p) {
164: ncUpdatePeriod = p;
165: }
166:
167: public int getUpdateFrequency() {
168: return ncUpdateFrequency;
169: }
170:
171: public void setUpdateFrequencey(int freq) {
172: ncUpdateFrequency = freq;
173: }
174:
175: public Date getUpdateBase() {
176: return ncUpdateBase;
177: }
178:
179: public void setUpdateBase(Date baseDate) {
180: ncUpdateBase = baseDate;
181: }
182:
183: }
|