Aligned Header properties name

This commit is contained in:
Luca Frosini 2021-03-08 11:18:24 +01:00
parent cf0aa2c3f6
commit cf2dfd4b10
4 changed files with 18 additions and 18 deletions

View File

@ -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() {

View File

@ -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)

View File

@ -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);

View File

@ -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();