io.gravitee.repository.media.model.Media Maven / Gradle / Ivy
/*
* Copyright © 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gravitee.repository.media.model;
import java.io.InputStream;
import java.util.Date;
/**
* @author Guillaume Gillon
*/
public class Media {
private String id;
private String type;
private String subType;
private String fileName;
private Date createdAt;
private String hash;
private Long size;
private byte[] data;
private String api;
public Media() {}
public Media(String type, String subType, String fileName, long size) {
this.type = type;
this.subType = subType;
this.fileName = fileName;
this.size = size;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getSubType() {
return subType;
}
public void setSubType(String subType) {
this.subType = subType;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public String getMimeType() {
return this.type + '/' + this.subType;
}
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public String getApi() {
return api;
}
public void setApi(String api) {
this.api = api;
}
public String getHash() {
return hash;
}
public void setHash(String hash) {
this.hash = hash;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy