Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pebble.domain
Class Comment

    java.lang.Object
      net.sourceforge.pebble.domain.Content
          net.sourceforge.pebble.domain.Response
              net.sourceforge.pebble.domain.Comment

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, Permalinkable

    public class Comment

extends Response

Represents a blog comment.

Author:
  Simon Brown
See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sourceforge.pebble.domain.Response
`blogEntry, date, ipAddress, title`

Fields inherited from class net.sourceforge.pebble.domain.Content
`propertyChangeSupport`

Constructor Summary
`Comment()`

Method Summary
`java.lang.Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(java.lang.Object o)`
`java.lang.String` | `getAuthor()` Gets the name of the author.
`java.lang.String` | `getBody()` Gets the body of this comment.
`java.util.List<Comment>` | `getComments()` Gets a list of comments, in the order that they were left.
`java.lang.String` | `getContent()` Gets the content of this response.
`java.lang.String` | `getEmail()` Gets the author's e-mail address.
`int` | `getNumberOfParents()` Gets the number of parents that this comment has.
`Comment` | `getParent()` Gets the owning comment, if this comment is nested.
`java.lang.String` | `getPermalink()` Gets the permalink for this comment.
`java.lang.String` | `getSourceLink()` Gets the link to the source of this response.
`java.lang.String` | `getSourceName()` Gets the name of the source of this response.
`java.lang.String` | `getTruncatedBody()` Gets the body of this comment, truncated and without HTML tags.
`java.lang.String` | `getWebsite()` Gets the author's website.
`int` | `hashCode()`
`boolean` | `isAuthenticated()`
`void` | `setAuthenticated(boolean authenticated)`
`void` | `setAuthor(java.lang.String author)` Sets the author of this blog comment.
`void` | `setBody(java.lang.String body)` Sets the body of this comment.
`void` | `setEmail(java.lang.String email)` Sets the author's e-mail address.
`void` | `setParent(Comment parent)` Sets the owning comment.
`void` | `setTitle(java.lang.String title)` Sets the title of this comment.
`void` | `setWebsite(java.lang.String website)` Sets the author's website.

Methods inherited from class net.sourceforge.pebble.domain.Response
`getBlogEntry, getDate, getGuid, getId, getIpAddress, getSpamScore, getTitle, incrementSpamScore, isApproved, isPending, isRejected, setApproved, setDate, setIpAddress, setPending, setRejected`

Methods inherited from class net.sourceforge.pebble.domain.Content
`clearPropertyChangeEvents, getEvents, getPropertyChangeEvents, getState, getTruncatedContent, hasEvents, isDirty, nextEvent`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Comment

    public Comment()

Method Detail

### getBody

    public java.lang.String getBody()

  Gets the body of this comment.

  Returns:
    the body of this comment as a String

### getContent

    public java.lang.String getContent()

  Gets the content of this response.

  Specified by:
    `getContent` in class `Content`
  Returns:
    a String

### getTruncatedBody

    public java.lang.String getTruncatedBody()

  Gets the body of this comment, truncated and without HTML tags.

  Returns:
    the body of this comment as a String

### setTitle

    public void setTitle(java.lang.String title)

  Sets the title of this comment.

  Overrides:
    `setTitle` in class `Response`
  Parameters:
    `title` - the title of this comment as a String

### setBody

    public void setBody(java.lang.String body)

  Sets the body of this comment.

  Parameters:
    `body` - the body of this comment as a String

### getAuthor

    public java.lang.String getAuthor()

  Gets the name of the author.

  Returns:
    the name of the author as a String

### getSourceName

    public java.lang.String getSourceName()

  Gets the name of the source of this response.

  Specified by:
    `getSourceName` in class `Response`
  Returns:
    a String

### setAuthor

    public void setAuthor(java.lang.String author)

  Sets the author of this blog comment. If an author isn't specified, the author is set to be "Anonymous".

  Parameters:
    `author` - the name of the author

### getEmail

    public java.lang.String getEmail()

  Gets the author's e-mail address.

  Returns:
    the author's e-mail address as a String

### setEmail

    public void setEmail(java.lang.String email)

  Sets the author's e-mail address.

  Parameters:
    `email` - the e-mail address

### getWebsite

    public java.lang.String getWebsite()

  Gets the author's website.

  Returns:
    the author's website as a String

### getSourceLink

    public java.lang.String getSourceLink()

  Gets the link to the source of this response.

  Specified by:
    `getSourceLink` in class `Response`
  Returns:
    a String

### setWebsite

    public void setWebsite(java.lang.String website)

  Sets the author's website.

  Parameters:
    `website` - the website url

### getPermalink

    public java.lang.String getPermalink()

  Gets the permalink for this comment.

  Returns:
    a URL as a String

### getParent

    public Comment getParent()

  Gets the owning comment, if this comment is nested.

  Returns:
    a Comment instance, or null if this comment isn't nested

### setParent

    public void setParent(Comment parent)

  Sets the owning comment.

  Parameters:
    `parent` - the owning Comment instance

### getNumberOfParents

    public int getNumberOfParents()

  Gets the number of parents that this comment has.

  Returns:
    the number of parents as an int

### getComments

    public java.util.List<Comment> getComments()

  Gets a list of comments, in the order that they were left.

  Returns:
    a List of Comment instances

### clone

    public java.lang.Object clone()

  Creates and returns a copy of this object.

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    a clone of this instance.
  See Also:
    `Cloneable`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### isAuthenticated

    public boolean isAuthenticated()

### setAuthenticated

    public void setAuthenticated(boolean authenticated)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006, Simon Brown. All Rights Reserved.