KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > blojsom > blog > database > DatabasePingback


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.database;
32
33 import org.blojsom.blog.Pingback;
34 import org.blojsom.util.BlojsomUtils;
35
36 /**
37  * DatabasePingback
38  *
39  * @author David Czarnecki
40  * @since blojsom 3.0
41  * @version $Id: DatabasePingback.java,v 1.5 2006/09/05 17:30:26 czarneckid Exp $
42  */

43 public class DatabasePingback extends DatabaseTrackback implements Pingback {
44
45     protected String JavaDoc _sourceURI;
46     protected String JavaDoc _targetURI;
47
48     /**
49      * Create a new instance of the database pingback
50      */

51     public DatabasePingback() {
52     }
53
54     /**
55      * Get the source URI
56      *
57      * @return Source URI
58      */

59     public String JavaDoc getSourceURI() {
60         return _sourceURI;
61     }
62
63     /**
64      * Get the escaped source URI
65      *
66      * @return Escaped source URI
67      */

68     public String JavaDoc getEscapedSourceURI() {
69         return BlojsomUtils.escapeString(_sourceURI);
70     }
71
72     /**
73      * Set the source URI
74      *
75      * @param sourceURI Source URI
76      */

77     public void setSourceURI(String JavaDoc sourceURI) {
78         _sourceURI = sourceURI;
79     }
80
81     /**
82      * Get the target URI
83      *
84      * @return Target URI
85      */

86     public String JavaDoc getTargetURI() {
87         return _targetURI;
88     }
89
90     /**
91      * Get the escaped target URI
92      *
93      * @return Escaped target URI
94      */

95     public String JavaDoc getEscapedTargetURI() {
96         return BlojsomUtils.escapeString(_targetURI);
97     }
98
99     /**
100      * Set the target URI
101      *
102      * @param targetURI Target URI
103      */

104     public void setTargetURI(String JavaDoc targetURI) {
105         _targetURI = targetURI;
106     }
107
108     /**
109      * Get the response type
110      *
111      * @return Response type
112      */

113     public String JavaDoc getType() {
114         return PINGBACK_TYPE;
115     }
116 }
117
Popular Tags