|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ou.kmi.buddyspace.core.BSIndividualPresences
BSIndividualPresences
stores individually set presences
different from overall presence. A different presence can be set for each JID.
There are two policies for overriding the presence when set several times:
(i) use better presence or (ii) use worse presence.
Nested Class Summary | |
static class |
BSIndividualPresences.BSIndividualPresenceItem
Represents individual presence and its receiver JID |
Field Summary | |
static int |
BETTER_TAKES_POLICY
|
static int |
WORSE_TAKES_POLICY
|
Constructor Summary | |
BSIndividualPresences(BSPresenceBean presenceBean)
Constructor |
Method Summary | |
void |
clearAll()
Resets all individual presences - no special presences will be sent |
void |
clearPresence(JID jid)
Resets individual presence for JID - no special presence will be sent |
void |
combineWithGroupPresences()
Combines resultant presences according to settings for groups |
void |
combineWithJIDPresences()
Combines resultant presences according to settings for JIDs |
protected void |
combineWithOverallPresence(BSPresenceInfo overallPresence)
Combines the resultant presences with overall presence. |
protected void |
combineWithPreviousOfflineFix(BSPresenceInfo overallPresence)
Combines resultant presences with presences needed to be sent because of previous offline for the JID |
java.util.Enumeration |
getItems()
Returns Enumeration of result individual presences for JIDs |
int |
getPolicy()
Returnss the policy of overriding |
BSPresenceInfo |
getPresenceSettingFor(JID jid)
Returns individually set presence for JID - not combined with group settings |
BSPresenceInfo |
getResultPresenceFor(JID jid)
Returns individual presence for JID after combining all |
protected boolean |
isStrongerPresence(BSPresenceInfo first,
BSPresenceInfo second)
Returns if the first presence is stronger accoring to current policy - if equal returns false. |
protected void |
maybeUpdateResultPresence(java.lang.String groupName,
BSPresenceInfo pi)
If given presence is stronger, updates the resultant presence for jid |
void |
refreshPresences()
Recounts the resultant presences for all JIDs |
void |
setPolicy(int policy)
Sets the policy of overriding |
void |
setPresence(JID jid,
BSPresenceInfo pi)
Sets presence for JID |
void |
setRosterBean(BSRosterBean rosterBean)
Sets roster bean for getting groups |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BETTER_TAKES_POLICY
public static final int WORSE_TAKES_POLICY
Constructor Detail |
public BSIndividualPresences(BSPresenceBean presenceBean)
Method Detail |
public void setRosterBean(BSRosterBean rosterBean)
public void setPolicy(int policy)
public int getPolicy()
public void setPresence(JID jid, BSPresenceInfo pi)
public void clearPresence(JID jid)
public void clearAll()
public java.util.Enumeration getItems()
public BSPresenceInfo getResultPresenceFor(JID jid)
public BSPresenceInfo getPresenceSettingFor(JID jid)
public void refreshPresences()
public void combineWithGroupPresences()
protected void combineWithOverallPresence(BSPresenceInfo overallPresence)
public void combineWithJIDPresences()
protected void combineWithPreviousOfflineFix(BSPresenceInfo overallPresence)
protected void maybeUpdateResultPresence(java.lang.String groupName, BSPresenceInfo pi)
protected boolean isStrongerPresence(BSPresenceInfo first, BSPresenceInfo second)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |