Logo Search packages:      
Sourcecode: zope-extfile version File versions

def zope-extfile-1.4.2::ExtImage::ExtImage::manage_afterClone (   self,
  item 
)

When a copy of the object is created (zope copy-paste-operation),
    this function is called by CopySupport.py. A copy of the external 
    file is created and self.filename is changed.

Definition at line 531 of file ExtImage.py.

00531                                      :
        """ When a copy of the object is created (zope copy-paste-operation),
            this function is called by CopySupport.py. A copy of the external 
            file is created and self.filename is changed.
        """
        try: 
            self.aq_parent # This raises AttributeError if no context
        except AttributeError: 
            pass
        else:
            result = ExtImage.inheritedAttribute("manage_afterClone")(self, item)
            self._register()    # Register with TM
            try:
                new_prev_fn = self._get_new_ufn(content_type=self.prev_content_type)
                if self.has_preview and self.filename != self.prev_filename:
                    old_prev_fn = self._get_fsname(self.prev_filename)
                    if old_prev_fn:
                        self._update_data(old_prev_fn, self._temp_fsname(new_prev_fn))
                        self.prev_filename = new_prev_fn
                    else:
                        self.prev_filename = []
                        self.has_preview = 0
                elif self.has_preview:
                    # XXX: This seems to be an impossible state?
                    old_fn = self._get_fsname(self.filename)
                    if not old_fn:
                        self.prev_filename = []
                        self.has_preview = 0
                else:
                    self.prev_filename = []
            finally:
                self._dir__unlock()
            return result
        return ExtImage.inheritedAttribute("manage_afterClone")(self, item)

    security.declarePrivate('manage_afterAdd')
    def manage_afterAdd(self, item, container):


Generated by  Doxygen 1.6.0   Back to index