git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/storagehub-model@167331 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
aff8ca2030
commit
50ebdd199b
|
@ -0,0 +1,23 @@
|
|||
package org.gcube.common.storagehub.model.items.nodes.accounting;
|
||||
|
||||
import org.gcube.common.storagehub.model.annotations.Attribute;
|
||||
import org.gcube.common.storagehub.model.annotations.AttributeRootNode;
|
||||
import org.gcube.common.storagehub.model.items.nodes.AccountEntry;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@AttributeRootNode("nthl:accountingEntryRead")
|
||||
public class AccountEntryRead extends AccountEntry{
|
||||
|
||||
@Attribute("hl:itemName")
|
||||
String itemName;
|
||||
|
||||
AccountingEntryType type = AccountingEntryType.READ;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package org.gcube.common.storagehub.model.items.nodes.accounting;
|
||||
|
||||
|
||||
public enum AccountingEntryType {
|
||||
|
||||
CREATE("nthl:accountingEntryCreate"),
|
||||
|
||||
READ("nthl:accountingEntryRead"),
|
||||
|
||||
ADD("nthl:accountingFolderEntryAdd"),
|
||||
|
||||
PASTE("nthl:accountingEntryPaste"),
|
||||
|
||||
CUT("nthl:accountingFolderEntryCut"),
|
||||
|
||||
UPDATE("nthl:accountingEntryUpdate"),
|
||||
|
||||
SHARE("nthl:accountingEntryShare"),
|
||||
|
||||
UNSHARE("nthl:accountingEntryUnshare"),
|
||||
|
||||
REMOVAL("nthl:accountingFolderEntryRemoval"),
|
||||
|
||||
RENAMING("nthl:accountingFolderEntryRenaming"),
|
||||
|
||||
DELETE("nthl:accountingEntryDelete"),
|
||||
|
||||
RESTORE("nthl:accountingEntryRestore"),
|
||||
|
||||
ENABLED_PUBLIC_ACCESS("nthl:accountingEntryEnabledPublicAccess"),
|
||||
|
||||
DISABLED_PUBLIC_ACCESS("nthl:accountingEntryDisabledPublicAccess"),
|
||||
|
||||
SET_ACL("nthl:accountingEntryAddACL");
|
||||
|
||||
|
||||
private String nodeTypeDefinition;
|
||||
|
||||
AccountingEntryType(String value) {
|
||||
this.nodeTypeDefinition = value;
|
||||
}
|
||||
|
||||
public String getNodeTypeDefinition() {
|
||||
return nodeTypeDefinition;
|
||||
}
|
||||
|
||||
public static AccountingEntryType getEnum(String value) {
|
||||
for (AccountingEntryType entry : AccountingEntryType.values()) {
|
||||
if (entry.getNodeTypeDefinition().compareTo(value) == 0) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue