Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
plone.app.viewletmanager.storage.ViewletSettingsStorage Class Reference
Inheritance diagram for plone.app.viewletmanager.storage.ViewletSettingsStorage:
Inheritance graph
[legend]
Collaboration diagram for plone.app.viewletmanager.storage.ViewletSettingsStorage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getOrder
def setOrder
def getHidden
def setHidden
def getDefault
def setDefault

Private Attributes

 _order
 _hidden
 _defaults

Detailed Description

Definition at line 8 of file storage.py.


Constructor & Destructor Documentation

Definition at line 11 of file storage.py.

00011 
00012     def __init__(self):
00013         self._order = PersistentDict()
00014         self._hidden = PersistentDict()
00015         self._defaults = PersistentDict()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 46 of file storage.py.

00046 
00047     def getDefault(self, name):
00048         try:
00049             return self._defaults.get(name)
00050         except AttributeError:  # Backward compatibility
00051             self._defaults = PersistentDict()
00052             self.setDefault(name, 'Plone Default')
00053             return self.getDefault(name)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 32 of file storage.py.

00032 
00033     def getHidden(self, name, skinname):
00034         skin = self._hidden.get(skinname, {})
00035         hidden = skin.get(name, ())
00036         if not hidden:
00037             skinname = self.getDefault(name)
00038             if skinname is not None:
00039                 skin = self._hidden.get(skinname, {})
00040                 hidden = skin.get(name, ())
00041         return hidden

Here is the call graph for this function:

Definition at line 16 of file storage.py.

00016 
00017     def getOrder(self, name, skinname):
00018         skin = self._order.get(skinname, {})
00019         order = skin.get(name, ())
00020         if not order:
00021             skinname = self.getDefault(name)
00022             if skinname is not None:
00023                 skin = self._order.get(skinname, {})
00024                 order = skin.get(name, ())
00025         return order

Here is the call graph for this function:

Definition at line 54 of file storage.py.

00054 
00055     def setDefault(self, name, skinname):
00056         try:
00057             self._defaults[name] = skinname
00058         except AttributeError:  # Backward compatibility
00059             self._defaults = PersistentDict()
00060             self.setDefault(name, skinname)

Here is the call graph for this function:

Here is the caller graph for this function:

def plone.app.viewletmanager.storage.ViewletSettingsStorage.setHidden (   self,
  name,
  skinname,
  hidden 
)

Definition at line 42 of file storage.py.

00042 
00043     def setHidden(self, name, skinname, hidden):
00044         skin = self._hidden.setdefault(skinname, PersistentDict())
00045         skin[name] = tuple(hidden)

def plone.app.viewletmanager.storage.ViewletSettingsStorage.setOrder (   self,
  name,
  skinname,
  order 
)

Definition at line 26 of file storage.py.

00026 
00027     def setOrder(self, name, skinname, order):
00028         skin = self._order.setdefault(skinname, PersistentDict())
00029         skin[name] = tuple(order)
00030         if self.getDefault(name) is None:
00031             self.setDefault(name, skinname)

Here is the call graph for this function:


Member Data Documentation

Definition at line 14 of file storage.py.

Definition at line 13 of file storage.py.

Definition at line 12 of file storage.py.


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