Interface ArtifactCoo
- All Superinterfaces:
BundleableObject,CyberObservableObject,CyberObservableObjectCommonProperties,GenericValidation,SdoDefaultValidator,Serializable,Stix,StixCustomProperties
- All Known Implementing Classes:
Artifact
@Immutable
@DefaultTypeValue(value="artifact",
groups=DefaultValuesProcessor.class)
@BusinessRule(ifExp="getUrl().isPresent() == true",thenExp="getHashes().isEmpty() == false && getPayloadBin().isPresent() == false",errorMessage="When Url is used, Hashes have at least 1 value, and payload_bin cannot be used.") @BusinessRule(ifExp="getPayloadBin().isPresent() == true",thenExp="getUrl().isPresent() == false && getHashes().isEmpty() == true",errorMessage="When payload_bin is used, Url and hashes cannot be used.")
public interface ArtifactCoo
extends CyberObservableObject
-
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> hashesdefault StringgetId()Deterministically generates the ID for this artifact based on its payload_bin, url, or hashes.Optional<@Pattern(regexp="^(application|audio|font|image|message|model|multipart|text|video)/[a-zA-Z0-9.+_-]+") String> Optional<@Pattern(regexp="^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\\.(?:[a-z\u00a1-\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$") String> getUrl()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
-
getMimeType
-
getPayloadBin
-
getUrl
@JsonPropertyDescription("The value of this property MUST be a valid URL that resolves to the unencoded content.") Optional<@Pattern(regexp="^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\\.(?:[a-z\u00a1-\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$") String> getUrl() -
getHashes
@JsonPropertyDescription("Specifies a dictionary of hashes for the contents of the url or the payload_bin.") Map<@Length(min=3,max=256) @HashingVocab(HashingAlgorithms.class) String,String> getHashes()hashesThis MUST be provided when the url property is present. Optional if payload_bin is present.
-
getId
Deterministically generates the ID for this artifact based on its payload_bin, url, or hashes.- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceCyberObservableObjectCommonProperties
-