Class UnpublishedFile
- java.lang.Object
-
- no.unit.nva.model.associatedartifacts.file.File
-
- no.unit.nva.model.associatedartifacts.file.UnpublishedFile
-
- All Implemented Interfaces:
no.unit.nva.commons.json.JsonSerializable,AssociatedArtifact
public class UnpublishedFile extends File
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class no.unit.nva.model.associatedartifacts.file.File
File.Builder
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTYPE-
Fields inherited from class no.unit.nva.model.associatedartifacts.file.File
ADMINISTRATIVE_AGREEMENT_FIELD, EMBARGO_DATE_FIELD, IDENTIFIER_FIELD, LICENSE_FIELD, MIME_TYPE_FIELD, MISSING_LICENSE, NAME_FIELD, PUBLISHER_AUTHORITY_FIELD, SIZE_FIELD
-
-
Constructor Summary
Constructors Constructor Description UnpublishedFile(java.util.UUID identifier, java.lang.String name, java.lang.String mimeType, java.lang.Long size, License license, boolean administrativeAgreement, boolean publisherAuthority, java.time.Instant embargoDate)Constructor for no.unit.nva.file.model.File objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisVisibleForNonOwner()UnpublishedFiletoUnpublishedFile()-
Methods inherited from class no.unit.nva.model.associatedartifacts.file.File
builder, equals, fileDoesNotHaveActiveEmbargo, getEmbargoDate, getIdentifier, getLicense, getMimeType, getName, getSize, hashCode, isAdministrativeAgreement, isPublisherAuthority, toPublishedFile, toString, toUnpublishableFile, validate
-
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnpublishedFile
public UnpublishedFile(java.util.UUID identifier, java.lang.String name, java.lang.String mimeType, java.lang.Long size, 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:
identifier- A UUID that identifies the file in storagename- The original name of the filemimeType- The mimetype of the filesize- The size of the filelicense- The license for the file, may be null if and only if the file is an administrative agreementadministrativeAgreement- True if the file is an administrative agreementpublisherAuthority- True if the file owner has publisher authorityembargoDate- The date after which the file may be published
-
-
Method Detail
-
isVisibleForNonOwner
public boolean isVisibleForNonOwner()
- Specified by:
isVisibleForNonOwnerin classFile
-
toUnpublishedFile
public UnpublishedFile toUnpublishedFile()
- Overrides:
toUnpublishedFilein classFile
-
-