Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
MoinMoin.datastruct.backends.config_groups.ConfigGroups Class Reference
Inheritance diagram for MoinMoin.datastruct.backends.config_groups.ConfigGroups:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.datastruct.backends.config_groups.ConfigGroups:
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 _retrieve_members

Private Attributes

 _groups

Detailed Description

Definition at line 19 of file config_groups.py.


Constructor & Destructor Documentation

def MoinMoin.datastruct.backends.config_groups.ConfigGroups.__init__ (   self,
  request,
  groups 
)
@param groups: Dictionary of groups where key is group name,
and value is list of members of that group.

Definition at line 21 of file config_groups.py.

00021 
00022     def __init__(self, request, groups):
00023         """
00024         @param groups: Dictionary of groups where key is group name,
00025         and value is list of members of that group.
00026         """
00027         super(ConfigGroups, self).__init__(request)
00028 
00029         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 30 of file config_groups.py.

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

Get a group by its moin group name.

Reimplemented from MoinMoin.datastruct.backends.BaseGroupsBackend.

Definition at line 36 of file config_groups.py.

00036 
00037     def __getitem__(self, group_name):
00038         return ConfigGroup(request=self.request, name=group_name, backend=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 33 of file config_groups.py.

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

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))

Reimplemented from MoinMoin.datastruct.backends.BaseGroupsBackend.

Definition at line 39 of file config_groups.py.

00039 
00040     def _retrieve_members(self, group_name):
00041         try:
00042             return self._groups[group_name]
00043         except KeyError:
00044             raise GroupDoesNotExistError(group_name)
00045 
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 28 of file config_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: