Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
CMFCore.tests.base.dummy.DummyType Class Reference
Inheritance diagram for CMFCore.tests.base.dummy.DummyType:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.base.dummy.DummyType:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def Title
def allowType
def allowDiscussion
def queryMethodID
def isConstructionAllowed
def __str__
def __call__
def restrictedTraverse
def getIcon
def getId

Public Attributes

 id
 title

Private Member Functions

def _setActions

Private Attributes

 _id
 _actions

Detailed Description

A Dummy Type object 

Definition at line 66 of file dummy.py.


Constructor & Destructor Documentation

def CMFCore.tests.base.dummy.DummyType.__init__ (   self,
  id = 'Dummy Content',
  title = 'Dummy Content',
  actions = () 
)
To fake out some actions, pass in a sequence of tuples where the
first element represents the ID or alias of the action and the
second element is the path to the object to be invoked, such as 
a page template.

Definition at line 70 of file dummy.py.

00070 
00071     def __init__(self, id='Dummy Content', title='Dummy Content', actions=()):
00072         """ To fake out some actions, pass in a sequence of tuples where the
00073         first element represents the ID or alias of the action and the
00074         second element is the path to the object to be invoked, such as 
00075         a page template.
00076         """
00077 
00078         self.id = self._id = id
00079         self.title = title
00080         self._actions = {}
00081 
00082         self._setActions(actions)


Member Function Documentation

Definition at line 53 of file dummy.py.

00053 
00054     def __call__(self):
00055         return self._id

Here is the caller graph for this function:

Definition at line 50 of file dummy.py.

00050 
00051     def __str__(self):
00052         return self._id

def CMFCore.tests.base.dummy.DummyType._setActions (   self,
  actions = () 
) [private]

Definition at line 83 of file dummy.py.

00083 
00084     def _setActions(self, actions=()):
00085         for action_id, action_path in actions:
00086             self._actions[action_id] = action_path

Definition at line 93 of file dummy.py.

00093 
00094     def allowDiscussion(self):
00095         return False

def CMFCore.tests.base.dummy.DummyType.allowType (   self,
  contentType 
)

Definition at line 90 of file dummy.py.

00090 
00091     def allowType(self, contentType):
00092         return True

def CMFCore.tests.base.dummy.DummyObject.getIcon (   self,
  relative = 0 
) [inherited]

Definition at line 59 of file dummy.py.

00059 
00060     def getIcon( self, relative=0 ):
00061         return 'Site: %s' % relative

Here is the caller graph for this function:

def CMFCore.tests.base.dummy.DummyObject.getId (   self) [inherited]

Reimplemented in CMFCore.tests.base.dummy.DummyFolder.

Definition at line 62 of file dummy.py.

00062 
00063     def getId(self):
00064         return self._id
00065 

Definition at line 99 of file dummy.py.

00099 
00100     def isConstructionAllowed(self, container):
00101         return True
00102 

Here is the caller graph for this function:

def CMFCore.tests.base.dummy.DummyType.queryMethodID (   self,
  alias,
  default = None,
  context = None 
)

Definition at line 96 of file dummy.py.

00096 
00097     def queryMethodID(self, alias, default=None, context=None):
00098         return self._actions.get(alias, default)

def CMFCore.tests.base.dummy.DummyObject.restrictedTraverse (   self,
  path 
) [inherited]

Definition at line 56 of file dummy.py.

00056 
00057     def restrictedTraverse( self, path ):
00058         return path and getattr( self, path ) or self

Here is the caller graph for this function:

Definition at line 87 of file dummy.py.

00087 
00088     def Title(self):
00089         return self.title

Here is the caller graph for this function:


Member Data Documentation

Definition at line 79 of file dummy.py.

Reimplemented from CMFCore.tests.base.dummy.DummyObject.

Definition at line 77 of file dummy.py.

Definition at line 77 of file dummy.py.

Definition at line 78 of file dummy.py.


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