Commit fab965a2 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

[OPENBUS-2068] Renomear a operação 'getServices' do 'OfferRegistry'.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/core/trunk@134791 ae0415b3-e90b-0410-900d-d0be9363c56b
parent b6cb8efe
......@@ -115,10 +115,10 @@ NOTE: testar Entity ID contendo caracteres UTF-8 e ISO-8859-1!
**** 3.8.3.7 [NO|OK] depois de ser notificado que foi deslogado remotamente
** 3.9 onInvalidLoginCallback:
*** UNDEFINED 3.9.1 Depois do 'close' :runfail:
*** 3.9.2 É chamada no 'logout|getServices()' depois do login ter expirado
**** 3.9.2.1 Quando a callback não reloga (logout()==false | getServices()->NO_PERMISSION{InvalidLogin}) :run:
**** 3.9.2.2 Quando a callback reloga (logout()==true | getServices()->OK) :run:
*** 3.9.3 Não é chamada no 'logout|getServices' depois do 'logout' :run:
*** 3.9.2 É chamada no 'logout|getAllServices()' depois do login ter expirado
**** 3.9.2.1 Quando a callback não reloga (logout()==false | getAllServices()->NO_PERMISSION{InvalidLogin}) :run:
**** 3.9.2.2 Quando a callback reloga (logout()==true | getAllServices()->OK) :run:
*** 3.9.3 Não é chamada no 'logout|getAllServices' depois do 'logout' :run:
** 3.10 logout
*** 3.10.1 Depois do 'close' :runfail:
*** 3.10.2 Depois de algum 'loginBy*' (senha, certificado e single-signon) :run:
......
......@@ -1099,7 +1099,7 @@ handlers["list-offer"] = function(cmd)
local id = cmd.params[cmd.name]
if id == null then
-- Lista todos
ok, offers = pcall(conn.offers.getServices, conn.offers)
ok, offers = pcall(conn.offers.getAllServices, conn.offers)
if not ok then
printf("[ERRO] Erro inesperado ao listar ofertas: %s", tostring(offers))
return false
......@@ -1129,7 +1129,7 @@ handlers["del-offer"] = function(cmd)
local offers, ok
local id = cmd.params.entity
if not id or id == null then
ok, offers = pcall(conn.offers.getServices, conn.offers)
ok, offers = pcall(conn.offers.getAllServices, conn.offers)
if not ok then
printf("[ERRO] Erro inesperado ao remover oferta: %s", tostring(offers))
return false
......@@ -1174,7 +1174,7 @@ handlers["list-props"] = function(cmd)
local ok, offers
local id = cmd.params[cmd.name]
if not id or id == null then
ok, offers = pcall(conn.offers.getServices, conn.offers)
ok, offers = pcall(conn.offers.getAllServices, conn.offers)
if not ok then
printf("[ERRO] Erro inesperado ao listar propriedades: %s", tostring(offers))
return false
......@@ -1346,7 +1346,7 @@ handlers["report"] = function(cmd)
end
msg = " - Ofertas publicadas: %s"
local ok, offers = pcall(conn.offers.getServices, conn.offers)
local ok, offers = pcall(conn.offers.getAllServices, conn.offers)
if not ok then
local errormsg = string.format("[ERRO]\n%s", tostring(offers))
printf(msg, errormsg)
......
......@@ -564,7 +564,7 @@ function OfferRegistry:findServices(properties)
return self.offers:find(properties)
end
function OfferRegistry:getServices()
function OfferRegistry:getAllServices()
local result = {}
for _, offers in pairs(self.offers.index["openbus.offer.id"]) do
for offer in pairs(offers) do
......
......@@ -179,7 +179,7 @@ end
-- ServiceFailure);
-- ServiceOfferDescSeq findServices(in ServicePropertySeq properties)
-- raises (ServiceFailure);
-- ServiceOfferDescSeq getServices() raises (ServiceFailure);
-- ServiceOfferDescSeq getAllServices() raises (ServiceFailure);
-- Interface ServiceOffer:
-- readonly attribute OfferedService service_ref;
......@@ -555,17 +555,17 @@ function ORCase.testFindBySingleProperty(self)
end
end
function ORCase.testGetServices(self)
local services = self.offers:getServices()
function ORCase.testGetAllServices(self)
local services = self.offers:getAllServices()
local preSize = #services
local context = createPingComponent(self.conn.orb)
local comp = context.IComponent
self.serviceOffer = self.offers:registerService(comp, offerProps)
services = self.offers:getServices()
services = self.offers:getAllServices()
Check.assertEquals(preSize + 1, #services)
self.serviceOffer:remove()
self.serviceOffer = nil
services = self.offers:getServices()
services = self.offers:getAllServices()
Check.assertEquals(preSize, #services)
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment