001: /**
002: * Copyright (c) 2003-2007, David A. Czarnecki
003: * All rights reserved.
004: *
005: * Redistribution and use in source and binary forms, with or without
006: * modification, are permitted provided that the following conditions are met:
007: *
008: * Redistributions of source code must retain the above copyright notice, this list of conditions and the
009: * following disclaimer.
010: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
011: * following disclaimer in the documentation and/or other materials provided with the distribution.
012: * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
013: * endorse or promote products derived from this software without specific prior written permission.
014: * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
015: * without prior written permission of David A. Czarnecki.
016: *
017: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
018: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
019: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
020: * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
021: * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
022: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
025: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
026: * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
027: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
028: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
029: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030: */package org.blojsom.blog;
031:
032: import java.util.Date;
033: import java.util.Locale;
034: import java.util.Map;
035:
036: /**
037: * @author David Czarnecki
038: * @version $Id: Trackback.java,v 1.6 2007/01/17 02:35:16 czarneckid Exp $
039: * @since blojsom 3.0
040: */
041: public interface Trackback extends Response {
042:
043: /**
044: * Set the trackback ID
045: *
046: * @param id Trackback ID
047: */
048: void setId(Integer id);
049:
050: /**
051: * Get the trackback ID
052: *
053: * @return Trackback ID
054: */
055: public Integer getId();
056:
057: /**
058: * Set the blog ID
059: *
060: * @param blogId Blog ID
061: */
062: void setBlogId(Integer blogId);
063:
064: /**
065: * Get the blog ID
066: *
067: * @return Blog ID
068: */
069: Integer getBlogId();
070:
071: /**
072: * Get the blog entry ID
073: *
074: * @return Blog entry ID
075: */
076: public Integer getBlogEntryId();
077:
078: /**
079: * Set the blog entry ID
080: *
081: * @param blogEntryId Blog entry ID
082: */
083: public void setBlogEntryId(Integer blogEntryId);
084:
085: /**
086: * Get the title of the trackback
087: *
088: * @return Trackback title
089: */
090: String getTitle();
091:
092: /**
093: * Get the escaped title of the trackback
094: *
095: * @return Escaped title
096: */
097: String getEscapedTitle();
098:
099: /**
100: * Set the title of the trackback
101: *
102: * @param title Trackback title
103: */
104: void setTitle(String title);
105:
106: /**
107: * Get the excerpt of the trackback
108: *
109: * @return Trackback excerpt
110: */
111: String getExcerpt();
112:
113: /**
114: * Get the excerpt as an escaped string
115: *
116: * @return Escaped excerpt
117: */
118: String getEscapedExcerpt();
119:
120: /**
121: * Set the excerpt of the trackback
122: *
123: * @param excerpt Trackback excerpt
124: */
125: void setExcerpt(String excerpt);
126:
127: /**
128: * Get the url of the trackback
129: *
130: * @return Trackback url
131: */
132: String getUrl();
133:
134: /**
135: * Get the escaped url of the trackback
136: *
137: * @return Escaped url
138: */
139: String getEscapedUrl();
140:
141: /**
142: * Set the url of the trackback
143: *
144: * @param url Trackback url
145: */
146: void setUrl(String url);
147:
148: /**
149: * Get the blog name of the trackback
150: *
151: * @return Trackback blog name
152: */
153: String getBlogName();
154:
155: /**
156: * Get the escaped blog name of the trackback
157: *
158: * @return Escaped blog name
159: */
160: String getEscapedBlogName();
161:
162: /**
163: * Get the trackback meta-data
164: *
165: * @return Meta-data as a {@link java.util.Map}
166: */
167: Map getMetaData();
168:
169: /**
170: * Set the blog name of the trackback
171: *
172: * @param blogName Trackback blog name
173: */
174: void setBlogName(String blogName);
175:
176: /**
177: * Set the trackback meta-data
178: *
179: * @param metaData {@link java.util.Map} containing meta-data for this trackback
180: */
181: void setMetaData(Map metaData);
182:
183: /**
184: * Return the trackback date formatted with a specified date format
185: *
186: * @param format Date format
187: * @return <code>null</code> if the format is null, otherwise returns the trackback date formatted to
188: * the specified format. If the format is invalid, returns <tt>trackbackDate.toString()</tt>
189: */
190: String getDateAsFormat(String format);
191:
192: /**
193: * Return the trackback date formatted with a specified date format
194: *
195: * @param format Date format
196: * @param locale Locale for date formatting
197: * @return <code>null</code> if the entry date or format is null, otherwise returns the entry date formatted to the specified format. If the format is invalid, returns <tt>trackbackDate.toString()</tt>
198: */
199: String getDateAsFormat(String format, Locale locale);
200:
201: /**
202: * Retrieve the {@link Entry} associated with this trackback
203: *
204: * @return {@link Entry}
205: */
206: Entry getEntry();
207:
208: /**
209: * Set the {@link Entry} associated with this trackback
210: *
211: * @param blogEntry {@link Entry}
212: */
213: void setEntry(Entry blogEntry);
214:
215: /**
216: * Retrieve the date this trackback was created
217: *
218: * @return Date trackback was created
219: */
220: Date getTrackbackDate();
221:
222: /**
223: * Set the trackback date
224: *
225: * @param trackbackDate Trackback date
226: */
227: void setTrackbackDate(Date trackbackDate);
228: }
|