Interface FileCoo
- All Superinterfaces:
BundleableObject,CyberObservableObject,CyberObservableObjectCommonProperties,GenericValidation,SdoDefaultValidator,Serializable,Stix,StixCustomProperties
- All Known Implementing Classes:
File
@Immutable
@DefaultTypeValue(value="file",
groups=DefaultValuesProcessor.class)
@BusinessRule(ifExp="isEncrypted().orElse(false) == false",
thenExp="getEncryptionAlgorithm().isPresent() == false && getDecryptionKey().isPresent() == false",
errorMessage="Encryption Algorithm and Description Key cannot be used if Encrypted equals false.")
public interface FileCoo
extends CyberObservableObject
file
The File Object represents the properties of a file.
-
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionMap<@Length(min=3,max=256) @HashingVocab(HashingAlgorithms.class) String, String> default StringgetId()Deterministically generates the ID for this file based on its hashes and name.Optional<@Pattern(regexp="^(application|audio|font|image|message|model|multipart|text|video)/[a-zA-Z0-9.+_-]+") String> getName()getSize()Methods inherited from interface security.whisper.javastix.bundle.BundleableObject
getGranularMarkings, getHydrated, getObjectMarkingRefs, getType, toJsonStringMethods inherited from interface security.whisper.javastix.coo.CyberObservableObjectCommonProperties
getDefanged, getExtensions, getObservableObjectKey, getTypeMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyIdMethods inherited from interface security.whisper.javastix.common.StixCustomProperties
getCustomProperties
-
Method Details
-
getHashes
@JsonPropertyDescription("Specifies a dictionary of hashes for the contents of the file.") Map<@Length(min=3,max=256) @HashingVocab(HashingAlgorithms.class) String,String> getHashes() -
getSize
-
getName
-
getNameEnc
-
getMagicNumberHex
-
getMimeType
-
getCreated
@JsonPropertyDescription("Specifies the date/time the file was created.") Optional<StixInstant> getCreated() -
getModified
@JsonPropertyDescription("Specifies the date/time the file was last written to/modified.") Optional<StixInstant> getModified() -
getAccessed
@JsonPropertyDescription("Specifies the date/time the file was last accessed.") Optional<StixInstant> getAccessed() -
getParentDirectoryRef
-
isEncrypted
-
getEncryptionAlgorithm
@JsonPropertyDescription("Specifies the name of the encryption algorithm used to encrypt the file. Open Vocabulary - encryption-algorithm-ov") Optional<@Vocab(EncryptionAlgorithms.class) String> getEncryptionAlgorithm() -
getDecryptionKey
-
getContainsRefs
-
getContentRef
-
getId
Deterministically generates the ID for this file based on its hashes and name. Uses the first available hash from the hashes map, or the file name if no hashes are present.- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceCyberObservableObjectCommonProperties
-