All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.threatconnect.sdk.client.fluent.DocumentBuilder Maven / Gradle / Ivy

Go to download

The ThreatConnect Java SDK. Used to communicate with teh ThreatConnect Threat Intelligence Platform

The newest version!
package com.threatconnect.sdk.client.fluent;

import com.threatconnect.sdk.server.entity.Document;
import com.threatconnect.sdk.server.entity.Owner;

import java.util.Date;

public class DocumentBuilder
{
    private Integer id;
    private String name;
    private String type;
    private Owner owner;
    private String ownerName;
    private Date dateAdded;
    private String webLink;
    private String fileName;
    private Long fileSize;
    private String status;
    private boolean malware = false;
    private String password;

    public DocumentBuilder withId(Integer id)
    {
        this.id = id;
        return this;
    }

    public DocumentBuilder withName(String name)
    {
        this.name = name;
        return this;
    }

    public DocumentBuilder withType(String type)
    {
        this.type = type;
        return this;
    }

    public DocumentBuilder withOwner(Owner owner)
    {
        this.owner = owner;
        return this;
    }

    public DocumentBuilder withOwnerName(String ownerName)
    {
        this.ownerName = ownerName;
        return this;
    }

    public DocumentBuilder withDateAdded(Date dateAdded)
    {
        this.dateAdded = dateAdded;
        return this;
    }

    public DocumentBuilder withWebLink(String webLink)
    {
        this.webLink = webLink;
        return this;
    }

    public DocumentBuilder withFileName(String fileName)
    {
        this.fileName = fileName;
        return this;
    }

    public DocumentBuilder withFileSize(Long fileSize)
    {
        this.fileSize = fileSize;
        return this;
    }

    public DocumentBuilder withStatus(String status)
    {
        this.status = status;
        return this;
    }

    public DocumentBuilder isMalware() {
        this.malware = true;
        return this;
    }

    public DocumentBuilder withPassword(String password) {
        this.password = password;
        return this;
    }

    public Document createDocument()
    {
        return new Document(id, name, type, owner, ownerName, dateAdded, webLink, fileName, fileSize, status, malware, password);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy