Class FileEntity
java.lang.Object
it.tidalwave.role.ui.example.model.FileEntity
- All Implemented Interfaces:
it.tidalwave.role.ui.Displayable
,it.tidalwave.util.As
@Immutable
public class FileEntity
extends Object
implements it.tidalwave.util.As, it.tidalwave.role.ui.Displayable
A class that models a file with its attributes and children.
- Author:
- Fabrizio Giudici
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.tidalwave.util.As
it.tidalwave.util.As.Type<T>
-
Field Summary
Fields inherited from interface it.tidalwave.role.ui.Displayable
_Displayable_, DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionReturns the creation date-time.Returns the display name.Returns the last access date-time.Returns the last modified date-time.long
getSize()
Returns the size.static FileEntity
Returns a new instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.tidalwave.util.As
as, as, asMany, asMany, maybeAs, maybeAs
Methods inherited from interface it.tidalwave.role.ui.Displayable
display
-
Method Details
-
of
Returns a new instance. related to the given path.- Parameters:
path
- the path- Returns:
- a new instance
-
getDisplayName
Returns the display name.. It's a static implementation of theDisplayable
role.- Specified by:
getDisplayName
in interfaceit.tidalwave.role.ui.Displayable
- Returns:
- the display name
-
getCreationDateTime
Returns the creation date-time. of the file.- Returns:
- the creation date-time
- Throws:
IOException
- if the file does not exist or cannot be accessed
-
getLastAccessDateTime
Returns the last access date-time. of the file.- Returns:
- the last access date-time
- Throws:
IOException
- if the file does not exist or cannot be accessed
-
getLastModifiedDateTime
Returns the last modified date-time. of the file.- Returns:
- the last modified date-time
- Throws:
IOException
- if the file does not exist or cannot be accessed
-
getSize
Returns the size. of the file.- Returns:
- the size
- Throws:
IOException
- if the file does not exist or cannot be accessed
-