bridge, core(params): removed obsolete methods:

- getParams and getParamsForCategory are removed from bridge: XMLUI is now used in place of the old params XML
    - getParamsForCategory has also been removed internaly, as it is now unused, getParams is still used to construct the XMLUI
This commit is contained in:
Goffi 2015-11-14 19:18:07 +01:00
commit bfd143b1e4
2 changed files with 0 additions and 96 deletions

View file

@ -864,12 +864,6 @@ class Memory(object):
def getParamsUI(self, security_limit=C.NO_SECURITY_LIMIT, app='', profile_key=C.PROF_KEY_NONE):
return self.params.getParamsUI(security_limit, app, profile_key)
def getParams(self, security_limit=C.NO_SECURITY_LIMIT, app='', profile_key=C.PROF_KEY_NONE):
return self.params.getParams(security_limit, app, profile_key)
def getParamsForCategory(self, category, security_limit=C.NO_SECURITY_LIMIT, app='', profile_key=C.PROF_KEY_NONE):
return self.params.getParamsForCategory(category, security_limit, app, profile_key)
def getParamsCategories(self):
return self.params.getParamsCategories()

View file

@ -702,35 +702,6 @@ class Params(object):
return self._constructProfileXml(security_limit, app, profile).addCallback(returnXML)
def getParamsForCategory(self, category, security_limit, app, profile_key):
"""
@param category: the desired category
@param security_limit: NO_SECURITY_LIMIT (-1) to return all the params.
Otherwise sole the params which have a security level defined *and*
lower or equal to the specified value are returned.
@param app: name of the frontend requesting the parameters, or '' to get all parameters
@param profile_key: Profile key which can be either a magic (eg: @DEFAULT@) or the name of an existing profile.
@return: node's xml for selected category
"""
#TODO: manage category of general type (without existant profile)
profile = self.getProfileName(profile_key)
if not profile:
log.error(_("Asking params for inexistant profile"))
return ""
def returnCategoryXml(prof_xml):
for node in prof_xml.getElementsByTagName("category"):
if node.nodeName == "category" and node.getAttribute("name") == category:
result = node.toxml()
prof_xml.unlink()
return result
prof_xml.unlink()
return "<category />"
d = self._constructProfileXml(security_limit, app, profile)
return d.addCallback(returnCategoryXml)
def _getParamNode(self, name, category, type_="@ALL@"): # FIXME: is type_ useful ?
"""Return a node from the param_xml
@param name: name of the node