org.mmbase.applications.mmbob
Class Posting

java.lang.Object
  extended by org.mmbase.applications.mmbob.Posting

public class Posting
extends Object

Version:
$Id: Posting.java 35620 2009-06-03 13:46:59Z michiel $
Author:
Daniel Ockeloen

Constructor Summary
Posting(Node node, PostThread parent, boolean prefixwanted)
          Construct the posting
 
Method Summary
 String getBody(String imagecontext)
          get the body of this posting
 String getBodyHtml(String imagecontext)
          get the html body of this posting meaning this will be decoded with BBCodes, Urls, Security checks..
 String getDirectBody()
           
 int getEditTime()
          get the date/time of the last time this posting was editted
 int getId()
          get the id of this posting
 int getMemorySize()
           
 PostThread getParent()
           
 String getPoster()
          get the accountname/nick of the poster of this posting
 int getPostTime()
          get the date/time (epoch) when this posting was posted
 String getSubject()
          get the subject of this posting
 int getThreadPos()
           
 boolean inBody(String searchkey)
           
 boolean inSubject(String searchkey)
           
 boolean remove()
          Delete a posting and signal the parent postthread that the posting must be removed
 boolean save()
          save the node to the cloud
 void setBody(String body, String imagecontext, boolean parsed)
          set the body of the posting
 void setEditTime(int time)
          set the date/time of the last time this posting was editted
 void setId(int id)
          Set the id of this postingnode
 void setNode(Node node)
          set the node of this posting
 void setPostTime(int time)
          set the date/time of the last time this posting was posted
 void setSubject(String subject)
          set the subject of the posting
 void setThreadPos(int threadpos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Posting

public Posting(Node node,
               PostThread parent,
               boolean prefixwanted)
Construct the posting

Parameters:
node - postingnode
parent - postthread
Method Detail

getMemorySize

public int getMemorySize()

setId

public void setId(int id)
Set the id of this postingnode

Parameters:
id - posting id

setThreadPos

public void setThreadPos(int threadpos)

setSubject

public void setSubject(String subject)
set the subject of the posting

Parameters:
subject -

setBody

public void setBody(String body,
                    String imagecontext,
                    boolean parsed)
set the body of the posting

Parameters:
body -
imagecontext - The context where to find the images (eg smilies)

setEditTime

public void setEditTime(int time)
set the date/time of the last time this posting was editted

Parameters:
time - Date/time (Epoch)

setPostTime

public void setPostTime(int time)
set the date/time of the last time this posting was posted

Parameters:
time - Date/time (Epoch)

getEditTime

public int getEditTime()
get the date/time of the last time this posting was editted

Returns:
Date/time (Epoch)

getId

public int getId()
get the id of this posting


getThreadPos

public int getThreadPos()

setNode

public void setNode(Node node)
set the node of this posting

Parameters:
node - posting

getSubject

public String getSubject()
get the subject of this posting

Returns:
subject of this posting

getDirectBody

public String getDirectBody()

getBody

public String getBody(String imagecontext)
get the body of this posting

Parameters:
imagecontext - The context where to find the images (eg smilies)
Returns:
body of this posting

getBodyHtml

public String getBodyHtml(String imagecontext)
get the html body of this posting meaning this will be decoded with BBCodes, Urls, Security checks.. needs a better caching system that doesn't take memory again, probably some flipper system that either the decoded or encoded is caches depending on use.

Parameters:
imagecontext - The context where to find the images (eg smilies)
Returns:
body of this posting

inBody

public boolean inBody(String searchkey)

inSubject

public boolean inSubject(String searchkey)

getPoster

public String getPoster()
get the accountname/nick of the poster of this posting

Returns:
accountname/nick of the poster

getPostTime

public int getPostTime()
get the date/time (epoch) when this posting was posted

Returns:
date/time (epoch)

remove

public boolean remove()
Delete a posting and signal the parent postthread that the posting must be removed

Returns:
allways true

save

public boolean save()
save the node to the cloud

Returns:
allways true

getParent

public PostThread getParent()


MMBase 2.0-SNAPSHOT - null