|
|||||||||
| Home >> All >> com >> RuntimeCollective >> content >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.content.bean
Class TextComponent

java.lang.Objectcom.RuntimeCollective.content.bean.SimpleContent
com.RuntimeCollective.content.bean.TextComponent
- All Implemented Interfaces:
- Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable
- public class TextComponent
- extends SimpleContent
This class is a basic Content holding a piece of text. It doesn't have a title nor a description: those are inferred from the text. TextComponent can be used as is to store eg news items. Alternatively, it can be composed by a more complex Content, such as a website's Page, or a nice Article.
- Version:
- $Id: TextComponent.java,v 1.33 2003/10/03 14:47:40 criss Exp $
| Field Summary | |
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
protected java.lang.String |
Format
The Format |
protected static int |
MAX_DESCRIPTION_LENGTH
The max length of the description. |
protected java.lang.String |
Text
The Text |
protected java.lang.String |
Title
The Title This shouldn't really be there - TextComponent is only a bit of text. |
| Fields inherited from class com.RuntimeCollective.content.bean.SimpleContent |
Author_id, CreationDate, id, LastModifiedDate, LastModifierUser_id |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
| Constructor Summary | |
TextComponent()
Construct a new blank textcomponent, giving it a new unique ID. |
|
TextComponent(int id)
Get a current textcomponent from the RuntimeDataSource, given an id. |
|
| Method Summary | |
void |
delete()
Delete this TextComponent from the database. |
java.lang.String |
getDescription()
Get the description Returns the first 50 chars of the text, if any. |
java.lang.String |
getFormat()
Get the Format |
java.lang.String |
getText()
Get the Text |
java.lang.String |
getTitle()
Get the title |
void |
save()
Save this TextComponent to the database. |
void |
setDescription(java.lang.String description)
Set the description. |
void |
setFormat(java.lang.String format)
Set the Format |
void |
setText(java.lang.String text)
Set the Text |
void |
setTextAsHtml(java.lang.String text,
java.lang.String oldFormat)
Upload some plain text, transform it to html, and set the content's type to html |
void |
setTitle(java.lang.String title)
Set the Title |
java.lang.Object |
viewFormat(java.lang.String format)
Get the content in a certain format. |
| Methods inherited from class com.RuntimeCollective.content.bean.SimpleContent |
customiseDuplicate, getAuthor, getCreationDate, getId, getLastModifiedDate, getLastModifierUser, makeDuplicate, makeDuplicate, setAuthor, setCreationDate, setId, setLastModifiedDate, setLastModifierUser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
MAX_DESCRIPTION_LENGTH
protected static int MAX_DESCRIPTION_LENGTH
- The max length of the description.
Title
protected java.lang.String Title
- The Title
This shouldn't really be there - TextComponent is only a bit of text.
But it's needed by the SE project for some boxes.
Format
protected java.lang.String Format
- The Format
Text
protected java.lang.String Text
- The Text
| Constructor Detail |
TextComponent
public TextComponent()
throws java.sql.SQLException
- Construct a new blank textcomponent, giving it a new unique ID.
TextComponent
public TextComponent(int id)
throws java.sql.SQLException
- Get a current textcomponent from the RuntimeDataSource, given an id.
| Method Detail |
save
public void save()
throws java.sql.SQLException
- Save this TextComponent to the database.
- Specified by:
savein interfacecom.RuntimeCollective.webapps.bean.EntityBean- Overrides:
savein classSimpleContent
delete
public void delete()
throws java.sql.SQLException
- Delete this TextComponent from the database.
- Specified by:
deletein interfacecom.RuntimeCollective.webapps.bean.EntityBean- Overrides:
deletein classSimpleContent
getTitle
public java.lang.String getTitle()
- Get the title
- Specified by:
getTitlein interfaceContent- Overrides:
getTitlein classSimpleContent
getDescription
public java.lang.String getDescription()
- Get the description
Returns the first 50 chars of the text, if any.
- Specified by:
getDescriptionin interfaceContent- Overrides:
getDescriptionin classSimpleContent
setDescription
public void setDescription(java.lang.String description)
- Set the description.
NB: This does nothing.
- Specified by:
setDescriptionin interfaceContent- Overrides:
setDescriptionin classSimpleContent
viewFormat
public java.lang.Object viewFormat(java.lang.String format)
- Get the content in a certain format.
"html", "htmlfull" and "plaintext" are supported for now.
If the desired format is "html", and if the init-param
convertLinksis set totrue, all links of the formhttp://...will be converted to hyperlinks.- Specified by:
viewFormatin interfaceContent- Overrides:
viewFormatin classSimpleContent
setTitle
public void setTitle(java.lang.String title)
- Set the Title
- Specified by:
setTitlein interfaceContent- Overrides:
setTitlein classSimpleContent
setFormat
public void setFormat(java.lang.String format)
- Set the Format
getFormat
public java.lang.String getFormat()
- Get the Format
setText
public void setText(java.lang.String text)
- Set the Text
getText
public java.lang.String getText()
- Get the Text
setTextAsHtml
public void setTextAsHtml(java.lang.String text, java.lang.String oldFormat)
- Upload some plain text, transform it to html, and set the content's type to html
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> content >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC