Class FileMeta

java.lang.Object
com.levigo.jadice.web.server.file.FileMeta
Direct Known Subclasses:
ExportMeta

public class FileMeta extends Object
Class that holds metadata of some printed output stored in a file. Instances will be registered in a FileRepository in order to allow clients to download the file.
  • Field Details

    • file

      protected final File file
    • displayName

      protected final String displayName
    • mimeType

      protected final String mimeType
    • downloadPurpose

      protected final DownloadPurpose downloadPurpose
    • maxAccessCount

      protected final int maxAccessCount
    • createdAt

      protected final long createdAt
    • accessCount

      protected final AtomicInteger accessCount
    • properties

      protected final Map<String,String> properties
  • Constructor Details

  • Method Details

    • getFile

      public File getFile()
    • getDownloadPurpose

      public DownloadPurpose getDownloadPurpose()
    • getCreatedAt

      public long getCreatedAt()
    • getAccessCount

      public int getAccessCount()
    • incrementAccessCount

      public void incrementAccessCount()
    • getMaxAccessCount

      public int getMaxAccessCount()
    • getDisplayName

      public String getDisplayName()
    • getMimeType

      public String getMimeType()
    • getProperties

      public Map<String,String> getProperties()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Nobody cares about the other fields, only the underlying file is relevant! If two instances of this class have the same underlying file, we have a problem.
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      true if the underlying file is the same
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object