Package mops.businesslogic.file
Class FileContainer
- java.lang.Object
-
- mops.businesslogic.file.FileContainer
-
public final class FileContainer extends java.lang.ObjectWrapper of meta data and content of a file.
-
-
Constructor Summary
Constructors Constructor Description FileContainer(FileInfo info, org.springframework.core.io.Resource content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)org.springframework.core.io.ResourcegetContent()contains content stream.longgetDirectoryId()Gets a directory id.longgetId()Gets the file id.FileInfogetInfo()contains info of file.java.lang.StringgetName()Gets the file name.longgetSize()Gets the file size.java.lang.StringgetType()Gets the file type.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
FileContainer
public FileContainer(FileInfo info, org.springframework.core.io.Resource content)
-
-
Method Detail
-
getDirectoryId
public long getDirectoryId()
Gets a directory id.- Returns:
- parent directory of file
-
getId
public long getId()
Gets the file id.- Returns:
- file id
-
getType
public java.lang.String getType()
Gets the file type.- Returns:
- content type of file
-
getName
public java.lang.String getName()
Gets the file name.- Returns:
- display name of file
-
getSize
public long getSize()
Gets the file size.- Returns:
- size of file in bytes
-
getInfo
public FileInfo getInfo()
contains info of file.
-
getContent
public org.springframework.core.io.Resource getContent()
contains content stream.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-