Class: Sbuilder::ParamSet_If
- Inherits:
-
ParamSet
- Object
- ParamSetRoot
- ParamSet
- Sbuilder::ParamSet_If
- Includes:
- Utils::MyLogger
- Defined in:
- lib/sbuilder/param_set_if.rb
Overview
Interface paramter set model interfaces. An interface is identified by path+operations (e.g. /customer(get) ).
Method #parameters return input to the interface, and #response -method output from the interface service.
Constant Summary collapse
- PROGNAME =
mixer
nil
Constants included from Utils::MyLogger
Instance Attribute Summary collapse
-
#infrastructureService ⇒ Object
readonly
to return response from interface service.
-
#interfaceService ⇒ Object
readonly
process.
-
#operation ⇒ Object
readonly
REST path.
-
#path ⇒ Object
readonly
REST path.
- #response ⇒ Object readonly
Attributes inherited from ParamSetRoot
#parameters, #sourceColumn, #sourceLine, #sourceModule
Instance Method Summary collapse
-
#doGetId ⇒ Object
return identity.
-
#initialize(options = {}) ⇒ ParamSet_If
constructor
—————————————————————— constrcutore.
- #isArray ⇒ Object
-
#parametersToResolve ⇒ Parameter:Array
response.parameters, if any.
-
#setIdentity(path, operation) ⇒ Object
set identity.
-
#setInfrastructureService(infrastructureService) ⇒ Object
Rendering generates support to return values from infrastructure service.
-
#setInterfaceService(interfaceService) ⇒ Object
Rendering generates interface procesess when true.
-
#setResponse(response) ⇒ Object
def addResponse( response ) @responses << response self end.
Methods included from Utils::MyLogger
Methods inherited from ParamSet
cleanUpName, #getId, #getName, #locateParameter, #matchesWithParamSet, #parameter_definitions, #resolveNeeded, #to_s
Methods inherited from ParamSetRoot
#addParameter, id2name, #lookupParameter, #setSourceLink
Constructor Details
#initialize(options = {}) ⇒ ParamSet_If
constrcutore
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sbuilder/param_set_if.rb', line 35 def initialize( = {} ) super( ) @logger = getLogger( PROGNAME, ) @logger.debug( "#{__method__} initialized" ) @response = nil # default: generate interface processes, no support for response return setInterfaceService( true ) setInfrastructureService( false ) end |
Instance Attribute Details
#infrastructureService ⇒ Object (readonly)
to return response from interface service.
22 23 24 |
# File 'lib/sbuilder/param_set_if.rb', line 22 def infrastructureService @infrastructureService end |
#interfaceService ⇒ Object (readonly)
process
26 27 28 |
# File 'lib/sbuilder/param_set_if.rb', line 26 def interfaceService @interfaceService end |
#operation ⇒ Object (readonly)
REST path
15 16 17 |
# File 'lib/sbuilder/param_set_if.rb', line 15 def operation @operation end |
#path ⇒ Object (readonly)
REST path
14 15 16 |
# File 'lib/sbuilder/param_set_if.rb', line 14 def path @path end |
#response ⇒ Object (readonly)
18 19 20 |
# File 'lib/sbuilder/param_set_if.rb', line 18 def response @response end |
Instance Method Details
#doGetId ⇒ Object
return identity
93 94 95 |
# File 'lib/sbuilder/param_set_if.rb', line 93 def doGetId "#{path}(#{operation})" end |
#isArray ⇒ Object
97 98 99 |
# File 'lib/sbuilder/param_set_if.rb', line 97 def isArray return false end |
#parametersToResolve ⇒ Parameter:Array
response.parameters, if any
77 78 79 |
# File 'lib/sbuilder/param_set_if.rb', line 77 def parametersToResolve parameters + (response.nil? ? [] : response.parameters) end |
#setIdentity(path, operation) ⇒ Object
set identity
86 87 88 89 90 |
# File 'lib/sbuilder/param_set_if.rb', line 86 def setIdentity( path, operation ) @path = path @operation = operation self end |
#setInfrastructureService(infrastructureService) ⇒ Object
Rendering generates support to return values from infrastructure service.
70 71 72 73 |
# File 'lib/sbuilder/param_set_if.rb', line 70 def setInfrastructureService( infrastructureService ) @infrastructureService = infrastructureService self end |
#setInterfaceService(interfaceService) ⇒ Object
Rendering generates interface procesess when true
62 63 64 65 |
# File 'lib/sbuilder/param_set_if.rb', line 62 def setInterfaceService( interfaceService ) @interfaceService = interfaceService self end |
#setResponse(response) ⇒ Object
def addResponse( response )
@responses << response
self
end
54 55 56 57 |
# File 'lib/sbuilder/param_set_if.rb', line 54 def setResponse( response ) @response = response self end |