Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
CMFCore.ContentTypeRegistry.NameRegexPredicate Class Reference
Inheritance diagram for CMFCore.ContentTypeRegistry.NameRegexPredicate:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.ContentTypeRegistry.NameRegexPredicate:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getPatternStr
def edit
def __call__
def getTypeLabel

Public Attributes

 id

Static Public Attributes

 pattern = None
string PREDICATE_TYPE = 'name_regex'
tuple security = ClassSecurityInfo()
tuple predicateWidget = DTMLFile( 'patternWidget', _dtmldir )

Static Private Attributes

 __implements__ = z2IContentTypeRegistryPredicate

Detailed Description

    Predicate matching only on 'name', using regex matching
    for string patterns (other objects conforming to 'match'
    and 'pattern' can also be passed).

Definition at line 253 of file ContentTypeRegistry.py.


Constructor & Destructor Documentation

Definition at line 269 of file ContentTypeRegistry.py.

00269 
00270     def __init__( self, id ):
00271         self.id = id


Member Function Documentation

def CMFCore.ContentTypeRegistry.NameRegexPredicate.__call__ (   self,
  name,
  typ,
  body 
)
    Return true if the rule matches, else false.

Definition at line 293 of file ContentTypeRegistry.py.

00293 
00294     def __call__( self, name, typ, body ):
00295         """
00296             Return true if the rule matches, else false.
00297         """
00298         if self.pattern is None:
00299             return 0
00300 
00301         return self.pattern.match( name )

Here is the caller graph for this function:

Definition at line 282 of file ContentTypeRegistry.py.

00282 
00283     def edit( self, pattern ):
00284         if pattern == 'None':
00285             pattern = None
00286         if type( pattern ) is type( '' ):
00287             pattern = re.compile( pattern )
00288         self.pattern = pattern

Here is the caller graph for this function:

    Return a string representation of our pattern.

Definition at line 273 of file ContentTypeRegistry.py.

00273 
00274     def getPatternStr( self ):
00275         """
00276             Return a string representation of our pattern.
00277         """
00278         if self.pattern is None:
00279             return 'None'
00280         return self.pattern.pattern

    Return a human-readable label for the predicate type.

Definition at line 303 of file ContentTypeRegistry.py.

00303 
00304     def getTypeLabel( self ):
00305         """
00306             Return a human-readable label for the predicate type.
00307         """
00308         return self.PREDICATE_TYPE


Member Data Documentation

CMFCore.ContentTypeRegistry.NameRegexPredicate.__implements__ = z2IContentTypeRegistryPredicate [static, private]

Definition at line 262 of file ContentTypeRegistry.py.

Definition at line 270 of file ContentTypeRegistry.py.

Definition at line 264 of file ContentTypeRegistry.py.

Definition at line 265 of file ContentTypeRegistry.py.

tuple CMFCore.ContentTypeRegistry.NameRegexPredicate.predicateWidget = DTMLFile( 'patternWidget', _dtmldir ) [static]

Definition at line 310 of file ContentTypeRegistry.py.

tuple CMFCore.ContentTypeRegistry.NameRegexPredicate.security = ClassSecurityInfo() [static]

Definition at line 267 of file ContentTypeRegistry.py.


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