KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > blojsom > blog > Trackback


1 /**
2  * Copyright (c) 2003-2006, David A. Czarnecki
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and the
9  * following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
11  * following disclaimer in the documentation and/or other materials provided with the distribution.
12  * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
13  * endorse or promote products derived from this software without specific prior written permission.
14  * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
15  * without prior written permission of David A. Czarnecki.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21  * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */

31 package org.blojsom.blog;
32
33 import java.util.Date JavaDoc;
34 import java.util.Locale JavaDoc;
35 import java.util.Map JavaDoc;
36
37 /**
38  * @author David Czarnecki
39  * @version $Id: Trackback.java,v 1.5 2006/09/26 02:55:21 czarneckid Exp $
40  * @since blojsom 3.0
41  */

42 public interface Trackback extends Response {
43
44     /**
45      * Set the trackback ID
46      *
47      * @param id Trackback ID
48      */

49     void setId(Integer JavaDoc id);
50
51     /**
52      * Get the trackback ID
53      *
54      * @return Trackback ID
55      */

56     public Integer JavaDoc getId();
57
58     /**
59      * Set the blog ID
60      *
61      * @param blogId Blog ID
62      */

63     void setBlogId(Integer JavaDoc blogId);
64
65     /**
66      * Get the blog ID
67      *
68      * @return Blog ID
69      */

70     Integer JavaDoc getBlogId();
71
72     /**
73      * Get the blog entry ID
74      *
75      * @return Blog entry ID
76      */

77     public Integer JavaDoc getBlogEntryId();
78
79     /**
80      * Set the blog entry ID
81      *
82      * @param blogEntryId Blog entry ID
83      */

84     public void setBlogEntryId(Integer JavaDoc blogEntryId);
85
86     /**
87      * Get the title of the trackback
88      *
89      * @return Trackback title
90      */

91     String JavaDoc getTitle();
92
93     /**
94      * Get the escaped title of the trackback
95      *
96      * @return Escaped title
97      */

98     String JavaDoc getEscapedTitle();
99
100     /**
101      * Set the title of the trackback
102      *
103      * @param title Trackback title
104      */

105     void setTitle(String JavaDoc title);
106
107     /**
108      * Get the excerpt of the trackback
109      *
110      * @return Trackback excerpt
111      */

112     String JavaDoc getExcerpt();
113
114     /**
115      * Get the excerpt as an escaped string
116      *
117      * @return Escaped excerpt
118      */

119     String JavaDoc getEscapedExcerpt();
120
121     /**
122      * Set the excerpt of the trackback
123      *
124      * @param excerpt Trackback excerpt
125      */

126     void setExcerpt(String JavaDoc excerpt);
127
128     /**
129      * Get the url of the trackback
130      *
131      * @return Trackback url
132      */

133     String JavaDoc getUrl();
134
135     /**
136      * Get the escaped url of the trackback
137      *
138      * @return Escaped url
139      */

140     String JavaDoc getEscapedUrl();
141
142     /**
143      * Set the url of the trackback
144      *
145      * @param url Trackback url
146      */

147     void setUrl(String JavaDoc url);
148
149     /**
150      * Get the blog name of the trackback
151      *
152      * @return Trackback blog name
153      */

154     String JavaDoc getBlogName();
155
156     /**
157      * Get the escaped blog name of the trackback
158      *
159      * @return Escaped blog name
160      */

161     String JavaDoc getEscapedBlogName();
162
163
164     /**
165      * Get the trackback meta-data
166      *
167      * @return Meta-data as a {@link java.util.Map}
168      */

169     Map JavaDoc getMetaData();
170
171     /**
172      * Set the blog name of the trackback
173      *
174      * @param blogName Trackback blog name
175      */

176     void setBlogName(String JavaDoc blogName);
177
178     /**
179      * Set the trackback meta-data
180      *
181      * @param metaData {@link java.util.Map} containing meta-data for this trackback
182      */

183     void setMetaData(Map JavaDoc metaData);
184
185     /**
186      * Return the trackback date formatted with a specified date format
187      *
188      * @param format Date format
189      * @return <code>null</code> if the format is null, otherwise returns the trackback date formatted to
190      * the specified format. If the format is invalid, returns <tt>trackbackDate.toString()</tt>
191      */

192     String JavaDoc getDateAsFormat(String JavaDoc format);
193
194     /**
195      * Return the trackback date formatted with a specified date format
196      *
197      * @param format Date format
198      * @param locale Locale for date formatting
199      * @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>
200      */

201     String JavaDoc getDateAsFormat(String JavaDoc format, Locale JavaDoc locale);
202
203     /**
204      * Retrieve the {@link Entry} associated with this trackback
205      *
206      * @return {@link Entry}
207      */

208     Entry getEntry();
209
210     /**
211      * Set the {@link Entry} associated with this trackback
212      *
213      * @param blogEntry {@link Entry}
214      */

215     void setEntry(Entry blogEntry);
216
217     /**
218      * Retrieve the date this trackback was created
219      *
220      * @return Date trackback was created
221      */

222     Date JavaDoc getTrackbackDate();
223
224     /**
225      * Set the trackback date
226      *
227      * @param trackbackDate Trackback date
228      */

229     void setTrackbackDate(Date JavaDoc trackbackDate);
230 }
231
Popular Tags