Back to index

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

List of all members.

Public Member Functions

def __init__
def getId
def manage_options
def manage_workspace
def __getattr__
def get
def has_key
def objectIds
def keys
def items
def values
def manage_renameObjects

Public Attributes

 id

Private Member Functions

def _checkId
def _getOb
def _setOb
def _delOb

Private Attributes

 _mapping

Detailed Description

Definition at line 24 of file ContainerTab.py.


Constructor & Destructor Documentation

Definition at line 26 of file ContainerTab.py.

00026 
00027     def __init__(self, id):
00028         self.id = id
00029         self._mapping = {}


Member Function Documentation

Definition at line 69 of file ContainerTab.py.

00069 
00070     def __getattr__(self, name):
00071         ob = self._mapping.get(name, None)
00072         if ob is not None:
00073             return ob
00074         raise AttributeError, name

Here is the caller graph for this function:

def DCWorkflow.ContainerTab.ContainerTab._checkId (   self,
  id,
  allow_dup = 0 
) [private]

Definition at line 51 of file ContainerTab.py.

00051 
00052     def _checkId(self, id, allow_dup=0):
00053         if not allow_dup:
00054             if self._mapping.has_key(id):
00055                 raise 'Bad Request', 'The id "%s" is already in use.' % id
00056         return Folder._checkId(self, id, allow_dup)

Here is the caller graph for this function:

def DCWorkflow.ContainerTab.ContainerTab._delOb (   self,
  name 
) [private]

Definition at line 80 of file ContainerTab.py.

00080 
00081     def _delOb(self, name):
00082         mapping = self._mapping
00083         del mapping[name]
00084         self._mapping = mapping  # Trigger persistence.

def DCWorkflow.ContainerTab.ContainerTab._getOb (   self,
  name,
  default = _marker 
) [private]

Definition at line 57 of file ContainerTab.py.

00057 
00058     def _getOb(self, name, default=_marker):
00059         mapping = self._mapping
00060         if mapping.has_key(name):
00061             res = mapping[name]
00062             if hasattr(res, '__of__'):
00063                 res = res.__of__(self)
00064             return res
00065         else:
00066             if default is _marker:
00067                 raise KeyError, name
00068             return default

def DCWorkflow.ContainerTab.ContainerTab._setOb (   self,
  name,
  value 
) [private]

Definition at line 75 of file ContainerTab.py.

00075 
00076     def _setOb(self, name, value):
00077         mapping = self._mapping
00078         mapping[name] = aq_base(value)
00079         self._mapping = mapping  # Trigger persistence.

def DCWorkflow.ContainerTab.ContainerTab.get (   self,
  name,
  default = None 
)

Definition at line 85 of file ContainerTab.py.

00085 
00086     def get(self, name, default=None):
00087         if self._mapping.has_key(name):
00088             return self[name]
00089         else:
00090             return default

Here is the caller graph for this function:

Definition at line 30 of file ContainerTab.py.

00030 
00031     def getId(self):
00032         return self.id

Definition at line 91 of file ContainerTab.py.

00091 
00092     def has_key(self, key):
00093         return self._mapping.has_key(key)

Here is the caller graph for this function:

Definition at line 101 of file ContainerTab.py.

00101 
00102     def items(self):
00103         return map(lambda id, self=self: (id, self._getOb(id)),
00104                    self._mapping.keys())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file ContainerTab.py.

00098 
00099     def keys(self):
00100         return self._mapping.keys()

Here is the caller graph for this function:

Definition at line 33 of file ContainerTab.py.

00033 
00034     def manage_options(self):
00035         parent = aq_parent(aq_inner(self))
00036         res = []
00037         options = parent.manage_options
00038         if callable(options):
00039             options = options()
00040         for item in options:
00041             item = item.copy()
00042             item['action'] = '../' + item['action']
00043             res.append(item)
00044         return res

def DCWorkflow.ContainerTab.ContainerTab.manage_renameObjects (   self,
  ids = [],
  new_ids = [],
  REQUEST = None 
)
Rename several sub-objects

Definition at line 109 of file ContainerTab.py.

00109 
00110     def manage_renameObjects(self, ids=[], new_ids=[], REQUEST=None):
00111         """Rename several sub-objects"""
00112         if len(ids) != len(new_ids):
00113             raise 'Bad Request', 'Please rename each listed object.'
00114         for i in range(len(ids)):
00115             if ids[i] != new_ids[i]:
00116                 self.manage_renameObject(ids[i], new_ids[i])
00117         if REQUEST is not None:
00118             return self.manage_main(REQUEST)
00119         return None

Here is the call graph for this function:

Redirects to the primary option.

Definition at line 45 of file ContainerTab.py.

00045 
00046     def manage_workspace(self, RESPONSE):
00047         '''
00048         Redirects to the primary option.
00049         '''
00050         RESPONSE.redirect(self.absolute_url() + '/manage_main')

Here is the call graph for this function:

def DCWorkflow.ContainerTab.ContainerTab.objectIds (   self,
  spec = None 
)

Definition at line 94 of file ContainerTab.py.

00094 
00095     def objectIds(self, spec=None):
00096         # spec is not important for now...
00097         return self._mapping.keys()

Here is the caller graph for this function:

Definition at line 105 of file ContainerTab.py.

00105 
00106     def values(self):
00107         return map(lambda id, self=self: self._getOb(id),
00108                    self._mapping.keys())

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 28 of file ContainerTab.py.

Definition at line 27 of file ContainerTab.py.


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