Class AssociatedFile

    • Nested Class Summary

      • Nested classes/interfaces inherited from class no.unit.nva.file.model.File

        no.unit.nva.file.model.File.Builder
    • Field Summary

      • Fields inherited from class no.unit.nva.file.model.File

        MISSING_LICENSE
    • Constructor Summary

      Constructors 
      Constructor Description
      AssociatedFile​(no.unit.nva.file.model.FileType type, java.util.UUID identifier, java.lang.String name, java.lang.String mimeType, java.lang.Long size, no.unit.nva.file.model.License license, boolean administrativeAgreement, boolean publisherAuthority, java.time.Instant embargoDate)
      Constructor for no.unit.nva.file.model.File objects.
    • Method Summary

      • Methods inherited from class no.unit.nva.file.model.File

        equals, getEmbargoDate, getIdentifier, getLicense, getMimeType, getName, getSize, getType, hashCode, isAdministrativeAgreement, isPublisherAuthority, isVisibleForNonOwner, validate
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssociatedFile

        public AssociatedFile​(no.unit.nva.file.model.FileType type,
                              java.util.UUID identifier,
                              java.lang.String name,
                              java.lang.String mimeType,
                              java.lang.Long size,
                              no.unit.nva.file.model.License license,
                              boolean administrativeAgreement,
                              boolean publisherAuthority,
                              java.time.Instant embargoDate)
        Constructor for no.unit.nva.file.model.File objects. A file object is valid if it has a license or is explicitly marked as an administrative agreement.
        Parameters:
        type - The type of file
        identifier - A UUID that identifies the file in storage
        name - The original name of the file
        mimeType - The mimetype of the file
        size - The size of the file
        license - The license for the file, may be null if and only if the file is an administrative agreement
        administrativeAgreement - True if the file is an administrative agreement
        publisherAuthority - True if the file owner has publisher authority
        embargoDate - The date after which the file may be published