2019-03-22 15:18:23 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2020-01-20 10:24:55 +01:00
|
|
|
package org.gcube.informationsystem.model.reference.properties;
|
2019-03-22 15:18:23 +01:00
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
2020-02-04 09:44:10 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.Element;
|
2020-01-20 10:24:55 +01:00
|
|
|
import org.gcube.informationsystem.model.impl.properties.HeaderImpl;
|
2019-03-22 15:18:23 +01:00
|
|
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Header
|
|
|
|
*/
|
|
|
|
@JsonDeserialize(as=HeaderImpl.class)
|
2020-01-20 10:24:55 +01:00
|
|
|
public interface Header extends Property {
|
2019-03-22 15:18:23 +01:00
|
|
|
|
|
|
|
public static final String NAME = "Header"; // Header.class.getSimpleName();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to set Creator when the user is not known
|
|
|
|
*/
|
|
|
|
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 CREATION_TIME_PROPERTY = "creationTime";
|
|
|
|
public static final String LAST_UPDATE_TIME_PROPERTY = "lastUpdateTime";
|
|
|
|
|
|
|
|
@ISProperty(name = UUID_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
|
|
public UUID getUUID();
|
|
|
|
|
|
|
|
public void setUUID(UUID uuid);
|
|
|
|
|
|
|
|
@ISProperty(name = CREATOR_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
|
|
public String getCreator();
|
|
|
|
|
2020-02-04 09:44:10 +01:00
|
|
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
2019-03-22 15:18:23 +01:00
|
|
|
@ISProperty(name = CREATION_TIME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
|
|
public Date getCreationTime();
|
|
|
|
|
|
|
|
@ISProperty(name = MODIFIED_BY_PROPERTY, mandatory = true, nullable = false)
|
|
|
|
public String getModifiedBy();
|
|
|
|
|
2020-02-04 09:44:10 +01:00
|
|
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Element.DATETIME_PATTERN)
|
2019-03-22 15:18:23 +01:00
|
|
|
@ISProperty(name = LAST_UPDATE_TIME_PROPERTY, mandatory = true, nullable = false)
|
|
|
|
public Date getLastUpdateTime();
|
|
|
|
|
|
|
|
}
|