This commit is contained in:
Lucio Lelii 2018-05-23 16:26:00 +00:00
parent 50b0eb2164
commit 32c12b18a9
5 changed files with 8 additions and 4 deletions

View File

@ -10,4 +10,5 @@ import java.lang.annotation.Target;
public @interface Attribute {
String value();
boolean isReadOnly() default false;
}

View File

@ -49,7 +49,7 @@ public class Item {
@Attribute("jcr:lastModified")
Calendar lastModificationTime;
@Attribute("jcr:created")
@Attribute(value = "jcr:created", isReadOnly=true)
Calendar creationTime;
@Attribute("hl:portalLogin")
@ -64,7 +64,7 @@ public class Item {
@NodeAttribute(value="hl:accounting", isReadOnly=true)
Accounting accounting;
@NodeAttribute("hl:metadata")
@NodeAttribute(value="hl:metadata", isReadOnly=true)
Metadata propertyMap;
//List <AccountingDelegate> accounting;

View File

@ -10,11 +10,14 @@ import org.gcube.common.storagehub.model.annotations.AttributeRootNode;
import org.gcube.common.storagehub.model.annotations.ListNodes;
import org.gcube.common.storagehub.model.items.nodes.accounting.AccountEntry;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
@NoArgsConstructor
@Data
@AttributeRootNode("nthl:accountingSet")
public class Accounting {
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
@ListNodes(includeTypeStartWith="nthl:accounting", listClass=AccountEntry.class)
List<AccountEntry> entries = new ArrayList<AccountEntry>();
}

View File

@ -25,7 +25,7 @@ public class AccountEntry {
@Attribute("hl:date")
Calendar date;
@Attribute("hl:version")
@Attribute(value = "hl:version")
String version;
@Attribute("jcr:primaryType")

View File

@ -24,7 +24,7 @@ public class AccountFolderEntryRemoval extends AccountEntry{
@Attribute("hl:itemType")
String itmeType;
@Attribute("hl:mimeType")
@Attribute(value = "hl:mimeType")
String mimeType;
AccountingEntryType type = AccountingEntryType.REMOVAL;