Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
CMFCore.ContentTypeRegistry.MimeTypeRegexPredicate Class Reference
Inheritance diagram for CMFCore.ContentTypeRegistry.MimeTypeRegexPredicate:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.ContentTypeRegistry.MimeTypeRegexPredicate:
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 = 'mimetype_regex'
tuple security = ClassSecurityInfo()
tuple predicateWidget = DTMLFile( 'patternWidget', _dtmldir )

Static Private Attributes

 __implements__ = z2IContentTypeRegistryPredicate

Detailed Description

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

Definition at line 194 of file ContentTypeRegistry.py.


Constructor & Destructor Documentation

Definition at line 210 of file ContentTypeRegistry.py.

00210 
00211     def __init__( self, id ):
00212         self.id = id


Member Function Documentation

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

Definition at line 231 of file ContentTypeRegistry.py.

00231 
00232     def __call__( self, name, typ, body ):
00233         """
00234             Return true if the rule matches, else false.
00235         """
00236         if self.pattern is None:
00237             return 0
00238 
00239         return self.pattern.match( typ )

Here is the caller graph for this function:

Definition at line 220 of file ContentTypeRegistry.py.

00220 
00221     def edit( self, pattern ):
00222         if pattern == 'None':
00223             pattern = None
00224         if type( pattern ) is type( '' ):
00225             pattern = re.compile( pattern )
00226         self.pattern = pattern

Here is the caller graph for this function:

Definition at line 214 of file ContentTypeRegistry.py.

00214 
00215     def getPatternStr( self ):
00216         if self.pattern is None:
00217             return 'None'
00218         return self.pattern.pattern

    Return a human-readable label for the predicate type.

Definition at line 241 of file ContentTypeRegistry.py.

00241 
00242     def getTypeLabel( self ):
00243         """
00244             Return a human-readable label for the predicate type.
00245         """
00246         return self.PREDICATE_TYPE


Member Data Documentation

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

Definition at line 203 of file ContentTypeRegistry.py.

Definition at line 211 of file ContentTypeRegistry.py.

Definition at line 205 of file ContentTypeRegistry.py.

Definition at line 206 of file ContentTypeRegistry.py.

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

Definition at line 248 of file ContentTypeRegistry.py.

Definition at line 208 of file ContentTypeRegistry.py.


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