Package security.whisper.javastix.common
Interface StixCommonProperties
- All Superinterfaces:
BundleableObject,SdoDefaultValidator,Serializable,Stix,StixSpecVersion
- All Known Subinterfaces:
AttackPatternSdo,CampaignSdo,CourseOfActionSdo,DomainObject,GenericCustomObject,GroupingSdo,IdentitySdo,IncidentSdo,IndicatorSdo,InfrastructureSdo,IntrusionSetSdo,LocationSdo,MalwareAnalysisSdo,MalwareSdo,MarkingDefinitionDm,NoteSdo,ObservedDataSdo,OpinionSdo,RelationshipObject,RelationshipSro,ReportSdo,SightingSro,StixCustomObject,ThreatActorSdo,ToolSdo,VulnerabilitySdo
- All Known Implementing Classes:
AttackPattern,Campaign,CourseOfAction,CustomObject,Grouping,Identity,Incident,Indicator,Infrastructure,IntrusionSet,Location,Malware,MalwareAnalysis,MarkingDefinition,Note,ObservedData,Opinion,Relationship,Report,Sighting,ThreatActor,Tool,Vulnerability
public interface StixCommonProperties
extends StixSpecVersion, SdoDefaultValidator, BundleableObject
Base interface used by Immutable STIX Bundleable Objects
-
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault @NotNull StixInstantdefault Set<ExternalReferenceType> default @NotNull Set<GranularMarkingDm> default @javax.validation.constraints.NotNull booleanDictates if the object is hydrated.@Pattern(regexp="^[a-z][a-z-]+[a-z]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class},message="Id is required") StringgetId()getLang()default @NotNull Set<MarkingDefinitionDm> @Pattern(regexp="^\\-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\-?$") @Size(min=3,max=250) @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class},message="Type is required") StringgetType()default StringMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyIdMethods inherited from interface security.whisper.javastix.common.StixSpecVersion
getSpecVersion
-
Method Details
-
getHydrated
@NotNull @Default default @javax.validation.constraints.NotNull boolean getHydrated()Dictates if the object is hydrated. Hydration is defined as if the Object has only a "ID" or has been properly hydrated with the expected required fields- Specified by:
getHydratedin interfaceBundleableObject- Returns:
- boolean
-
getType
@JsonPropertyDescription("The type property identifies the type of STIX Object (SDO, Relationship Object, etc). The value of the type field MUST be one of the types defined by a STIX Object (e.g., indicator).") @Pattern(regexp="^\\-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\-?$") @Size(min=3, max=250) @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class}, message="Type is required") @Pattern(regexp="^\\-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\-?$") @Size(min=3,max=250) @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class},message="Type is required") String getType()- Specified by:
getTypein interfaceBundleableObject
-
getId
@JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") @Pattern(regexp="^[a-z][a-z-]+[a-z]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class}, message="Id is required") @Pattern(regexp="^[a-z][a-z-]+[a-z]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") @NotBlank(groups={javax.validation.groups.Default.class,ValidateIdOnly.class},message="Id is required") String getId()- Specified by:
getIdin interfaceBundleableObject
-
getCreatedByRef
@JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") @Redactable(useMask=true, redactionMask="identity--__REDACTED__") Optional<IdentitySdo> getCreatedByRef() -
getCreated
@NotNull @JsonPropertyDescription("The created property represents the time at which the first version of this object was created. The timstamp value MUST be precise to the nearest millisecond.") @Default @Redactable(useMask=true) default @NotNull StixInstant getCreated() -
getLang
@NotNull @JsonPropertyDescription("Identifies the language of the text content in this object using ISO 639-2 language codes.") @Redactable @NotNull Optional<String> getLang() -
getExternalReferences
@Default @JsonPropertyDescription("A list of external references which refers to non-STIX information.") @Redactable default Set<ExternalReferenceType> getExternalReferences() -
getObjectMarkingRefs
@Default @NotNull @JsonPropertyDescription("The list of marking-definition objects to be applied to this object.") @Redactable default @NotNull Set<MarkingDefinitionDm> getObjectMarkingRefs()- Specified by:
getObjectMarkingRefsin interfaceBundleableObject
-
getGranularMarkings
@Default @NotNull @JsonPropertyDescription("The set of granular markings that apply to this object.") @Redactable default @NotNull Set<GranularMarkingDm> getGranularMarkings()- Specified by:
getGranularMarkingsin interfaceBundleableObject
-
toJsonString
- Specified by:
toJsonStringin interfaceBundleableObject
-
checkHydrationValidation
@Check default void checkHydrationValidation() throws javax.validation.ConstraintViolationException- Throws:
javax.validation.ConstraintViolationException
-