Fixing Model
This commit is contained in:
parent
1c80f165b6
commit
9858c50c99
|
@ -22,4 +22,9 @@ public interface Element extends Serializable {
|
||||||
|
|
||||||
public static final String SUPERCLASSES_PROPERTY = "@superClasses";
|
public static final String SUPERCLASSES_PROPERTY = "@superClasses";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DateTime Pattern to be used to serialize Dates in every element
|
||||||
|
*/
|
||||||
|
public static final String DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS Z";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package org.gcube.informationsystem.base.reference;
|
|
||||||
|
|
||||||
public interface ISConstants {
|
|
||||||
|
|
||||||
String DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS Z";
|
|
||||||
|
|
||||||
}
|
|
|
@ -6,7 +6,7 @@ package org.gcube.informationsystem.model.reference.properties;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.informationsystem.base.reference.ISConstants;
|
import org.gcube.informationsystem.base.reference.Element;
|
||||||
import org.gcube.informationsystem.model.impl.properties.HeaderImpl;
|
import org.gcube.informationsystem.model.impl.properties.HeaderImpl;
|
||||||
import org.gcube.informationsystem.types.annotations.ISProperty;
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
||||||
|
|
||||||
|
@ -41,14 +41,14 @@ public interface Header extends Property {
|
||||||
@ISProperty(name = CREATOR_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
@ISProperty(name = CREATOR_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||||
public String getCreator();
|
public String getCreator();
|
||||||
|
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = ISConstants.DATETIME_PATTERN)
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
||||||
@ISProperty(name = CREATION_TIME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
@ISProperty(name = CREATION_TIME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||||
public Date getCreationTime();
|
public Date getCreationTime();
|
||||||
|
|
||||||
@ISProperty(name = MODIFIED_BY_PROPERTY, mandatory = true, nullable = false)
|
@ISProperty(name = MODIFIED_BY_PROPERTY, mandatory = true, nullable = false)
|
||||||
public String getModifiedBy();
|
public String getModifiedBy();
|
||||||
|
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = ISConstants.DATETIME_PATTERN)
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
||||||
@ISProperty(name = LAST_UPDATE_TIME_PROPERTY, mandatory = true, nullable = false)
|
@ISProperty(name = LAST_UPDATE_TIME_PROPERTY, mandatory = true, nullable = false)
|
||||||
public Date getLastUpdateTime();
|
public Date getLastUpdateTime();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue