git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/storagehub-model@167780 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
32c12b18a9
commit
834974cf43
|
@ -0,0 +1,19 @@
|
|||
package org.gcube.common.storagehub.model.acls;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ACL {
|
||||
|
||||
private String pricipal;
|
||||
private List<AccessType> accessTypes= new ArrayList<>();
|
||||
|
||||
}
|
|
@ -16,4 +16,12 @@ public enum AccessType {
|
|||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static AccessType fromValue(String value) {
|
||||
for (AccessType accessType : AccessType.values())
|
||||
if (accessType.value.equals(value))
|
||||
return accessType;
|
||||
throw new IllegalArgumentException(value+" cannot be mapped to AccessType");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package org.gcube.common.storagehub.model.types;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.common.storagehub.model.acls.ACL;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ACLList {
|
||||
|
||||
List<ACL> acls;
|
||||
|
||||
}
|
Loading…
Reference in New Issue