|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.json.EncodeControl
public class EncodeControl
Control object for regulating the behavior of an encoding operation. When an object is being serialized to JSON, the choice of the subset of the object's state that actually gets written can vary depending on the intended destination or use for the data. Currently, there are two cases: encoding for the client and encoding for the repository. However, additional cases are possible; for example, a representation being sent to a client might vary depending on whether the user of the client is the "owner" of the object in question or not. This class exists to provide a place to extend the range of options, though the base case only supports the client vs. repository distinction.
| Field Summary | |
|---|---|
static EncodeControl |
forClient
A global, encoding control representing the intention to encode for the client. |
static EncodeControl |
forRepository
A global, encoding control representing the intention to encode for the repository. |
| Method Summary | |
|---|---|
boolean |
toClient()
Test if this controller says to encode for the client. |
boolean |
toRepository()
Test if this controller says to encode for the repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final EncodeControl forClient
public static final EncodeControl forRepository
| Method Detail |
|---|
public boolean toClient()
public boolean toRepository()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||