org.randomcoder.article
Class ArticleAddCommand

java.lang.Object
  extended by org.randomcoder.article.ArticleAddCommand
All Implemented Interfaces:
Serializable, Producer<Article>
Direct Known Subclasses:
ArticleEditCommand

public class ArticleAddCommand
extends Object
implements Producer<Article>, Serializable

Command class used for adding articles.

 Copyright (c) 2006, Craig Condit. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
 
   * Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
     
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 

See Also:
Serialized Form

Field Summary
protected  String content
          Textual content.
protected  ContentType contentType
          Content type.
protected  String permalink
          Permalink.
protected  String summary
          Article summary.
protected  TagList tags
          Tags.
protected  String title
          Article title.
 
Constructor Summary
ArticleAddCommand()
           
 
Method Summary
 String getContent()
          Gets the textual content of the article.
 ContentType getContentType()
          Gets the content type of the article.
 String getPermalink()
          Gets the permalink for this article.
 String getSummary()
          Gets the summary text for this article.
 TagList getTags()
          Gets the tags for this article.
 String getTitle()
          Gets the title of the article.
 void produce(Article article)
          Writes out the contents of the form to the given article.
 void setContent(String content)
          Sets the textual content of the article.
 void setContentType(ContentType contentType)
          Sets the content type of the article.
 void setPermalink(String permalink)
          Sets the permalink for this article.
 void setSummary(String summary)
          Sets the summary text for this article.
 void setTags(TagList tags)
          Sets the tags for this article.
 void setTitle(String title)
          Sets the title of the article.
 String toString()
          Gets a string representation of this object, suitable for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

title

protected String title
Article title.


contentType

protected ContentType contentType
Content type.


permalink

protected String permalink
Permalink.


tags

protected TagList tags
Tags.


content

protected String content
Textual content.


summary

protected String summary
Article summary.

Constructor Detail

ArticleAddCommand

public ArticleAddCommand()
Method Detail

setTitle

public void setTitle(String title)
Sets the title of the article.

Parameters:
title - article title

getTitle

public String getTitle()
Gets the title of the article.

Returns:
article title

setContentType

public void setContentType(ContentType contentType)
Sets the content type of the article.

Parameters:
contentType - content type

getContentType

public ContentType getContentType()
Gets the content type of the article.

Returns:
content type

setPermalink

public void setPermalink(String permalink)
Sets the permalink for this article.

Parameters:
permalink - permalink

getPermalink

public String getPermalink()
Gets the permalink for this article.

Returns:
permalink

setTags

public void setTags(TagList tags)
Sets the tags for this article.

Parameters:
tags - tags

getTags

public TagList getTags()
Gets the tags for this article.

Returns:
tags

setContent

public void setContent(String content)
Sets the textual content of the article.

Parameters:
content - article content

getContent

public String getContent()
Gets the textual content of the article.

Returns:
article content

getSummary

public String getSummary()
Gets the summary text for this article.

Returns:
summary text

setSummary

public void setSummary(String summary)
Sets the summary text for this article.

Parameters:
summary - summary text

produce

public void produce(Article article)
Writes out the contents of the form to the given article.

Specified by:
produce in interface Producer<Article>
Parameters:
article - target object to write

toString

public String toString()
Gets a string representation of this object, suitable for debugging.

Overrides:
toString in class Object
Returns:
string representation of this object


Copyright © 2006-2010 Craig Condit. All Rights Reserved.