|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.context.BasicObject
org.elkoserver.server.context.Item
public class Item
A Item is an application object contained by a context or a user (or another
Item) but which is not a context or user itself. Along with Context
and User it is one of the three basic object types.
| Field Summary |
|---|
| Fields inherited from class org.elkoserver.server.context.BasicObject |
|---|
VIS_CONTAINER, VIS_NONE, VIS_PERSONAL, VIS_PUBLIC |
| Method Summary | |
|---|---|
protected void |
baseEncode(JSONLiteral result,
EncodeControl control)
|
BasicObject |
container()
Obtain this item's container. |
Context |
context()
Obtain the context in which this item is located, regardless of how deeply nested in containers it might be. |
void |
delete()
Delete this item (and, by implication, its contents). |
void |
delete(User from)
Message handler for the 'delete' message. |
JSONLiteral |
encode(EncodeControl control)
Encode this item for transmission or persistence. |
BasicObject |
holder()
Obtain the user or context holding this object, regardless of how deeply nested in containers it might be. |
boolean |
isDeletable()
Test if unprivileged users inside the context can delete this item (by sending a 'delete' message to the server). |
boolean |
isPortable()
Test if unprivileged users inside the context can move this item (by sending a 'move' message to the server). |
void |
sendObjectDescription(Deliverer to,
Referenceable maker)
Transmit a description of this item as a series of 'make' messages, such that the receiver will be able to construct a local presence of it. |
void |
setContainer(BasicObject container)
Set or change this item's container. |
String |
toString()
Obtain a printable string representation of this item. |
User |
user()
Obtain the user within which this item is contained, regardless of how deeply nested in containers it might be. |
| Methods inherited from class org.elkoserver.server.context.BasicObject |
|---|
baseRef, checkpoint, checkpoint, contents, contextor, createItem, findActualTarget, getMod, handleMessage, isClone, isContainer, isEphemeral, markAsChanged, markAsDeleted, markAsEphemeral, name, noteCodependent, objectIsComplete, position, ref, sendToClones, setName, setPosition, setVisibility, visibleTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public BasicObject container()
container in class BasicObjectpublic Context context()
context in class BasicObjectpublic void delete()
protected void baseEncode(JSONLiteral result,
EncodeControl control)
public JSONLiteral encode(EncodeControl control)
control - Encode control determining what flavor of encoding
should be done.
public BasicObject holder()
holder in class BasicObjectpublic boolean isDeletable()
public boolean isPortable()
public void sendObjectDescription(Deliverer to,
Referenceable maker)
sendObjectDescription in class BasicObjectto - Where to send the description.maker - Maker object to address the message(s) to.public void setContainer(BasicObject container)
container - The new container for this item, or null to indicate
that it should now have no container.public String toString()
toString in class Objectpublic User user()
user in class BasicObject
@JSONMethod
public void delete(User from)
throws MessageHandlerException
If the item is deletable, the item is deleted and a 'delete' message is broadcast to everyone in the context informing them of this.
MessageHandlerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||