Aligned Header properties name
This commit is contained in:
parent
cf0aa2c3f6
commit
cf2dfd4b10
|
@ -21,9 +21,9 @@ public final class HeaderImpl extends PropertyImpl implements Header {
|
||||||
private static final long serialVersionUID = 5102553511155113169L;
|
private static final long serialVersionUID = 5102553511155113169L;
|
||||||
|
|
||||||
protected UUID uuid;
|
protected UUID uuid;
|
||||||
protected String creator;
|
protected String createdBy;
|
||||||
protected String modifiedBy;
|
|
||||||
protected Date creationTime;
|
protected Date creationTime;
|
||||||
|
protected String lastUpdateBy;
|
||||||
protected Date lastUpdateTime;
|
protected Date lastUpdateTime;
|
||||||
|
|
||||||
public HeaderImpl() {
|
public HeaderImpl() {
|
||||||
|
@ -48,13 +48,8 @@ public final class HeaderImpl extends PropertyImpl implements Header {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCreator() {
|
public String getCreatedBy() {
|
||||||
return creator;
|
return createdBy;
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getModifiedBy() {
|
|
||||||
return modifiedBy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,6 +57,11 @@ public final class HeaderImpl extends PropertyImpl implements Header {
|
||||||
return creationTime;
|
return creationTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLastUpdateBy() {
|
||||||
|
return lastUpdateBy;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getLastUpdateTime() {
|
public Date getLastUpdateTime() {
|
||||||
return lastUpdateTime;
|
return lastUpdateTime;
|
||||||
|
|
|
@ -33,9 +33,9 @@ public interface Header extends Property {
|
||||||
public static final String UNKNOWN_USER = "UNKNOWN_USER";
|
public static final String UNKNOWN_USER = "UNKNOWN_USER";
|
||||||
|
|
||||||
public static final String UUID_PROPERTY = "uuid";
|
public static final String UUID_PROPERTY = "uuid";
|
||||||
public static final String CREATOR_PROPERTY = "creator";
|
public static final String CREATED_BY_PROPERTY = "createdBy";
|
||||||
public static final String MODIFIED_BY_PROPERTY = "modifiedBy";
|
|
||||||
public static final String CREATION_TIME_PROPERTY = "creationTime";
|
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";
|
public static final String LAST_UPDATE_TIME_PROPERTY = "lastUpdateTime";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,15 +50,15 @@ public interface Header extends Property {
|
||||||
|
|
||||||
public void setUUID(UUID uuid);
|
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)
|
@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 getCreator();
|
public String getCreatedBy();
|
||||||
|
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
@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)
|
@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();
|
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)
|
@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 getModifiedBy();
|
public String getLastUpdateBy();
|
||||||
|
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
@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)
|
@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)
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class HeaderTest {
|
||||||
Date date = Calendar.getInstance().getTime();
|
Date date = Calendar.getInstance().getTime();
|
||||||
header.creationTime = date;
|
header.creationTime = date;
|
||||||
header.lastUpdateTime = date;
|
header.lastUpdateTime = date;
|
||||||
header.creator = Header.UNKNOWN_USER;
|
header.createdBy = Header.UNKNOWN_USER;
|
||||||
|
|
||||||
String json = ElementMapper.marshal(header);
|
String json = ElementMapper.marshal(header);
|
||||||
logger.debug(json);
|
logger.debug(json);
|
||||||
|
|
|
@ -98,8 +98,8 @@ public class PropagationConstraintTest {
|
||||||
|
|
||||||
HeaderImpl header = new HeaderImpl();
|
HeaderImpl header = new HeaderImpl();
|
||||||
header.setUUID(UUID.randomUUID());
|
header.setUUID(UUID.randomUUID());
|
||||||
header.creator = "luca.frosini";
|
header.createdBy = "luca.frosini";
|
||||||
header.modifiedBy = "luca.frosini";
|
header.lastUpdateBy = "luca.frosini";
|
||||||
header.creationTime = Calendar.getInstance().getTime();
|
header.creationTime = Calendar.getInstance().getTime();
|
||||||
header.lastUpdateTime = Calendar.getInstance().getTime();
|
header.lastUpdateTime = Calendar.getInstance().getTime();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue