Package de.xima.fc.gui.model.portal
Class UserPortalFileViewModel
- java.lang.Object
-
- de.xima.fc.gui.model.portal.UserPortalFileViewModel
-
- All Implemented Interfaces:
Serializable
public final class UserPortalFileViewModel extends Object implements Serializable
A temporary file stored on the file system.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserPortalFileViewModel(UserPortalFileEntityViewModel entity, Path path, String fileName, long size, String contentType, Instant lastModified)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
The file's content type.UserPortalFileEntityViewModel
getEntity()
The entity associated with the file.String
getFileName()
The file's name.Instant
getLastModified()
Gets the file's last modified date.Path
getPath()
The file's path on the file system.long
getSize()
The file's size in bytes.int
getSizeInt()
The file's size in bytes, as an integer.
-
-
-
Constructor Detail
-
UserPortalFileViewModel
public UserPortalFileViewModel(UserPortalFileEntityViewModel entity, Path path, String fileName, long size, String contentType, Instant lastModified)
-
-
Method Detail
-
getContentType
public String getContentType()
The file's content type.- Returns:
- The file's content type.
-
getEntity
public UserPortalFileEntityViewModel getEntity()
The entity associated with the file. This is used to identify the entity with the file in the database.- Returns:
- The entity associated with the file, or
null
if the file is not associated with an entity (yet).
-
getFileName
public String getFileName()
The file's name. Note that this is not the name of thegetPath()
, but the name of the file as it was requested.getPath()
may use a temporary file name.- Returns:
- The file's name.
-
getLastModified
public Instant getLastModified()
Gets the file's last modified date.- Returns:
- The file's last modified date.
-
getPath
public Path getPath()
The file's path on the file system.- Returns:
- The file's path on the file system.
-
getSize
public long getSize()
The file's size in bytes.- Returns:
- The file's size in bytes.
-
getSizeInt
public int getSizeInt()
The file's size in bytes, as an integer.- Returns:
- The file's size in bytes.
-
-