Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
PlonePAS.plugins.autogroup.AutoGroup Class Reference
Inheritance diagram for PlonePAS.plugins.autogroup.AutoGroup:
Inheritance graph
[legend]
Collaboration diagram for PlonePAS.plugins.autogroup.AutoGroup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def enumerateGroups
def getGroupsForPrincipal
def getGroupById
def getGroups
def getGroupIds
def getGroupMembers

Public Attributes

 title
 group
 description

Static Public Attributes

string meta_type = "Automatic Group Plugin"

Static Private Attributes

tuple _properties

Detailed Description

Definition at line 60 of file autogroup.py.


Constructor & Destructor Documentation

def PlonePAS.plugins.autogroup.AutoGroup.__init__ (   self,
  id,
  title = '',
  group = None,
  description = '' 
)

Definition at line 82 of file autogroup.py.

00082 
00083     def __init__(self, id, title='', group=None, description=''):
00084         self._setId(id)
00085         self.title = title
00086         self.group = group
00087         self.description = description

Here is the call graph for this function:


Member Function Documentation

def PlonePAS.plugins.autogroup.AutoGroup.enumerateGroups (   self,
  id = None,
  exact_match = False,
  sort_by = None,
  max_results = None,
  kw 
)

Definition at line 89 of file autogroup.py.

00089 
00090     def enumerateGroups(self, id=None, exact_match=False, sort_by=None, max_results=None, **kw):
00091         if kw:
00092             return []
00093 
00094         if id:
00095             id = id.lower()
00096             mygroup = self.group.lower()
00097 
00098             if exact_match and id!=mygroup:
00099                 return []
00100 
00101             if not exact_match and id not in mygroup:
00102                 return []
00103 
00104         return [ { 'id' : self.group,
00105                    'groupid' : self.group,
00106                    'title' : self.description,
00107                    'pluginid' : self.getId(),
00108                } ]
00109 

def PlonePAS.plugins.autogroup.AutoGroup.getGroupById (   self,
  group_id 
)

Definition at line 116 of file autogroup.py.

00116 
00117     def getGroupById(self, group_id):
00118         if group_id != self.group:
00119             return None
00120 
00121         return VirtualGroup(self.group, self.description)
00122 

Here is the caller graph for this function:

Definition at line 127 of file autogroup.py.

00127 
00128     def getGroupIds(self):
00129         return [ self.group ]
00130 

Here is the caller graph for this function:

Definition at line 131 of file autogroup.py.

00131 
00132     def getGroupMembers(self, group_id):
00133         return ()
00134 
00135 classImplements(AutoGroup, IGroupEnumerationPlugin, IGroupsPlugin, IGroupIntrospection)
00136 InitializeClass(AutoGroup)
00137 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 123 of file autogroup.py.

00123 
00124     def getGroups(self):
00125         return [self.getGroupById(id) for id in self.getGroupIds()]
00126 

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.autogroup.AutoGroup.getGroupsForPrincipal (   self,
  principal,
  request = None 
)

Definition at line 111 of file autogroup.py.

00111 
00112     def getGroupsForPrincipal(self, principal, request=None):
00113         return (self.group,)
00114 

Here is the caller graph for this function:


Member Data Documentation

Initial value:
(
            { 'id'      : 'title',
              'label'   : 'Title',
              'type'    : 'string',
              'mode'    : 'w',
            },
            { 'id'      : 'group',
              'label'   : 'Group',
              'type'    : 'string',
              'mode'    : 'w',
            },
            { 'id'      : 'description',
              'label'   : 'Description',
              'type'    : 'string',
              'mode'    : 'w',
            },
            )

Definition at line 63 of file autogroup.py.

Definition at line 86 of file autogroup.py.

Definition at line 85 of file autogroup.py.

string PlonePAS.plugins.autogroup.AutoGroup.meta_type = "Automatic Group Plugin" [static]

Definition at line 61 of file autogroup.py.

Definition at line 84 of file autogroup.py.


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