|
| 1 | +package com.stacksync.commons.models; |
| 2 | + |
| 3 | +import java.io.Serializable; |
| 4 | +import java.util.HashMap; |
| 5 | +import java.util.UUID; |
| 6 | + |
| 7 | +public class ABEWorkspace extends Workspace implements Serializable { |
| 8 | + |
| 9 | + private byte [] secretKey; |
| 10 | + private byte[] publicKey; |
| 11 | + private byte[] access_struct; |
| 12 | + |
| 13 | + public ABEWorkspace() { |
| 14 | + this((UUID)null); |
| 15 | + } |
| 16 | + |
| 17 | + public ABEWorkspace(UUID id) { |
| 18 | + this(id, 0, null, null, null, null); |
| 19 | + } |
| 20 | + |
| 21 | + public ABEWorkspace(Workspace workspace) { |
| 22 | + super(workspace.getId(), workspace.getName(), workspace.getParentItem(), workspace.getLatestRevision(), workspace.getOwner(), true, false, |
| 23 | + workspace.getUsers(), workspace.getItems(), workspace.getSwiftContainer(), workspace.getSwiftUrl()); |
| 24 | + this.isAbeEncrypted = true; |
| 25 | + } |
| 26 | + |
| 27 | + public ABEWorkspace(UUID id, Integer latestRevision, User owner, byte[] access_struct, byte[] secretKey, byte[] publicKey) { |
| 28 | + super(id, latestRevision, owner, true, false); |
| 29 | + this.isAbeEncrypted = true; |
| 30 | + this.secretKey=secretKey; |
| 31 | + this.publicKey=publicKey; |
| 32 | + this.access_struct=access_struct; |
| 33 | + } |
| 34 | + |
| 35 | + public byte[] getSecretKey() { |
| 36 | + return secretKey; |
| 37 | + } |
| 38 | + |
| 39 | + public void setSecretKey(byte[] secretKey) { |
| 40 | + this.secretKey = secretKey; |
| 41 | + } |
| 42 | + |
| 43 | + public byte[] getPublicKey() { |
| 44 | + return publicKey; |
| 45 | + } |
| 46 | + |
| 47 | + public void setPublicKey(byte[] publicKey) { |
| 48 | + this.publicKey = publicKey; |
| 49 | + } |
| 50 | + |
| 51 | + public byte[] getAccess_struct() { |
| 52 | + return access_struct; |
| 53 | + } |
| 54 | + |
| 55 | + public void setAccess_struct(byte[] access_struct) { |
| 56 | + this.access_struct = access_struct; |
| 57 | + } |
| 58 | + |
| 59 | + |
| 60 | +} |
0 commit comments