Class: DeepSecurity::IDFilter

Inherits:
TransportObject show all
Defined in:
lib/deepsecurity/transport_objects/id_filter.rb

Overview

Used as a search criteria to limit the scope of objects returned by event transport object ID. Each event transport object, such as IntegrityEventTransport, includes an ID property that is assigned as the primary key of an event when it is generated by a computer agent. Using IDFilterTransport, it is possible to filter event retrieval by this event ID in order to retrieve a specific event by ID, or events that are greater or less than a specified ID. For example, a utility that is designed to retrieve all new events on an interval can use the event ID property to uniquely identify which events have already been retrieved. This way retrieval of duplicate events can be avoided.

Constant Summary

Constants inherited from SavonHelper::MappingObject

SavonHelper::MappingObject::BLACK_LIST

Instance Attribute Summary collapse

Attributes inherited from SavonHelper::MappingObject

#interface

Attributes included from SavonHelper::DSL

#alias_accessor

High-Level SOAP Wrapper collapse

Methods inherited from TransportObject

#manager

Methods inherited from SavonHelper::CachingObject

all_cache_aspects, #cachable?, #cache, cache_aspects, cache_by_aspect, cache_key, #cache_key, from_savon, #store_in_cache

Methods inherited from SavonHelper::MappingObject

all_type_mappings, defined_attributes, from_savon, has_attribute_chain, #initialize, #to_json, #to_s, #to_savon, type_mappings

Methods included from SavonHelper::DSL

#array_boolean_accessor, #array_datetime_accessor, #array_double_accessor, #array_enum_accessor, #array_float__accessor, #array_integer_accessor, #array_ip_address_accessor, #array_object_accessor, #array_string_accessor, #attr_boolean_accessor, #attr_datetime_accessor, #attr_double_accessor, #attr_enum_accessor, #attr_float_accessor, #attr_integer_accessor, #attr_ip_address_accessor, #attr_object_accessor, #attr_string_accessor, #hint_object_accessor

Constructor Details

This class inherits a constructor from SavonHelper::MappingObject

Instance Attribute Details

#idint

Event transport objects ID to filter by.

Returns:

  • (int)


11
12
# File 'lib/deepsecurity/transport_objects/id_filter.rb', line 11

attr_integer_accessor :id,
"Event transport objects ID to filter by."

#operatorEnumOperator

EnumOperator to used to apply the id property, e.g., greater than, less than, and equal.

Returns:



13
14
15
# File 'lib/deepsecurity/transport_objects/id_filter.rb', line 13

attr_enum_accessor :operator,
EnumOperator,
"EnumOperator to used to apply the id property, e.g., greater than, less than, and equal."

Class Method Details

.equals(id) ⇒ IDFilter

Return a new instance for events with the given event id.

Parameters:

  • id (Integer)

Returns:



22
23
24
25
26
27
# File 'lib/deepsecurity/transport_objects/id_filter.rb', line 22

def self.equals(id)
  instance = self.new()
  instance.operator = :equals
  instance.id =id
  instance
end

.greater_than(id) ⇒ IDFilter

Return a new instance for events with event ids greater than the given event id.

Parameters:

  • id (Integer)

Returns:



42
43
44
45
46
47
# File 'lib/deepsecurity/transport_objects/id_filter.rb', line 42

def self.greater_than(id)
  instance = self.new()
  instance.operator = :greater_than
  instance.id =id
  instance
end

.less_than(id) ⇒ IDFilter

Return a new instance for events with event ids less than the given event id.

Parameters:

  • id (Integer)

Returns:



32
33
34
35
36
37
# File 'lib/deepsecurity/transport_objects/id_filter.rb', line 32

def self.less_than(id)
  instance = self.new()
  instance.operator = :less_than
  instance.id =id
  instance
end