m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QueryData.java
blob: 6f68a470a1844aa9ebf6cb343da87e27b16b4ba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package pl.edu.mimuw.cloudatlas.querysigner;

import java.io.Serializable;

public class QueryData implements Serializable {
    // Original source code
    private String code;
    // Query signature
    private byte[] signature;
    // Query signing timestamp
    private long timestamp;

    private boolean installed;

    public QueryData(String code, byte[] signature) {
        this.code = code;
        this.signature = signature;
        this.timestamp = System.currentTimeMillis();
        this.installed = true;
    }

    public QueryData(String code, byte[] signature, long timestamp, boolean installed) {
        this.code = code;
        this.signature = signature;
        this.timestamp = timestamp;
        this.installed = installed;
    }

    public QueryData() {}

    public String getCode() {
        return code;
    }

    public byte[] getSignature() {
        return signature;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public boolean isInstalled() { return installed; }

    public void setInstalled(boolean installed) { this.installed = installed; }
}