Ejemplo n.º 1
0
 def getFileItem(self, lang=None):
     """ """
     if lang is None: lang = self.gl_get_selected_language()
     if not self.__files.has_key(lang):
         self.__files[lang] = file_item('', '', '', '', '')
         self._p_changed = 1
     return self.__files[lang]
Ejemplo n.º 2
0
 def getFileItem(self, lang=None):
     """ """
     if lang is None: lang = self.gl_get_selected_language()
     if not self.__files.has_key(lang):
         self.__files[lang] = file_item('', '', '', '', '')
         self._p_changed = 1
     return self.__files[lang]
Ejemplo n.º 3
0
 def getFileItem(self, lang=None):
     """ """
     if lang is None:
         lang = self.gl_get_selected_language()
     if not lang in self.objectIds():
         doc = file_item(lang, lang, None, '', '')
         self._setObject(lang, doc)
     return self._getOb(lang)
Ejemplo n.º 4
0
 def copyFileItems(self, source, target):
     """ """
     if target.objectIds('File'):
         target.manage_delObjects(target.objectIds('File'))
     for lang, item in source.getFileItems():
         doc = file_item(lang, item.title, '', item.precondition, item.getContentType())
         target._setObject(lang, doc)
         doc = target._getOb(lang)
         doc.update_data(item.get_data(as_string=False))
Ejemplo n.º 5
0
 def copyFileItems(self, source, target):
     """ """
     files = {}
     for k, v in source.getFileItems().items():
         files[k] = file_item(v.getId(), v.title, v.data, v.content_type, v.precondition)
         files[k].content_type = v.content_type
         files[k].precondition = v.precondition
         files[k].copyVersions(v)
     target.setFileItems(files)
Ejemplo n.º 6
0
 def copyFileItems(self, source, target):
     """ """
     files = {}
     for k, v in source.getFileItems().items():
         files[k] = file_item(v.getId(), v.title, v.data, v.content_type, v.precondition)
         files[k].content_type = v.content_type
         files[k].precondition = v.precondition
         files[k].copyVersions(v)
     target.setFileItems(files)
Ejemplo n.º 7
0
 def copyFileItems(self, source, target):
     """ """
     files = {}
     for k, v in source.getFileItems().items():
         files[k] = file_item(v.getId(), v.title, '', v.precondition, v.content_type)
         files[k].update_data(v.get_data(as_string=False))
         files[k].content_type = v.content_type
         files[k].precondition = v.precondition
         files[k].copyVersions(v)
     target.setFileItems(files)
Ejemplo n.º 8
0
 def __init__(self, id, title, description, coverage, keywords, sortorder,
     file, precondition, content_type, downloadfilename, releasedate, lang):
     """
     Constructor.
     """
     self.__files = {}
     self.__files[lang] = file_item(id, title, file, content_type, precondition)
     self.save_properties(title, description, coverage, keywords, sortorder,
         downloadfilename, releasedate, lang)
     NyProperties.__dict__['__init__'](self)
Ejemplo n.º 9
0
 def __init__(self, id, title, description, coverage, keywords, sortorder,
     file, precondition, content_type, downloadfilename, releasedate, lang):
     """
     Constructor.
     """
     self.__files = {}
     self.__files[lang] = file_item(id, title, file, content_type, precondition)
     self.save_properties(title, description, coverage, keywords, sortorder,
         downloadfilename, releasedate, lang)
     NyProperties.__dict__['__init__'](self)
Ejemplo n.º 10
0
 def copyFileItems(self, source, target):
     """ """
     files = {}
     for k, v in source.getFileItems().items():
         files[k] = file_item(v.getId(), v.title, '', v.precondition,
                              v.content_type)
         files[k].update_data(v.get_data(as_string=False))
         files[k].content_type = v.content_type
         files[k].precondition = v.precondition
         files[k].copyVersions(v)
     target.setFileItems(files)