Back to index

plone3  3.1.7
Static Public Attributes | Private Member Functions | Private Attributes
CMFFormController.FSControllerBase.FSControllerBase Class Reference
Inheritance diagram for CMFFormController.FSControllerBase.FSControllerBase:
Inheritance graph
[legend]
Collaboration diagram for CMFFormController.FSControllerBase.FSControllerBase:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

tuple security = ClassSecurityInfo()

Private Member Functions

def _setProperties
def _baseUpdateFromFS
def _baseReadMetadata

Private Attributes

 _file_mod_time
 _parsed

Detailed Description

Common functions for filesystem objects controlled by portal_form_controller

Definition at line 20 of file FSControllerBase.py.


Member Function Documentation

Definition at line 70 of file FSControllerBase.py.

00070 
00071     def _baseReadMetadata(self):
00072         # re-read .metadata file if it exists
00073         e_fp = self._filepath + '.metadata'
00074         if os.path.exists(e_fp):
00075             metadata = FSMetadata(e_fp)
00076             metadata.read()
00077             self._setProperties(metadata.getProperties())
00078     
00079             # re-read actions and validators whenever we re-read the file
00080             self._read_action_metadata(self.getId(), self._filepath)
00081             self._read_validator_metadata(self.getId(), self._filepath)
00082 
00083 Globals.InitializeClass(FSControllerBase)

Here is the caller graph for this function:

Definition at line 44 of file FSControllerBase.py.

00044 
00045     def _baseUpdateFromFS(self):
00046         parsed = self._parsed
00047         if not parsed or Globals.DevelopmentMode:
00048             fp = self._filepath
00049             try:
00050                 mtime=os.stat(fp)[8]
00051             except:
00052                 mtime=0
00053             e_fp = fp + '.metadata'
00054             try:
00055                 mmtime = os.stat(e_fp)[8]
00056             except:
00057                 mmtime = 0
00058             if mmtime > mtime:
00059                 mtime = mmtime
00060             if not parsed or mtime != self._file_mod_time:
00061                 # if we have to read the file again, remove the cache
00062                 self.ZCacheable_invalidate()
00063                 self._readFile(1)
00064                 self._file_mod_time = mtime
00065                 self._parsed = 1

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFFormController.FSControllerBase.FSControllerBase._setProperties (   self,
  properties = None 
) [private]

Definition at line 26 of file FSControllerBase.py.

00026 
00027     def _setProperties(self, properties=None):
00028         if properties:
00029             # Since props come from the filesystem, this should be
00030             # safe.
00031             self.__dict__.update(properties)
00032             if fullname and properties.get('keep_extension', 0):
00033                 id = fullname
00034 
00035             cache = properties.get('cache')
00036             if cache:
00037                 self.ZCacheable_setManagerId(cache)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 63 of file FSControllerBase.py.

Definition at line 64 of file FSControllerBase.py.

Definition at line 23 of file FSControllerBase.py.


The documentation for this class was generated from the following file: