Back to index

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

List of all members.

Public Member Functions

def __init__
def manage_afterAdd
def manage_beforeDelete
def absolute_url
def reset
def Title
def listCreators
def Subject
def Description
def created
def modified
def Type
def __call__

Public Attributes

 id
 catalog
 url
 view_id
 after_add_called
 before_delete_called

Static Public Attributes

string meta_type = 'Dummy'
string portal_type = 'Dummy Content'
string url = 'foo_url'
int after_add_called = 0

Private Member Functions

def _getCopy
def _safe_get

Private Attributes

 _args
 _kw

Detailed Description

A Dummy piece of PortalContent

Definition at line 103 of file dummy.py.


Constructor & Destructor Documentation

def CMFCore.tests.base.dummy.DummyContent.__init__ (   self,
  id = 'dummy',
  args,
  kw 
)

Definition at line 114 of file dummy.py.

00114 
00115     def __init__( self, id='dummy', *args, **kw ):
00116         self.id = id
00117         self._args = args
00118         self._kw = {}
00119         self._kw.update( kw )
00120 
00121         self.reset()
00122         self.catalog = kw.get('catalog',0)
00123         self.url = kw.get('url',None)
00124         self.view_id = kw.get('view_id',None)


Member Function Documentation

Definition at line 168 of file dummy.py.

00168 
00169     def __call__(self):
00170         if self.view_id is None:
00171            return DummyContent.inheritedAttribute('__call__')(self)
00172         else:
00173            # view_id control for testing
00174            template = getattr(self, self.view_id)
00175            if getattr(aq_base(template), 'isDocTemp', 0):
00176                return template(self, self.REQUEST, self.REQUEST['RESPONSE'])
00177            else:
00178                return template()

Here is the caller graph for this function:

def CMFCore.tests.base.dummy.DummyContent._getCopy (   self,
  container 
) [private]

Definition at line 138 of file dummy.py.

00138 
00139     def _getCopy(self, container):
00140         return DummyContent( self.id, catalog=self.catalog )

def CMFCore.tests.base.dummy.DummyContent._safe_get (   self,
  attr 
) [private]

Definition at line 141 of file dummy.py.

00141 
00142     def _safe_get(self,attr):
00143         if self.catalog:
00144             return getattr(self,attr,'')
00145         else:
00146             return getattr(self,attr)

Here is the caller graph for this function:

Definition at line 131 of file dummy.py.

00131 
00132     def absolute_url(self):
00133        return self.url

Definition at line 159 of file dummy.py.

00159 
00160     def created( self ):
00161         return self._safe_get('created_date')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 156 of file dummy.py.

00156 
00157     def Description( self ):
00158         return self._safe_get('description')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 150 of file dummy.py.

00150 
00151     def listCreators(self):
00152         return self._safe_get('creators')

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFCore.tests.base.dummy.DummyContent.manage_afterAdd (   self,
  item,
  container 
)

Definition at line 125 of file dummy.py.

00125 
00126     def manage_afterAdd(self, item, container):
00127         self.after_add_called = 1

def CMFCore.tests.base.dummy.DummyContent.manage_beforeDelete (   self,
  item,
  container 
)

Definition at line 128 of file dummy.py.

00128 
00129     def manage_beforeDelete(self, item, container):
00130         self.before_delete_called = 1

Definition at line 162 of file dummy.py.

00162 
00163     def modified( self ):
00164         return self._safe_get('modified_date')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 134 of file dummy.py.

00134 
00135     def reset( self ):
00136         self.after_add_called = self.before_delete_called = 0

Here is the caller graph for this function:

Definition at line 153 of file dummy.py.

00153 
00154     def Subject( self ):
00155         return self._safe_get('subject')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 147 of file dummy.py.

00147 
00148     def Title( self ):
00149         return self.title

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 165 of file dummy.py.

00165 
00166     def Type( self ):
00167         return 'Dummy Content Title'

Here is the caller graph for this function:


Member Data Documentation

Definition at line 116 of file dummy.py.

Definition at line 117 of file dummy.py.

Definition at line 112 of file dummy.py.

Definition at line 126 of file dummy.py.

Definition at line 129 of file dummy.py.

Definition at line 121 of file dummy.py.

Definition at line 115 of file dummy.py.

Definition at line 109 of file dummy.py.

string CMFCore.tests.base.dummy.DummyContent.portal_type = 'Dummy Content' [static]

Definition at line 110 of file dummy.py.

string CMFCore.tests.base.dummy.DummyContent.url = 'foo_url' [static]

Definition at line 111 of file dummy.py.

Definition at line 122 of file dummy.py.

Definition at line 123 of file dummy.py.


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