Enum Sync
- java.lang.Object
-
- java.lang.Enum<Sync>
-
- org.gcube.informationsystem.resourceregistry.api.rest.Sync
-
- All Implemented Interfaces:
Serializable,Comparable<Sync>
public enum Sync extends Enum<Sync>
The Contexts that a write of a Resource reaches besides the token Context: the value of thesyncquery parameter ofPOST /instances/{type}andPUT /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,
syncaccepts 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"). UsetoString()to obtain the wire value andfromString(String)to parse it; only the exact lowercase values are accepted.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SyncfromString(String s)Parses an exact lowercase wire value.StringtoString()Returns the lowercase wire value (e.g.static SyncvalueOf(String name)Returns the enum constant of this type with the specified name.static Sync[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
DEFAULT
public static final Sync DEFAULT
The default when no parameter is supplied.
-
-
Method Detail
-
values
public static Sync[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Sync c : Sync.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Sync valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
public static Sync fromString(String s)
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
-
-