Class: Hoodoo::Services::Middleware::InterResourceLocal

Inherits:
Client::Endpoint show all
Defined in:
lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb

Overview

This is an endpoint which the middleware uses for inter-resource calls back calling back to that same middleware instance, for resources which exist within the same service application. The middleware manages all the inter-resource preparation and post processing.

Instance Attribute Summary

Attributes inherited from Client::Endpoint

#interaction, #locale, #resource, #session_id, #version

Instance Method Summary collapse

Methods inherited from Client::Endpoint

endpoint_for, #initialize

Constructor Details

This class inherits a constructor from Hoodoo::Client::Endpoint

Instance Method Details

#create(body_hash, query_hash = nil) ⇒ Object

See Hoodoo::Client::Endpoint#create.



85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb', line 85

def create( body_hash, query_hash = nil )
  return @middleware.inter_resource_local(
    :source_interaction => self.interaction(),
    :discovery_result   => @discovery_result,
    :endpoint           => self,

    :action             => :create,

    :body_hash          => body_hash,
    :query_hash         => query_hash
  )
end

#delete(ident, query_hash = nil) ⇒ Object

See Hoodoo::Client::Endpoint#delete.



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb', line 116

def delete( ident, query_hash = nil )
  return @middleware.inter_resource_local(
    :source_interaction => self.interaction(),
    :discovery_result   => @discovery_result,
    :endpoint           => self,

    :action             => :delete,

    :ident              => ident,
    :query_hash         => query_hash
  )
end

#list(query_hash = nil) ⇒ Object

See Hoodoo::Client::Endpoint#list.



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb', line 55

def list( query_hash = nil )
  result =  @middleware.inter_resource_local(
    :source_interaction => self.interaction(),
    :discovery_result   => @discovery_result,
    :endpoint           => self,

    :action             => :list,

    :query_hash         => query_hash
  )
  return inject_enumeration_state( result, query_hash )
end

#show(ident, query_hash = nil) ⇒ Object

See Hoodoo::Client::Endpoint#show.



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb', line 70

def show( ident, query_hash = nil )
  return @middleware.inter_resource_local(
    :source_interaction => self.interaction(),
    :discovery_result   => @discovery_result,
    :endpoint           => self,

    :action             => :show,

    :ident              => ident,
    :query_hash         => query_hash
  )
end

#update(ident, body_hash, query_hash = nil) ⇒ Object

See Hoodoo::Client::Endpoint#update.



100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb', line 100

def update( ident, body_hash, query_hash = nil )
  return @middleware.inter_resource_local(
    :source_interaction => self.interaction(),
    :discovery_result   => @discovery_result,
    :endpoint           => self,

    :action             => :update,

    :ident              => ident,
    :body_hash          => body_hash,
    :query_hash         => query_hash
  )
end