Enum Class Sync
- All Implemented Interfaces:
Serializable,Comparable<Sync>,Constable
The Contexts that a write of a Resource reaches besides the token Context: the value of the
sync query parameter of POST /instances/{type} and
PUT /instances/{type}/{uuid}. The write is always on the token Context; every other
Context it reaches ends up with the same Resource and the same ConsistsOf instances.
Besides these values, sync accepts the UUID of a Context: the write then reaches
that Context only, besides the token Context.
The wire format uses lowercase values (e.g. "tree").
Use toString() to obtain the wire value and fromString(String)
to parse it; only the exact lowercase values are accepted.
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SyncfromString(String s) Parses an exact lowercase wire value.toString()Returns the lowercase wire value (e.g.static SyncReturns the enum constant of this class with the specified name.static Sync[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
The token Context only. -
TREE
The token Context and every Context of its subtree. -
EXISTING
The token Context and the descendants where the Resource is already present (PUTonly).
-
-
Field Details
-
DEFAULT
The default when no parameter is supplied.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Parses an exact lowercase wire value. Returnsnullfor any other string, a Context UUID included.- Parameters:
s- the wire string to parse- Returns:
- the matching
Sync, ornullif unrecognised
-
toString
Returns the lowercase wire value (e.g."tree").
-