m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QueryData.java
blob: a9e039e06034858a295672fa217599485814a6c1 (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
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 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; }
}