|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.context.Mod
org.elkoserver.server.context.mods.Note
public class Note
Mod to hold a free-floating chunk of text. This mod must be attached to an item, not to a user or context.
| Constructor Summary | |
|---|---|
Note(String text,
StyleDesc style)
JSON-driven constructor. |
|
| Method Summary | |
|---|---|
void |
edit(User from,
OptString text,
StyleDesc style)
Message handler for the 'edit' message. |
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 |
|---|
@JSONMethod(value={"text","style"})
public Note(String text,
StyleDesc style)
text - The text of this note.style - How its text is to be displayed.| Method Detail |
|---|
public JSONLiteral encode(EncodeControl control)
encode in interface Encodablecontrol - Encode control determining what flavor of encoding
should be done.
@JSONMethod(value={"text","?style"})
public void edit(User from,
OptString text,
StyleDesc style)
throws MessageHandlerException
This message is a request from a client to change the text of this note or one or more of its style attributes. If the change is successful, a corresponding 'edit' message is broadcast to the context.
recv: { to:REF, op:"edit", text:optSTR,
style:optSTYLE }
send: { to:REF, op:"edit", text:optSTR,
style:optSTYLE }
from - The user who sent the message.text - New text string value (optional).style - New style information (optional).
MessageHandlerException - if 'from' is not in the same context as
this mod or if invalid style information is provided.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||