示例#1
0
 def __init__(self, id, filepath, fullname=None, properties=None):
     BaseClass.__init__(self, id, filepath, fullname, properties)
     self.filepath = self._filepath = filepath  # add _filepath for compatibility with pending CMF patch
     try:
         self._read_action_metadata(self.getId(), filepath)
         self._read_validator_metadata(self.getId(), self.filepath)
     except (ValueError, CompilerError), e:
         log(summary='metadata error', text='file = %s' % filepath)
         raise
示例#2
0
 def __init__(self, id, filepath, fullname=None, properties=None):
     BaseClass.__init__(self, id, filepath, fullname, properties)
     self.filepath = self._filepath = filepath  # add _filepath for compatibility with pending CMF patch
     try:
         self._read_action_metadata(self.getId(), filepath)
         self._read_validator_metadata(self.getId(), self.filepath)
     except (ValueError, CompilerError), e:
         log(summary="metadata error", text="file = %s" % filepath)
         raise
示例#3
0
 def manage_afterAdd(self, object, container):
     try:
         BaseClass.manage_afterAdd(self, object, container)
         # Re-read .metadata after adding so that we can do validation checks
         # using information in portal_form_controller.  Since manage_afterAdd
         # is not guaranteed to run, we also call these in __init__
         self._read_action_metadata(self.getId(), self.filepath)
         self._read_validator_metadata(self.getId(), self.filepath)
     except:
         log(summary="metadata error", text="file = %s" % self.filepath)
         logException()
         raise
示例#4
0
 def manage_afterAdd(self, object, container):
     try:
         BaseClass.manage_afterAdd(self, object, container)
         # Re-read .metadata after adding so that we can do validation checks
         # using information in portal_form_controller.  Since manage_afterAdd
         # is not guaranteed to run, we also call these in __init__
         self._read_action_metadata(self.getId(), self.filepath)
         self._read_validator_metadata(self.getId(), self.filepath)
     except:
         log(summary='metadata error', text='file = %s' % self.filepath)
         logException()
         raise
示例#5
0
 def manage_afterAdd(self, object, container):
     try:
         BaseClass.manage_afterAdd(self, object, container)
     except:
         logException()
         raise
示例#6
0
 def __init__(self, id, filepath, fullname=None, properties=None):
     BaseClass.__init__(self, id, filepath, fullname, properties)
     self.filepath = filepath
     self._read_action_metadata(self.getId(), filepath)
示例#7
0
 def _readFile(self, reparse):
     BaseClass._readFile(self, reparse)
     self._readMetadata()
示例#8
0
 def manage_afterAdd(self, object, container):
     try:
         BaseClass.manage_afterAdd(self, object, container)
     except:
         logException()
         raise
示例#9
0
 def __init__(self, id, filepath, fullname=None, properties=None):
     BaseClass.__init__(self, id, filepath, fullname, properties)
     self.filepath = filepath
     self._read_action_metadata(self.getId(), filepath)
示例#10
0
 def _readFile(self, reparse):
     BaseClass._readFile(self, reparse)
     self._readMetadata()