org.elkoserver.server.context.mods
Class Invisible

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

public class Invisible
extends Mod
implements ObjectCompletionWatcher, ItemMod

Marker mod to indicate that an item should be hidden from clients. This mod only makes sense when attached to items, not to contexts or users. If this mod is attached to an item, that item and its contents will be omitted from the description of the containing context that is transmitted to users who enter that context.


Method Summary
 JSONLiteral encode(EncodeControl control)
          Encode this mod for transmission or persistence.
 void objectIsComplete()
          Mark the item as invisible, now that there's an item to mark.
 
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
 

Method Detail

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.

objectIsComplete

public void objectIsComplete()
Mark the item as invisible, now that there's an item to mark.

Application code should not call this method.

Specified by:
objectIsComplete in interface ObjectCompletionWatcher