Class: Dynflow::PersistenceAdapters::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/dynflow/persistence_adapters/abstract.rb

Direct Known Subclasses

Sequel

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#loggerObject

The logger is set by the world when used inside it



6
7
8
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 6

def logger
  @logger
end

Instance Method Details

#filtering_byObject



21
22
23
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 21

def filtering_by
  []
end

#find_execution_plans(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • page (Integer)

    index of the page (starting at 0)

  • per_page (Integer)

    the number of the items on page

  • order_by (Symbol)

    name of the column to use for ordering

  • desc (true, false)

    set to true if order should be descending

  • filters (Hash{ Symbol => Object,Array<object> })

    hash represents set of allowed values for a given key representing column

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 35

def find_execution_plans(options = {})
  raise NotImplementedError
end

#load_action(execution_plan_id, action_id) ⇒ Object

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 55

def load_action(execution_plan_id, action_id)
  raise NotImplementedError
end

#load_execution_plan(execution_plan_id) ⇒ Object

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 39

def load_execution_plan(execution_plan_id)
  raise NotImplementedError
end

#load_step(execution_plan_id, step_id) ⇒ Object

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 47

def load_step(execution_plan_id, step_id)
  raise NotImplementedError
end

#log(level, message) ⇒ Object



13
14
15
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 13

def log(level, message)
  (@worlds.first && @worlds.first.logger).send(level, message)
end

#ordering_byObject



25
26
27
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 25

def ordering_by
  []
end

#pagination?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 17

def pagination?
  false
end

#register_world(world) ⇒ Object



8
9
10
11
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 8

def register_world(world)
  @worlds ||= Set.new
  @worlds << world
end

#save_action(execution_plan_id, action_id, value) ⇒ Object

Raises:

  • (NotImplementedError)


59
60
61
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 59

def save_action(execution_plan_id, action_id, value)
  raise NotImplementedError
end

#save_execution_plan(execution_plan_id, value) ⇒ Object

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 43

def save_execution_plan(execution_plan_id, value)
  raise NotImplementedError
end

#save_step(execution_plan_id, step_id, value) ⇒ Object

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 51

def save_step(execution_plan_id, step_id, value)
  raise NotImplementedError
end

#to_hashObject

for debug purposes

Raises:

  • (NotImplementedError)


64
65
66
# File 'lib/dynflow/persistence_adapters/abstract.rb', line 64

def to_hash
  raise NotImplementedError
end