Class Software
java.lang.Object
security.whisper.javastix.coo.objects.Software
- All Implemented Interfaces:
Serializable,BundleableObject,Stix,StixCustomProperties,CyberObservableObject,CyberObservableObjectCommonProperties,SoftwareCoo,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class Software
extends Object
implements SoftwareCoo
software
The Software Object represents high-level properties associated with software, including software products.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic Software.Builderbuilder()Creates a builder forSoftware.static SoftwarecopyOf(SoftwareCoo instance) Creates an immutable copy of aSoftwareCoovalue.booleanThis instance is equal to all instances ofSoftwarethat have equal attribute values.getCpe()TODO The value for this property MUST be a CPE v2.3 entry from the official NVD CPE Dictionary.Custom Properties for STIX Objects.Indicates whether the data contained in the SCO has been defanged.com.google.common.collect.ImmutableSet<CyberObservableExtension> Multiple extensions can be added, but only 1 instance of a specific extension can be added.com.google.common.collect.ImmutableSet<GranularMarkingDm> booleangetId()Deterministically generates the ID for this software based on its name.getName()com.google.common.collect.ImmutableSet<MarkingDefinitionDm> Used for generation of Map Keys byManually set this value if you want to control key names.invalid reference
ObservedDataSdo#getObjects()getType()inthashCode()Computes a hash code from attributes:name,cpe,vendor,version,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString.toString()Prints the immutable valueSoftwarewith attribute values.final SoftwareCopy the current immutable object by setting a present value for the optionalcpeattribute.final SoftwareCopy the current immutable object by setting an optional value for thecpeattribute.final SoftwarewithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final SoftwarewithDefanged(boolean value) Copy the current immutable object by setting a present value for the optionaldefangedattribute.final SoftwarewithDefanged(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedefangedattribute.final SoftwarewithExtensions(Iterable<? extends CyberObservableExtension> elements) Copy the current immutable object with elements that replace the content ofextensions.final SoftwarewithExtensions(CyberObservableExtension... elements) Copy the current immutable object with elements that replace the content ofextensions.final SoftwarewithGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final SoftwarewithGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final SoftwarewithHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.final SoftwareCopy the current immutable object by setting a value for thenameattribute.final SoftwarewithObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final SoftwarewithObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final SoftwarewithObservableObjectKey(String value) Copy the current immutable object by setting a value for theobservableObjectKeyattribute.final SoftwarewithToJsonString(String value) Copy the current immutable object by setting a value for thetoJsonStringattribute.final SoftwareCopy the current immutable object by setting a value for thetypeattribute.final SoftwarewithVendor(String value) Copy the current immutable object by setting a present value for the optionalvendorattribute.final SoftwarewithVendor(Optional<String> optional) Copy the current immutable object by setting an optional value for thevendorattribute.final SoftwarewithVersion(String value) Copy the current immutable object by setting a present value for the optionalversionattribute.final SoftwarewithVersion(Optional<String> optional) Copy the current immutable object by setting an optional value for theversionattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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.coo.objects.SoftwareCoo
getLanguages
-
Method Details
-
getName
- Specified by:
getNamein interfaceSoftwareCoo- Returns:
- The value of the
nameattribute
-
getCpe
@JsonPropertyDescription("Specifies the Common Platform Enumeration (CPE) entry for the software, if available.") public Optional<String> getCpe()TODO The value for this property MUST be a CPE v2.3 entry from the official NVD CPE Dictionary. regex pattern = "^cpe:2\\.3:[aho](?::(?:[a-zA-Z0-9!\"#$%invalid input: '&''()*+,\\\\-_.\/();invalid input: '<'=>?@\\[\\]^`{|}~]|\\:)+){10}$" Is not valid for the @Pattern annotation (invalid escape chars) Remove @Pattern(regexp="^cpe:2\\.3:[aho]") until working solution is provided- Specified by:
getCpein interfaceSoftwareCoo
-
getVendor
@JsonPropertyDescription("Specifies the name of the vendor of the software.") public Optional<String> getVendor()- Specified by:
getVendorin interfaceSoftwareCoo- Returns:
- The value of the
vendorattribute
-
getVersion
@JsonPropertyDescription("Specifies the version of the software.") public Optional<String> getVersion()- Specified by:
getVersionin interfaceSoftwareCoo- Returns:
- The value of the
versionattribute
-
getId
Deterministically generates the ID for this software based on its name.- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceCyberObservableObjectCommonProperties- Specified by:
getIdin interfaceSoftwareCoo
-
getType
- Specified by:
getTypein interfaceBundleableObject- Specified by:
getTypein interfaceCyberObservableObjectCommonProperties- Returns:
- The value of the
typeattribute
-
getExtensions
@JsonPropertyDescription("Specifies any extensions of the object, as a dictionary.") public com.google.common.collect.ImmutableSet<CyberObservableExtension> getExtensions()Multiple extensions can be added, but only 1 instance of a specific extension can be added.- Specified by:
getExtensionsin interfaceCyberObservableObjectCommonProperties
-
getObservableObjectKey
Used for generation of Map Keys byManually set this value if you want to control key names. Otherwise UUIDs will be used.invalid reference
ObservedDataSdo#getObjects()- Specified by:
getObservableObjectKeyin interfaceCyberObservableObjectCommonProperties
-
getDefanged
@JsonPropertyDescription("Indicates whether the data contained in the SCO has been defanged.") public Optional<Boolean> getDefanged()Indicates whether the data contained in the SCO has been defanged. Defanging refers to the process of modifying data to make it safe to handle (e.g., changing an IP address from 192.168.1.1 to 192[.]168[.]1[.]1).- Specified by:
getDefangedin interfaceCyberObservableObjectCommonProperties
-
getCustomProperties
Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
getObjectMarkingRefs
- Specified by:
getObjectMarkingRefsin interfaceBundleableObject- Returns:
- The value of the
objectMarkingRefsattribute
-
getGranularMarkings
- Specified by:
getGranularMarkingsin interfaceBundleableObject- Returns:
- The value of the
granularMarkingsattribute
-
getHydrated
public boolean getHydrated()- Specified by:
getHydratedin interfaceBundleableObject- Returns:
- The value of the
hydratedattribute
-
toJsonString
- Specified by:
toJsonStringin interfaceBundleableObject- Returns:
- The value of the
toJsonStringattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withCpe
Copy the current immutable object by setting a present value for the optionalcpeattribute.- Parameters:
value- The value for cpe- Returns:
- A modified copy of
thisobject
-
withCpe
Copy the current immutable object by setting an optional value for thecpeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for cpe- Returns:
- A modified copy of
thisobject
-
withVendor
Copy the current immutable object by setting a present value for the optionalvendorattribute.- Parameters:
value- The value for vendor- Returns:
- A modified copy of
thisobject
-
withVendor
Copy the current immutable object by setting an optional value for thevendorattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for vendor- Returns:
- A modified copy of
thisobject
-
withVersion
Copy the current immutable object by setting a present value for the optionalversionattribute.- Parameters:
value- The value for version- Returns:
- A modified copy of
thisobject
-
withVersion
Copy the current immutable object by setting an optional value for theversionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for version- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extensions elements to set- Returns:
- A modified copy of
thisobject
-
withObservableObjectKey
Copy the current immutable object by setting a value for theobservableObjectKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for observableObjectKey- Returns:
- A modified copy of the
thisobject
-
withDefanged
Copy the current immutable object by setting a present value for the optionaldefangedattribute.- Parameters:
value- The value for defanged- Returns:
- A modified copy of
thisobject
-
withDefanged
Copy the current immutable object by setting an optional value for thedefangedattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for defanged- Returns:
- A modified copy of
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of objectMarkingRefs elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of granularMarkings elements to set- Returns:
- A modified copy of
thisobject
-
withHydrated
Copy the current immutable object by setting a value for thehydratedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hydrated- Returns:
- A modified copy of the
thisobject
-
withToJsonString
Copy the current immutable object by setting a value for thetoJsonStringattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for toJsonString (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofSoftwarethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,cpe,vendor,version,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString. -
toString
Prints the immutable valueSoftwarewith attribute values. -
copyOf
Creates an immutable copy of aSoftwareCoovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Software instance
-
builder
Creates a builder forSoftware.- Returns:
- A new Software builder
-