Package com.sodius.oslc.server.trs.model
Enum Class ResourceEvent.Type
- All Implemented Interfaces:
Serializable,Comparable<ResourceEvent.Type>,java.lang.constant.Constable
- Enclosing class:
ResourceEvent
Possible type of resource events.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract Class<? extends ChangeEvent> Convenient method to know the correspondingChangeEventclass.intgetId()Gets the constant id.of(ResourceSeed resourceSeed) Constructs aResourceEventof this type for the specified resource and current time.of(ResourceSeed resourceSeed, Date time) Constructs aResourceEventof this type for the specified resource and event time.static ResourceEvent.TypeReturns the enum constant of this class with the specified name.static ResourceEvent.TypevalueOfId(int id) Convenient method to get an instance given itsid.static ResourceEvent.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CREATED
Denotes the creation of the referenced resource. -
MODIFIED
Denotes a modification to the referenced resource. -
DELETED
Denotes the elimination of the referenced resource.
-
-
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
-
valueOfId
Convenient method to get an instance given itsid.- Parameters:
id- given constant id.- Returns:
- corresponding instance if any.
- Throws:
IllegalArgumentException- ifiddoes not correspond to any constant.
-
getId
public int getId()Gets the constant id. Implementations may use this id, along withvalueOfId(int), for optimal storing purposes.- Returns:
- constant id.
-
of
Constructs aResourceEventof this type for the specified resource and current time. Clients are advised to use this method for reporting events captured by listeners in the application.- Parameters:
resourceSeed- the event resource's seed. This is the minimal information that later enables to recompute the URI of the resource.- Returns:
- the corresponding
ResourceEventinstance.
-
of
Constructs aResourceEventof this type for the specified resource and event time. This method is mostly used by a store implementation when de-serializing aResourceEventinstance. Clients reporting events captured by listeners in the application are rather advised to use theof(ResourceSeed)method.- Parameters:
resourceSeed- the event resource's seed. This is the minimal information that later enables to recompute the URI of the resource.time- the event time.- Returns:
- the corresponding
ResourceEventinstance.
-
getChangeEventClass
Convenient method to know the correspondingChangeEventclass.- Returns:
- corresponding
ChangeEventclass.
-