org.elkoserver.server.context.mods
Class TalkOptions

java.lang.Object
  extended by org.elkoserver.server.context.Mod
      extended by org.elkoserver.server.context.mods.TalkOptions
All Implemented Interfaces:
Cloneable, DispatchTarget, Encodable, ContextMod

public class TalkOptions
extends Mod
implements ContextMod

Mod to hold a context's permissible chat text display style options. This mod must be attached to a context. It operates in conjunction with the TalkPrefs and Chat mods.


Constructor Summary
TalkOptions(StyleOptions styles)
          JSON-driven constructor.
 
Method Summary
 boolean allowedStyle(StyleDesc style)
          Test if this mod's style options are compatible with particular style settings.
 JSONLiteral encode(EncodeControl control)
          Encode this mod for transmission or persistence.
 
Methods inherited from class org.elkoserver.server.context.Mod
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TalkOptions

@JSONMethod(value="styles")
public TalkOptions(StyleOptions styles)
JSON-driven constructor.

Parameters:
styles - Permissible styles for chat text in the context to which this mod is attached.
Method Detail

allowedStyle

public boolean allowedStyle(StyleDesc style)
Test if this mod's style options are compatible with particular style settings.

Parameters:
style - The StyleDesc to test.
Returns:
true if 'style' is acceptable to this object, false if not.

encode

public JSONLiteral encode(EncodeControl control)
Encode this mod for transmission or persistence.

Specified by:
encode in interface Encodable
Parameters:
control - Encode control determining what flavor of encoding should be done.
Returns:
a JSON literal representing this mod.