Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
MoinMoin.datastruct.backends.config_lazy_groups.ConfigLazyGroups Class Reference
Inheritance diagram for MoinMoin.datastruct.backends.config_lazy_groups.ConfigLazyGroups:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.datastruct.backends.config_lazy_groups.ConfigLazyGroups:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __contains__
def __iter__
def __getitem__
def is_group_name
def __repr__
def groups_with_member
def get

Public Attributes

 request
 page_group_regex

Private Member Functions

def _iter_group_members
def _group_has_member

Private Attributes

 _groups

Detailed Description

Definition at line 22 of file config_lazy_groups.py.


Constructor & Destructor Documentation

Definition at line 24 of file config_lazy_groups.py.

00024 
00025     def __init__(self, request, groups):
00026         super(ConfigLazyGroups, self).__init__(request)
00027 
00028         self._groups = groups


Member Function Documentation

Check if a group called <group_name> is available in this backend.

Reimplemented from MoinMoin.datastruct.backends.BaseGroupsBackend.

Definition at line 29 of file config_lazy_groups.py.

00029 
00030     def __contains__(self, group_name):
00031         return group_name in self._groups

Get a group by its moin group name.

Reimplemented from MoinMoin.datastruct.backends.BaseGroupsBackend.

Definition at line 35 of file config_lazy_groups.py.

00035 
00036     def __getitem__(self, group_name):
00037         return ConfigLazyGroup(self.request, group_name, self)

Here is the caller graph for this function:

Iterate over moin group names of the groups defined in this backend.

@return: moin group names

Reimplemented from MoinMoin.datastruct.backends.BaseGroupsBackend.

Definition at line 32 of file config_lazy_groups.py.

00032 
00033     def __iter__(self):
00034         return self._groups.iterkeys()

Here is the caller graph for this function:

Reimplemented in MoinMoin.datastruct.backends.composite_groups.CompositeGroups.

Definition at line 82 of file __init__.py.

00082 
00083     def __repr__(self):
00084         return "<%s groups=%s>" % (self.__class__, list(self))

def MoinMoin.datastruct.backends.config_lazy_groups.ConfigLazyGroups._group_has_member (   self,
  group_name,
  member 
) [private]

Reimplemented from MoinMoin.datastruct.backends.LazyGroupsBackend.

Definition at line 42 of file config_lazy_groups.py.

00042 
00043     def _group_has_member(self, group_name, member):
00044         return group_name in self and member in self._groups[group_name]

Reimplemented from MoinMoin.datastruct.backends.LazyGroupsBackend.

Definition at line 38 of file config_lazy_groups.py.

00038 
00039     def _iter_group_members(self, group_name):
00040         if group_name in self:
00041             return self._groups[group_name].__iter__()

Here is the call graph for this function:

def MoinMoin.datastruct.backends.BaseGroupsBackend.get (   self,
  key,
  default = None 
) [inherited]
Return the group named <key> if key is in the backend, else
default. If default is not given, it defaults to None, so that
this method never raises a GroupDoesNotExistError.

Definition at line 102 of file __init__.py.

00102 
00103     def get(self, key, default=None):
00104         """
00105         Return the group named <key> if key is in the backend, else
00106         default. If default is not given, it defaults to None, so that
00107         this method never raises a GroupDoesNotExistError.
00108         """
00109         try:
00110             return self[key]
00111         except GroupDoesNotExistError:
00112             return default
00113 

Here is the caller graph for this function:

List all group names of groups containing <member>.

@param member: member name [unicode]
@return: list of group names [unicode]

Definition at line 88 of file __init__.py.

00088 
00089     def groups_with_member(self, member):
00090         """
00091         List all group names of groups containing <member>.
00092 
00093         @param member: member name [unicode]
00094         @return: list of group names [unicode]
00095         """
00096         for group_name in self:
00097             try:
00098                 if member in self[group_name]:
00099                     yield group_name
00100             except GroupDoesNotExistError:
00101                 pass

def MoinMoin.datastruct.backends.BaseGroupsBackend.is_group_name (   self,
  member 
) [inherited]

Definition at line 59 of file __init__.py.

00059 
00060     def is_group_name(self, member):
00061         return self.page_group_regex.match(member)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 27 of file config_lazy_groups.py.

Definition at line 57 of file __init__.py.

Definition at line 56 of file __init__.py.


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