Class LastModification
- java.lang.Object
-
- com.inductiveautomation.ignition.common.project.resource.LastModification
-
public class LastModification extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LastModification
fromJson(com.inductiveautomation.ignition.common.gson.JsonElement json)
java.lang.String
getActor()
java.util.Date
getTimestamp()
static java.util.Optional<LastModification>
of(ProjectResource r)
com.inductiveautomation.ignition.common.gson.JsonElement
toJson()
static com.inductiveautomation.ignition.common.gson.JsonElement
toJson(LastModification lastModification)
static ProjectResource
update(ProjectResource resource, java.lang.String actor)
Create a newProjectResource
with a last modification entries in its attributes map.static boolean
verify(ProjectResource resource)
Verify thatresource
has aLastModification
attribute and that the signature of that LastModification is still valid given the contents of the resource.
-
-
-
Method Detail
-
getActor
public java.lang.String getActor()
-
getTimestamp
public java.util.Date getTimestamp()
-
toJson
public com.inductiveautomation.ignition.common.gson.JsonElement toJson()
-
fromJson
public static LastModification fromJson(com.inductiveautomation.ignition.common.gson.JsonElement json)
-
toJson
public static com.inductiveautomation.ignition.common.gson.JsonElement toJson(LastModification lastModification)
-
of
public static java.util.Optional<LastModification> of(ProjectResource r)
-
update
public static ProjectResource update(ProjectResource resource, java.lang.String actor)
Create a newProjectResource
with a last modification entries in its attributes map.- Parameters:
resource
- the originalProjectResource
to copy.actor
- the actor that made the last modification.- Returns:
- a new
ProjectResource
with a last modification entries in its attributes map.
-
verify
public static boolean verify(ProjectResource resource)
Verify thatresource
has aLastModification
attribute and that the signature of that LastModification is still valid given the contents of the resource.- Parameters:
resource
- theProjectResource
to verify.- Returns:
true
ifresource
has aLastModification
attribute and its signature is valid.
-
-