-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathScanFile.java
49 lines (41 loc) · 1016 Bytes
/
ScanFile.java
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
47
48
49
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0
package io.securecodebox.persistence.defectdojo.model;
import lombok.Data;
/**
* DTO to upload a secureCodeBox scan file
* <p>
* This is not a JSON model – thus not implementing the Model interface – because it is only used as DTO for the
* multi-part form upload.
* </p>
*/
@Data
public final class ScanFile {
/**
* A default name must be set
* <p>
* It does not matter however unless the parser pays attention to file endings like json or xml.
* </p>
*/
private static final String DEFAULT_NAME = "default-name.txt";
/**
* The file content.
*/
private String content;
/**
* Name of file.
* <p>
* Defaults to {@link #DEFAULT_NAME}.
* </p>
*/
private String name;
public ScanFile(String content) {
this(content, DEFAULT_NAME);
}
public ScanFile(String content, String name) {
super();
this.content = content;
this.name = name;
}
}