sirius.biz.storage.StoredObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-biz Show documentation
Show all versions of sirius-biz Show documentation
Provides a framework for building web based business applications
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.biz.storage;
import javax.annotation.Nullable;
import java.time.LocalDateTime;
/**
* Represents the public accessible part of an object (file) stored by {@link Storage}.
*/
public interface StoredObject {
/**
* Represents the unique id of the stored object.
*
* @return the unique key of the object
*/
String getObjectKey();
/**
* Returns the filename of the object.
*
* @return the filename of the object
*/
String getFilename();
/**
* Returns the path of the object.
*
* @return the path of the object
*/
String getPath();
/**
* Returns the size of the object in bytes.
*
* @return the size in bytes
*/
long getFileSize();
/**
* Returns the timestamp when the entity was last modified.
*
* @return the last modification timestamp
*/
LocalDateTime getLastModified();
/**
* Returns the reference to which this object belongs.
*
* @return the reference, preferable an {@link sirius.db.mixing.Entity#getUniqueName()}
* or null if there is no reference
*/
@Nullable
String getReference();
/**
* Creates a builder to build a download URL for this object.
*
* @return a builder to create a download URL
*/
DownloadBuilder prepareURL();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy