""" Image object """ __version__ = "$Revision$"[11:-2] import Globals from Globals import Acquisition, Persistent from Acquisition import aq_base, aq_inner, aq_parent, Explicit from AccessControl import ClassSecurityInfo from Products.ZCatalog.CatalogPathAwareness import CatalogAware from OFS.Image import Image as BaseImage from zope.interface import implements from Permissions import * from interfaces import IImage class Image(CatalogAware, BaseImage): """ image """ meta_type = 'image' security = ClassSecurityInfo() security.declareObjectPublic() implements(IImage) def __init__(self, id, title, file, content_type, precondition): BaseImage.__init__(self, id, title, '', content_type, precondition) self.id=id self.erased = 0 self.default_catalog = 'cat_images' security.declarePrivate('manage_afterAdd') def manage_afterAdd(self, item, container): self.index_object() def _setErased(self): self.erased = 1 def getErased(self): return self.erased def _setFilename(self, name): self.filename = name def getFilename(self): return getattr(self, 'filename', '') def _setUser(self, user): self.user = user def getUser(self): return getattr(self, 'user', '') Globals.InitializeClass(Image) #EOF