Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFEditions.StandardModifiers Namespace Reference

Classes

class  OMBaseModifier
class  OMOutsideChildrensModifier
class  OMInsideChildrensModifier
class  OMSubObjectAdapter
class  RetainWorkflowStateAndHistory
class  RetainPermissionsSettings
class  RetainUIDs
class  RetainATRefs
class  NotRetainATRefs
class  SaveFileDataInFileTypeByReference
class  SillyDemoRetrieveModifier
class  AbortVersioningOfLargeFilesAndImages
class  LargeFilePlaceHolder
class  SkipVersioningOfLargeFilesAndImages

Functions

def initialize
def install
def manage_addOMOutsideChildrensModifier
def manage_addOMInsideChildrensModifier
def manage_addRetainUIDs
def manage_addRetainATRefs
def manage_addNotRetainATRefs
def manage_addRetainWorkflowStateAndHistory
def manage_addRetainPermissionsSettings
def manage_addSaveFileDataInFileTypeByReference
def manage_addSillyDemoRetrieveModifier
def manage_addAbortVersioningOfLargeFilesAndImages
def manage_addSkipVersioningOfLargeFilesAndImages

Variables

 WRONG_AT = False
 UUID_ATTR = None
 REFERENCE_ANNOTATION = None
tuple manage_OMOutsideChildrensModifierAddForm
tuple manage_OMInsideChildrensModifierAddForm
 manage_RetainUIDsModifierAddForm = \
string __name__ = 'manage_RetainUIDsModifierAddForm'
 manage_RetainATRefsModifierAddForm = \
 manage_NotRetainATRefsModifierAddForm = \
 manage_RetainWorkflowStateAndHistoryModifierAddForm = \
 manage_RetainPermissionsSettingsAddForm = \
 manage_SaveFileDataInFileTypeByReferenceModifierAddForm = \
 manage_SillyDemoRetrieveModifierAddForm = \
 manage_AbortVersioningOfLargeFilesAndImagesAddForm = \
 manage_SkipVersioningOfLargeFilesAndImagesAddForm = \
list _marker = []
string ANNOTATION_PREFIX = 'Archetypes.storage.AnnotationStorage-'
list _empty_marker = []
tuple modifiers

Function Documentation

Registers modifiers with zope (on zope startup).

Definition at line 63 of file StandardModifiers.py.

00063 
00064 def initialize(context):
00065     """Registers modifiers with zope (on zope startup).
00066     """
00067     for m in modifiers:
00068         context.registerClass(
00069             m['wrapper'], m['id'],
00070             permission = ManagePortal,
00071             constructors = (m['form'], m['factory']),
00072             icon = m['icon'],
00073         )

def CMFEditions.StandardModifiers.install (   portal_modifier)
Registers modifiers in the modifier registry (at tool install time).

Definition at line 74 of file StandardModifiers.py.

00074 
00075 def install(portal_modifier):
00076     """Registers modifiers in the modifier registry (at tool install time).
00077     """
00078     for m in modifiers:
00079         id = m['id']
00080         if id in portal_modifier.objectIds():
00081             continue
00082         title = m['title']
00083         modifier = m['modifier']()
00084         wrapper = m['wrapper'](id, modifier, title)
00085         enabled = m['enabled']
00086         if IConditionalTalesModifier.isImplementedBy(wrapper):
00087             wrapper.edit(enabled, m['condition'])
00088         else:
00089             wrapper.edit(enabled)
00090 
00091         portal_modifier.register(m['id'], wrapper)
00092 

def CMFEditions.StandardModifiers.manage_addAbortVersioningOfLargeFilesAndImages (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a silly demo retrieve modifier

Definition at line 236 of file StandardModifiers.py.

00236 
00237                                             REQUEST=None):
00238     """Add a silly demo retrieve modifier
00239     """
00240     modifier = AbortVersioningOfLargeFilesAndImages(id, title)
00241     self._setObject(id, modifier)
00242 
00243     if REQUEST is not None:
00244         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00245 

def CMFEditions.StandardModifiers.manage_addNotRetainATRefs (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier that removes Archetypes references of the working
   copy when reverting to a previous version without those references.

Definition at line 156 of file StandardModifiers.py.

00156 
00157 def manage_addNotRetainATRefs(self, id, title=None, REQUEST=None):
00158     """Add a modifier that removes Archetypes references of the working
00159        copy when reverting to a previous version without those references.
00160     """
00161     modifier = NotRetainATRefs()
00162     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00163 
00164     if REQUEST is not None:
00165         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00166 

def CMFEditions.StandardModifiers.manage_addOMInsideChildrensModifier (   self,
  id,
  title = None,
  REQUEST = None 
)
Add an object manager modifier treating children as inside refs

Definition at line 112 of file StandardModifiers.py.

00112 
00113                                         REQUEST=None):
00114     """Add an object manager modifier treating children as inside refs
00115     """
00116     modifier = OMInsideChildrensModifier()
00117     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00118 
00119     if REQUEST is not None:
00120         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00121 

def CMFEditions.StandardModifiers.manage_addOMOutsideChildrensModifier (   self,
  id,
  title = None,
  REQUEST = None 
)
Add an object manager modifier treating childrens as outside refs

Definition at line 97 of file StandardModifiers.py.

00097 
00098 def manage_addOMOutsideChildrensModifier(self, id, title=None, REQUEST=None):
00099     """Add an object manager modifier treating childrens as outside refs
00100     """
00101     modifier = OMOutsideChildrensModifier()
00102     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00103 
00104     if REQUEST is not None:
00105         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00106 

def CMFEditions.StandardModifiers.manage_addRetainATRefs (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier retaining AT References upon retrieve.

Definition at line 142 of file StandardModifiers.py.

00142 
00143 def manage_addRetainATRefs(self, id, title=None, REQUEST=None):
00144     """Add a modifier retaining AT References upon retrieve.
00145     """
00146     modifier = RetainATRefs()
00147     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00148 
00149     if REQUEST is not None:
00150         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')

def CMFEditions.StandardModifiers.manage_addRetainPermissionsSettings (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier retaining permissions upon retrieve.

Definition at line 189 of file StandardModifiers.py.

00189 
00190                                             REQUEST=None):
00191     """Add a modifier retaining permissions upon retrieve.
00192     """
00193     modifier = RetainPermissionsSettings()
00194     self._setObject(id, ConditionalModifier(id, modifier, title))
00195 
00196     if REQUEST is not None:
00197         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00198 

def CMFEditions.StandardModifiers.manage_addRetainUIDs (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier retaining UIDs upon retrieve.

Definition at line 127 of file StandardModifiers.py.

00127 
00128 def manage_addRetainUIDs(self, id, title=None, REQUEST=None):
00129     """Add a modifier retaining UIDs upon retrieve.
00130     """
00131     modifier = RetainUIDs()
00132     self._setObject(id, ConditionalModifier(id, modifier, title))
00133 
00134     if REQUEST is not None:
00135         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00136 

def CMFEditions.StandardModifiers.manage_addRetainWorkflowStateAndHistory (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier retaining workflow state upon retrieve.

Definition at line 173 of file StandardModifiers.py.

00173 
00174                                             REQUEST=None):
00175     """Add a modifier retaining workflow state upon retrieve.
00176     """
00177     modifier = RetainWorkflowStateAndHistory()
00178     self._setObject(id, ConditionalModifier(id, modifier, title))
00179 
00180     if REQUEST is not None:
00181         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00182 

def CMFEditions.StandardModifiers.manage_addSaveFileDataInFileTypeByReference (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a modifier avoiding unnecessary cloning of file data.

Definition at line 205 of file StandardModifiers.py.

00205 
00206                                                 REQUEST=None):
00207     """Add a modifier avoiding unnecessary cloning of file data.
00208     """
00209     modifier = SaveFileDataInFileTypeByReference()
00210     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00211 
00212     if REQUEST is not None:
00213         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00214 
# silly modifier just for demos
def CMFEditions.StandardModifiers.manage_addSillyDemoRetrieveModifier (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a silly demo retrieve modifier

Definition at line 220 of file StandardModifiers.py.

00220 
00221                                             REQUEST=None):
00222     """Add a silly demo retrieve modifier
00223     """
00224     modifier = SillyDemoRetrieveModifier()
00225     self._setObject(id, ConditionalTalesModifier(id, modifier, title))
00226 
00227     if REQUEST is not None:
00228         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00229 

def CMFEditions.StandardModifiers.manage_addSkipVersioningOfLargeFilesAndImages (   self,
  id,
  title = None,
  REQUEST = None 
)
Add a silly demo retrieve modifier

Definition at line 252 of file StandardModifiers.py.

00252 
00253                                             REQUEST=None):
00254     """Add a silly demo retrieve modifier
00255     """
00256     modifier = SkipVersioningOfLargeFilesAndImages(id, title)
00257     self._setObject(id, modifier)
00258 
00259     if REQUEST is not None:
00260         REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
00261 
00262 
00263 
00264 
00265 #----------------------------------------------------------------------
00266 # Standard modifier implementation
00267 #----------------------------------------------------------------------


Variable Documentation

Definition at line 125 of file StandardModifiers.py.

Definition at line 792 of file StandardModifiers.py.

Definition at line 477 of file StandardModifiers.py.

string CMFEditions.StandardModifiers.ANNOTATION_PREFIX = 'Archetypes.storage.AnnotationStorage-'

Definition at line 710 of file StandardModifiers.py.

Definition at line 230 of file StandardModifiers.py.

Definition at line 151 of file StandardModifiers.py.

Initial value:
00001 PageTemplateFile('www/OMInsideChildrensModifierAddForm.pt',
00002                                           globals(),
00003                                           __name__='manage_OMInsideChildrensModifierAddForm')

Definition at line 107 of file StandardModifiers.py.

Initial value:
00001 PageTemplateFile('www/OMOutsideChildrensModifierAddForm.pt',
00002                                           globals(),
00003                                           __name__='manage_OMOutsideChildrensModifierAddForm')

Definition at line 93 of file StandardModifiers.py.

Definition at line 137 of file StandardModifiers.py.

Definition at line 183 of file StandardModifiers.py.

Definition at line 122 of file StandardModifiers.py.

Definition at line 167 of file StandardModifiers.py.

Definition at line 199 of file StandardModifiers.py.

Definition at line 215 of file StandardModifiers.py.

Definition at line 246 of file StandardModifiers.py.

Definition at line 866 of file StandardModifiers.py.

Definition at line 56 of file StandardModifiers.py.

Definition at line 55 of file StandardModifiers.py.

Definition at line 52 of file StandardModifiers.py.