diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java index fb8212b..2f3e706 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java @@ -21,9 +21,9 @@ public final class HeaderImpl extends PropertyImpl implements Header { private static final long serialVersionUID = 5102553511155113169L; protected UUID uuid; - protected String creator; - protected String modifiedBy; + protected String createdBy; protected Date creationTime; + protected String lastUpdateBy; protected Date lastUpdateTime; public HeaderImpl() { @@ -48,19 +48,19 @@ public final class HeaderImpl extends PropertyImpl implements Header { } @Override - public String getCreator() { - return creator; - } - - @Override - public String getModifiedBy() { - return modifiedBy; + public String getCreatedBy() { + return createdBy; } @Override public Date getCreationTime() { return creationTime; } + + @Override + public String getLastUpdateBy() { + return lastUpdateBy; + } @Override public Date getLastUpdateTime() { diff --git a/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java b/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java index 5432748..52fbe02 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java @@ -33,9 +33,9 @@ public interface Header extends Property { public static final String UNKNOWN_USER = "UNKNOWN_USER"; public static final String UUID_PROPERTY = "uuid"; - public static final String CREATOR_PROPERTY = "creator"; - public static final String MODIFIED_BY_PROPERTY = "modifiedBy"; + public static final String CREATED_BY_PROPERTY = "createdBy"; public static final String CREATION_TIME_PROPERTY = "creationTime"; + public static final String LAST_UPDATE_BY_PROPERTY = "lastUpdateBy"; public static final String LAST_UPDATE_TIME_PROPERTY = "lastUpdateTime"; /** @@ -50,15 +50,15 @@ public interface Header extends Property { public void setUUID(UUID uuid); - @ISProperty(name = CREATOR_PROPERTY, description = "The user that created the Entity or the Relation. It is initialized at creation time. ", readonly = true, mandatory = true, nullable = false) - public String getCreator(); + @ISProperty(name = CREATED_BY_PROPERTY, description = "The user that created the Entity or the Relation. It is initialized at creation time. ", readonly = true, mandatory = true, nullable = false) + public String getCreatedBy(); @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN) @ISProperty(name = CREATION_TIME_PROPERTY, description = "Creation time. It represents the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970, UTC.", readonly = true, mandatory = true, nullable = false) public Date getCreationTime(); - @ISProperty(name = MODIFIED_BY_PROPERTY, description = "The user that made the last update to the Entity or the Relation. At creation time, it assumes the same value of creator.", mandatory = true, nullable = false) - public String getModifiedBy(); + @ISProperty(name = LAST_UPDATE_BY_PROPERTY, description = "The user that made the last update to the Entity or the Relation. At creation time, it assumes the same value of creator.", mandatory = true, nullable = false) + public String getLastUpdateBy(); @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN) @ISProperty(name = LAST_UPDATE_TIME_PROPERTY, description = "Last Update time. At creation time it assumes the same value of creationTime. It represents the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970, UTC.", mandatory = true, nullable = false) diff --git a/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java b/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java index 8ab8b64..27b6f76 100644 --- a/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java +++ b/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java @@ -29,7 +29,7 @@ public class HeaderTest { Date date = Calendar.getInstance().getTime(); header.creationTime = date; header.lastUpdateTime = date; - header.creator = Header.UNKNOWN_USER; + header.createdBy = Header.UNKNOWN_USER; String json = ElementMapper.marshal(header); logger.debug(json); diff --git a/src/test/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintTest.java b/src/test/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintTest.java index efe3cb6..f0050b5 100644 --- a/src/test/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintTest.java +++ b/src/test/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintTest.java @@ -98,8 +98,8 @@ public class PropagationConstraintTest { HeaderImpl header = new HeaderImpl(); header.setUUID(UUID.randomUUID()); - header.creator = "luca.frosini"; - header.modifiedBy = "luca.frosini"; + header.createdBy = "luca.frosini"; + header.lastUpdateBy = "luca.frosini"; header.creationTime = Calendar.getInstance().getTime(); header.lastUpdateTime = Calendar.getInstance().getTime();