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

com.sdl.dxa.api.datamodel.model.BinaryContentData Maven / Gradle / Ivy

Go to download

DXA Data Model artifact provides API for de-/serializing CM JSON content into a DXA model

There is a newer version: 2.3.7
Show newest version
package com.sdl.dxa.api.datamodel.model;

import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.base.Objects;

@JsonTypeName
public class BinaryContentData {
    public BinaryContentData() {
    }

    public BinaryContentData(String fileName, long fileSize, String mimeType, String url) {
        this.fileName = fileName;
        this.fileSize = fileSize;
        this.mimeType = mimeType;
        this.url = url;
    }

    private String fileName;

    private long fileSize;

    private String mimeType;

    private String url;

    public String getFileName() {
        return fileName;
    }

    public long getFileSize() {
        return fileSize;
    }

    public String getMimeType() {
        return mimeType;
    }

    public String getUrl() {
        return url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BinaryContentData that = (BinaryContentData) o;
        return fileSize == that.fileSize &&
                Objects.equal(fileName, that.fileName) &&
                Objects.equal(mimeType, that.mimeType) &&
                Objects.equal(url, that.url);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(fileName, fileSize, mimeType, url);
    }

    @Override
    public String toString() {
        return "BinaryContentData{" +
                "fileName='" + fileName + '\'' +
                ", fileSize=" + fileSize +
                ", mimeType='" + mimeType + '\'' +
                ", url='" + url + '\'' +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy