org.mmbase.applications.mmbob
Class Poster

java.lang.Object
  extended byorg.mmbase.applications.mmbob.Poster

public class Poster
extends Object

Author:
Daniel Ockeloen

Constructor Summary
Poster(Node node, Forum parent, boolean prefixwanted)
          Contructor
 
Method Summary
 void addBookmarkedThread(int threadid)
           
 Mailbox addMailbox(String name, String description, int editstate, int maxmessages, int maxsize, int carboncopymode, int pos)
          Add a new mailbox for the poster
 void addPostCount()
          increases postcount for this poster
 void addProfileInfo(ProfileInfo pi)
           
 void addSignature(Signature sig)
           
 void addSignature(String body, String mode, String encoding)
           
 boolean checkDuplicatePost(String subject, String body)
           
 void checkRemoteHost(String host)
           
 void decPostCount()
          decreases postcount for this poster
 void deleteSignature(Signature sig)
           
 boolean disable()
          disable the poster
 boolean enable()
          enable the poster
 String filterEmail(String body)
           
 String filterEmail(String body, PostThread t)
           
 String getAccount()
          get accountname / nick from this poster
 int getAvatar()
          get the MMBase objectnumber of the avatar (images-object)
 Iterator getBookmarkedThreads(int page, int pagesize)
           
 String getEmail()
          get the Emailaddress of the poster
 int getFirstLogin()
          get the date/time (epoch) of the first login of the poster
 String getFirstName()
          get the firstname of the poster
 String getGender()
          get the gender of the poster
 int getId()
          get the MMBase objectnumber of the poster
 String getLastName()
          get the lastname of the poster
 int getLastPostTime()
           
 RemoteHost getLastRemoteHost()
           
 int getLastSeen()
          get the date/time (epoch) when the poster was last seen
 int getLastSessionEnd()
          get the date/time (epoch) when the poster ended the last session
 String getLevel()
          get the level of the poster
 String getLevelGui()
           
 String getLevelImage()
           
 String getLocation()
          get the location of the poster
 Mailbox getMailbox(String name)
          get the poster's mailbox by the name
 String getNick()
           
 Node getNode()
          get a node for a poster
 Forum getParent()
           
 String getPassword()
           
 int getPostCount()
          get the number of posts of this poster
 ProfileInfo getProfileInfo()
           
 ProfileEntry getProfileValue(String name)
           
 Iterator getProfileValues()
           
 int getQuotaNumber()
           
 int getQuotaUsedNumber()
           
 RemoteHost getRemoteHost(String host)
           
 Iterator getRemoteHosts()
           
 int getSessionStart()
          get the date/time (epoch) when the poster started this session
 String getSignature()
           
 Signature getSignature(int sigid)
           
 Iterator getSignatures()
           
 Signature getSingleSignature()
           
 boolean isBlocked()
          Check if the poster is blocked
 boolean isQuotaReached()
           
 void mailboxChanged(Mailbox mb)
           
 boolean profileUpdated()
          Signal that the profile of the poster has been updated and re-read the (avatar) images
 void readRemoteHosts()
           
 boolean remove()
          remove the poster
 void removeBookmarkedThread(int threadid)
           
 boolean removeMailbox(String name)
          remove the poster's mailbox by the name
 void savePoster()
          Save the poster, and add the node to the syncQueue
 void seenThread(PostThread t)
          add the MMbase threadid to the HashMap of seen threads.
 void sendEmailOnChange(PostThread t)
           
 void sendUpdateMail()
           
 void setAliasedFirstName(String a_firstname)
           
 void setAliasedLastName(String a_lastname)
           
 void setAliasedPassword(String a_password)
           
 void setEmail(String email)
          set the email-address for this poster
 void setFirstName(String firstname)
          set the firstname for this poster
 void setGender(String gender)
          set the gender for this poster
 void setId(int id)
          set the id (MMBase object number) for this poster
 void setLastBody(String lastbody)
           
 void setLastName(String lastname)
          set the lastname for this poster
 void setLastPostTime(int lastposttime)
           
 void setLastSubject(String lastsubject)
           
 void setLocation(String location)
          set the location for this poster
 void setPassword(String password)
           
 void setPostCount(int postcount)
          set the number of posts for this poster
 String setProfileValue(String name, String value)
           
 void signalSeen()
          update "lastseen" for the poster, and add the posternode to the syncQueue
 boolean viewedThread(int id, Integer lastposttime)
          determine if the poster has viewed this thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Poster

public Poster(Node node,
              Forum parent,
              boolean prefixwanted)
Contructor

Parameters:
node - poster Node
parent - Forum that the poster belongs to
Method Detail

addPostCount

public void addPostCount()
increases postcount for this poster


decPostCount

public void decPostCount()
decreases postcount for this poster


setId

public void setId(int id)
set the id (MMBase object number) for this poster

Parameters:
id -

setFirstName

public void setFirstName(String firstname)
set the firstname for this poster

Parameters:
firstname -

setLastName

public void setLastName(String lastname)
set the lastname for this poster

Parameters:
lastname -

setEmail

public void setEmail(String email)
set the email-address for this poster

Parameters:
email -

setGender

public void setGender(String gender)
set the gender for this poster

Parameters:
gender -

setLocation

public void setLocation(String location)
set the location for this poster

Parameters:
location -

setPostCount

public void setPostCount(int postcount)
set the number of posts for this poster

Parameters:
postcount - Number of posts

getAccount

public String getAccount()
get accountname / nick from this poster

Returns:
accountname / nick

getNick

public String getNick()

getAvatar

public int getAvatar()
get the MMBase objectnumber of the avatar (images-object)


getEmail

public String getEmail()
get the Emailaddress of the poster

Returns:
Emailaddress

viewedThread

public boolean viewedThread(int id,
                            Integer lastposttime)
determine if the poster has viewed this thread

Parameters:
id - MMBase object number of the thread to
lastposttime - Date/time (Epoch) of the last post in the thread
Returns:
true if the thread was viewed by this poster, false if it wasn't. Also returns false if the postthread contains new post(s) since the poster last viewed this thread.

seenThread

public void seenThread(PostThread t)
add the MMbase threadid to the HashMap of seen threads.

Parameters:
t - MMBase objectnumber of the thread

getFirstName

public String getFirstName()
get the firstname of the poster

Returns:
firstname

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

setAliasedPassword

public void setAliasedPassword(String a_password)

setAliasedFirstName

public void setAliasedFirstName(String a_firstname)

setAliasedLastName

public void setAliasedLastName(String a_lastname)

getLastName

public String getLastName()
get the lastname of the poster

Returns:
lastname

getPostCount

public int getPostCount()
get the number of posts of this poster

Returns:
number of posts

getLevel

public String getLevel()
get the level of the poster

Returns:
level

getLevelGui

public String getLevelGui()

getLevelImage

public String getLevelImage()

getGender

public String getGender()
get the gender of the poster

Returns:
gender

getLocation

public String getLocation()
get the location of the poster

Returns:
location

getFirstLogin

public int getFirstLogin()
get the date/time (epoch) of the first login of the poster

Returns:
date/time (epoch)

getLastSeen

public int getLastSeen()
get the date/time (epoch) when the poster was last seen

Returns:
date/time (epoch)

getSessionStart

public int getSessionStart()
get the date/time (epoch) when the poster started this session

Returns:
date/time (epoch)

getLastSessionEnd

public int getLastSessionEnd()
get the date/time (epoch) when the poster ended the last session

Returns:
date/time (epoch)

getId

public int getId()
get the MMBase objectnumber of the poster

Returns:
MMBase objectnumber of the poster

getNode

public Node getNode()
get a node for a poster

Returns:
poster

signalSeen

public void signalSeen()
update "lastseen" for the poster, and add the posternode to the syncQueue


savePoster

public void savePoster()
Save the poster, and add the node to the syncQueue


profileUpdated

public boolean profileUpdated()
Signal that the profile of the poster has been updated and re-read the (avatar) images

Returns:
true if this method is called

remove

public boolean remove()
remove the poster

Returns:
true if this method is called

disable

public boolean disable()
disable the poster

Returns:
true if this method is called

enable

public boolean enable()
enable the poster

Returns:
true if this method is called

isBlocked

public boolean isBlocked()
Check if the poster is blocked

Returns:
true if this method is called

getMailbox

public Mailbox getMailbox(String name)
get the poster's mailbox by the name

Parameters:
name -
Returns:
the mailbox

removeMailbox

public boolean removeMailbox(String name)
remove the poster's mailbox by the name

Parameters:
name -
Returns:
true if the remove action was successfull, false if it wasn't.

addMailbox

public Mailbox addMailbox(String name,
                          String description,
                          int editstate,
                          int maxmessages,
                          int maxsize,
                          int carboncopymode,
                          int pos)
Add a new mailbox for the poster

Parameters:
name - name of the mailbox
description - description of the mailbox
editstate - ToDo: doc
maxmessages - maximum number of messages for the mailbox
maxsize - maximum size of the mailbox in
carboncopymode - ToDo: doc
pos - ToDo: doc
Returns:
The newly created MailBox. null if the creation of the mailbox didn't succeed.

isQuotaReached

public boolean isQuotaReached()

getQuotaUsedNumber

public int getQuotaUsedNumber()

getQuotaNumber

public int getQuotaNumber()

mailboxChanged

public void mailboxChanged(Mailbox mb)

setLastSubject

public void setLastSubject(String lastsubject)

setLastBody

public void setLastBody(String lastbody)

checkDuplicatePost

public boolean checkDuplicatePost(String subject,
                                  String body)

getLastPostTime

public int getLastPostTime()

setLastPostTime

public void setLastPostTime(int lastposttime)

getSignature

public String getSignature()

getSingleSignature

public Signature getSingleSignature()

getSignature

public Signature getSignature(int sigid)

addSignature

public void addSignature(String body,
                         String mode,
                         String encoding)

addSignature

public void addSignature(Signature sig)

addProfileInfo

public void addProfileInfo(ProfileInfo pi)

setProfileValue

public String setProfileValue(String name,
                              String value)

getProfileInfo

public ProfileInfo getProfileInfo()

getProfileValues

public Iterator getProfileValues()

getProfileValue

public ProfileEntry getProfileValue(String name)

deleteSignature

public void deleteSignature(Signature sig)

getSignatures

public Iterator getSignatures()

getRemoteHosts

public Iterator getRemoteHosts()

checkRemoteHost

public void checkRemoteHost(String host)

getLastRemoteHost

public RemoteHost getLastRemoteHost()

getRemoteHost

public RemoteHost getRemoteHost(String host)

readRemoteHosts

public void readRemoteHosts()

sendEmailOnChange

public void sendEmailOnChange(PostThread t)

sendUpdateMail

public void sendUpdateMail()

filterEmail

public String filterEmail(String body,
                          PostThread t)

filterEmail

public String filterEmail(String body)

getBookmarkedThreads

public Iterator getBookmarkedThreads(int page,
                                     int pagesize)

addBookmarkedThread

public void addBookmarkedThread(int threadid)

removeBookmarkedThread

public void removeBookmarkedThread(int threadid)

getParent

public Forum getParent()


MMBase build 1.8.1.20060716