Commit 2b6a12f2 authored by Sebastien Robin's avatar Sebastien Robin Committed by Georgios Dagkakis

template tool: API should allows to export a single business template

parent 0a9bb62e
...@@ -469,7 +469,8 @@ class TemplateTool (BaseTool): ...@@ -469,7 +469,8 @@ class TemplateTool (BaseTool):
else: else:
shutil.rmtree(file_object_path) shutil.rmtree(file_object_path)
def _importAndReExportBusinessTemplate(self, template_path): security.declareProtected( 'Import/Export objects', 'importAndReExportBusinessTemplateFromPath' )
def importAndReExportBusinessTemplateFromPath(self, template_path):
""" """
Imports the template that is in the template_path and exports it to the Imports the template that is in the template_path and exports it to the
same path. same path.
...@@ -525,7 +526,8 @@ class TemplateTool (BaseTool): ...@@ -525,7 +526,8 @@ class TemplateTool (BaseTool):
if not os.path.exists((os.path.join(template_path, 'bt'))): if not os.path.exists((os.path.join(template_path, 'bt'))):
LOG(business_template_id,0,'has no bt sub-folder, so it is skipped') LOG(business_template_id,0,'has no bt sub-folder, so it is skipped')
else: else:
self.activate(activity='SQLQueue')._importAndReExportBusinessTemplate(template_path) self.activate(activity='SQLQueue').\
importAndReExportBusinessTemplateFromPath(template_path)
security.declareProtected(Permissions.ManagePortal, 'getFilteredDiff') security.declareProtected(Permissions.ManagePortal, 'getFilteredDiff')
def getFilteredDiff(self, diff): def getFilteredDiff(self, diff):
......
Markdown is supported
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