org.elkoserver.server.context.mods
Class TalkOptions
java.lang.Object
org.elkoserver.server.context.Mod
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.
| Methods inherited from class org.elkoserver.server.context.Mod |
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object |
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.
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.