def _process(self): if len(self._material.getResourceList()) == 1: res = self._material.getResourceList()[0] if isinstance(res, conference.Link): url = res.getURL() if url.find(".wmv") != -1: urlwmv = urlHandlers.UHVideoWmvAccess().getURL(res) self._redirect(urlwmv) elif url.find(".flv") != -1 or url.find("rtmp://") != -1: urlflash = urlHandlers.UHVideoFlashAccess().getURL(res) self._redirect(urlflash) else: self._redirect(res.getURL()) elif isinstance(res, conference.LocalFile): self._redirect(urlHandlers.UHFileAccess.getURL(res)) else: #raise "%s"%self._material.getOwner() if self._material.getConference() != None: p = material.WPMaterialConfDisplayBase(self, self._material) else: p = material.WPMaterialCatDisplayBase(self, self._material) wf = self.getWebFactory() if wf is not None: p = wf.getMaterialDisplay(self, self._material) return p.display()
def _processManyMaterials(self): if self._material.getConference() != None: p = material.WPMaterialConfDisplayBase(self, self._material) else: p = material.WPMaterialCatDisplayBase(self, self._material) wf = self.getWebFactory() if wf is not None: p = wf.getMaterialDisplay(self, self._material) return p.display()