pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.cms.model
Class Page

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.cms.model.Page
All Implemented Interfaces:
java.io.Serializable, JDOMable

@Entity
public class Page
extends AbstractBasicEntity
implements JDOMable

represents a Page of a CMSContent.

A Page is an entity encapsulating an XML document which represents one page of an article. The article itself is represented by a CMSContent.

Version:
$Revision: 2022 $
Author:
Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Constructor Summary
Page()
          creates a new empty Page.
 
Method Summary
 org.jdom.Element deserializeToJDOM()
          this will deserialize the state of the JDOMable as a JDOM Element.
 org.jdom.Element getContents()
          returns the content of the Page as an Element.
 java.lang.String getContentString()
          returns a string-representation of the pages content.
 void setContents(org.jdom.Element content)
          sets a new content for the Page.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Page

public Page()
creates a new empty Page.

Method Detail

getContents

public final org.jdom.Element getContents()
                                   throws org.jdom.JDOMException,
                                          java.io.IOException
returns the content of the Page as an Element.

Returns:
the content of the Page as an Element
Throws:
org.jdom.JDOMException - on errors parsing the content of the Page
java.io.IOException - on errors reading the content of the Page

getContentString

public final java.lang.String getContentString()
returns a string-representation of the pages content.

Returns:
a string-representation of the pages content or empty string "" if pages content null

setContents

public final void setContents(org.jdom.Element content)
sets a new content for the Page.

Parameters:
content - the content to be set

deserializeToJDOM

public org.jdom.Element deserializeToJDOM()
Description copied from interface: JDOMable
this will deserialize the state of the JDOMable as a JDOM Element.

Specified by:
deserializeToJDOM in interface JDOMable
Returns:
a JDOM representation of the Page