org.mmbase.applications.mmbob
Class PostThread

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

public class PostThread
extends Object

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

Constructor Summary
PostThread(PostArea parent, Node node, boolean prefixwanted)
           
 
Method Summary
 void addWriter(Posting p)
          add the accountname/nick of the Poster of the given Posting in the Posthread to the writers vector
 void childRemoved(Posting p)
          signal that a child (posting) has been removed inside this postthread.
 String getCreator()
           
 int getId()
           
 String getLastPoster()
           
 int getLastPosterNumber()
           
 int getLastPostNumber()
           
 int getLastPostTime()
           
 String getLastSubject()
           
 int getLastUsed()
           
 int getMemorySize()
           
 String getMood()
           
 String getNavigationLine(String baseurl, int page, int pagesize, int overflowpage, String cssclass)
          I hate how this is done but don't see a way to get this fast enough any other way.
 String getNavigationLine(String baseurl, int pagesize, int overflowpage, String cssclass)
           
 int getPageCount(int pagesize)
           
 PostArea getParent()
           
 int getPostCount()
           
 Posting getPosting(int postingid)
           
 Posting getPostingPos(int pos)
           
 Iterator<Posting> getPostings(int page, int pagecount)
           
 String getState()
           
 String getState(Poster ap)
           
 String getSubject()
           
 String getType()
           
 int getViewCount()
           
 boolean isLastPage(int page, int pagesize)
           
 boolean isLoaded()
           
 boolean isWriter(String asker)
          determine if the given accountname/nick is a writer in this PostThread
 int postReply(String nsubject, Poster poster, String nbody, boolean parsed)
           
 void readPostings()
          Fill the postings vector with all Postings within the PostThread
 boolean remove()
          remove the whole PostThread
 boolean save()
           
 List<Posting> searchPostings(List results, String searchkey, int posterid)
           
 List<Posting> searchPostings(String searchkey, int posterid)
           
 void setId(int id)
           
 void setLastSubject(String subject)
           
 void setLoaded(boolean loaded)
           
 void setMood(String mood)
           
 void setState(String staten)
           
 void setSubject(String subject)
           
 void setType(String ttype)
           
 void swapOut()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostThread

public PostThread(PostArea parent,
                  Node node,
                  boolean prefixwanted)
Method Detail

setId

public void setId(int id)

getId

public int getId()

getSubject

public String getSubject()

setSubject

public void setSubject(String subject)

getState

public String getState(Poster ap)

getState

public String getState()

setState

public void setState(String staten)

setMood

public void setMood(String mood)

setType

public void setType(String ttype)

getMood

public String getMood()

getType

public String getType()

getCreator

public String getCreator()

getPostCount

public int getPostCount()

getViewCount

public int getViewCount()

getLastPoster

public String getLastPoster()

getLastPosterNumber

public int getLastPosterNumber()

getLastPostNumber

public int getLastPostNumber()

getLastPostTime

public int getLastPostTime()

getLastSubject

public String getLastSubject()

setLastSubject

public void setLastSubject(String subject)

getPostings

public Iterator<Posting> getPostings(int page,
                                     int pagecount)

getPostingPos

public Posting getPostingPos(int pos)

save

public boolean save()

postReply

public int postReply(String nsubject,
                     Poster poster,
                     String nbody,
                     boolean parsed)

readPostings

public void readPostings()
Fill the postings vector with all Postings within the PostThread


isLastPage

public boolean isLastPage(int page,
                          int pagesize)

getPageCount

public int getPageCount(int pagesize)

getNavigationLine

public String getNavigationLine(String baseurl,
                                int page,
                                int pagesize,
                                int overflowpage,
                                String cssclass)
I hate how this is done but don't see a way to get this fast enough any other way.


getNavigationLine

public String getNavigationLine(String baseurl,
                                int pagesize,
                                int overflowpage,
                                String cssclass)

getPosting

public Posting getPosting(int postingid)

remove

public boolean remove()
remove the whole PostThread

Returns:
true if the removal was successful

addWriter

public void addWriter(Posting p)
add the accountname/nick of the Poster of the given Posting in the Posthread to the writers vector

Parameters:
p - Posting

isWriter

public boolean isWriter(String asker)
determine if the given accountname/nick is a writer in this PostThread

Parameters:
asker - accountname/nick to be evaluated
Returns:
true if the accountname/nick is a writer in this thread. false if he isn't.

childRemoved

public void childRemoved(Posting p)
signal that a child (posting) has been removed inside this postthread.

Parameters:
p - posting that has been removed

getParent

public PostArea getParent()

getLastUsed

public int getLastUsed()

isLoaded

public boolean isLoaded()

setLoaded

public void setLoaded(boolean loaded)

swapOut

public void swapOut()

getMemorySize

public int getMemorySize()

searchPostings

public List<Posting> searchPostings(String searchkey,
                                    int posterid)

searchPostings

public List<Posting> searchPostings(List results,
                                    String searchkey,
                                    int posterid)


MMBase 2.0-SNAPSHOT - null