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.database;
031:
032: import org.blojsom.blog.Pingback;
033: import org.blojsom.util.BlojsomUtils;
034:
035: /**
036: * DatabasePingback
037: *
038: * @author David Czarnecki
039: * @since blojsom 3.0
040: * @version $Id: DatabasePingback.java,v 1.6 2007/01/17 02:35:16 czarneckid Exp $
041: */
042: public class DatabasePingback extends DatabaseTrackback implements
043: Pingback {
044:
045: protected String _sourceURI;
046: protected String _targetURI;
047:
048: /**
049: * Create a new instance of the database pingback
050: */
051: public DatabasePingback() {
052: }
053:
054: /**
055: * Get the source URI
056: *
057: * @return Source URI
058: */
059: public String getSourceURI() {
060: return _sourceURI;
061: }
062:
063: /**
064: * Get the escaped source URI
065: *
066: * @return Escaped source URI
067: */
068: public String getEscapedSourceURI() {
069: return BlojsomUtils.escapeString(_sourceURI);
070: }
071:
072: /**
073: * Set the source URI
074: *
075: * @param sourceURI Source URI
076: */
077: public void setSourceURI(String sourceURI) {
078: _sourceURI = sourceURI;
079: }
080:
081: /**
082: * Get the target URI
083: *
084: * @return Target URI
085: */
086: public String getTargetURI() {
087: return _targetURI;
088: }
089:
090: /**
091: * Get the escaped target URI
092: *
093: * @return Escaped target URI
094: */
095: public String getEscapedTargetURI() {
096: return BlojsomUtils.escapeString(_targetURI);
097: }
098:
099: /**
100: * Set the target URI
101: *
102: * @param targetURI Target URI
103: */
104: public void setTargetURI(String targetURI) {
105: _targetURI = targetURI;
106: }
107:
108: /**
109: * Get the response type
110: *
111: * @return Response type
112: */
113: public String getType() {
114: return PINGBACK_TYPE;
115: }
116: }
|