Package g4ds :: Module communitymanager :: Class Member
[show private | hide private]
[frames | no frames]

Class Member


Keeps data for one member.
Method Summary
  __init__(self, id, name, mdl, mdlversion, mdldate)
Initialises the member instance.
  __str__(self)
Some basic information about the object
  addAuthorityRole(self, communityid)
Adds the role of an authority to the given community.
  addCommunity(self, communityid, registerInCommunity)
Make this node member of the given community.
  addGateway(self, gateway)
Register the gateway with this member.
List of String getCommunityIds(self)
GETTER
List of CommunityGateway getGateways(self)
GETTER
String getId(self)
GETTER
String getMdl(self)
GETTER
String getMdlDate(self)
GETTER
String getMdlVersion(self)
GETTER
String getName(self)
GETTER

Instance Variable Summary
List of String _authorizedComunities: All the communities this node is an authority of
List of String _communities: IDs of all communities, this member is member of
List of CommunityGateway _gateways: All the gateways this node is serving
String _id: Inique ID for the Member
String _mdl: Member description in XML
String _mdldate: Date for the version of the XML member description
String _mdlversion: Version for the XML member description
String _name: Name for the Member

Method Details

__init__(self, id=None, name=None, mdl=None, mdlversion=None, mdldate=None)
(Constructor)

Initialises the member instance.

Parameters are assigned to local variables. If no ID is provided (or None is given) one will ge generated.
Parameters:
id - Inique ID for the Member
           (type=String)
name - Name for the Member
           (type=String)
mdl - Member description in XML
           (type=String)
mdlversion - Version for the XML member description
           (type=String)
mdldate - Date for the version of the XML member description
           (type=String)

__str__(self)
(Informal representation operator)

Some basic information about the object

addAuthorityRole(self, communityid)

Adds the role of an authority to the given community.
Parameters:
communityid - ID of the community this node shall be an authority for
           (type=String)

Note: You have to register this node as well as an authority in the community. Only this will create the relation in the database.

addCommunity(self, communityid, registerInCommunity=0)

Make this node member of the given community.
Parameters:
communityid - ID of the community to join
           (type=String)

Note: You have to add this member also to the community. Since this relation is a n:m relation, it may only be set on one side (either in member.addCommunity or in community.addMember). The community side was chosen; this way member.addCommunity does not effect the database.

addGateway(self, gateway)

Register the gateway with this member.
Parameters:
gateway - Reference to gateway instance, this node is taking care of.
           (type=CommunityGateway)

getCommunityIds(self)

GETTER
Returns:
List of IDs, this node is a member of
           (type=List of String)

getGateways(self)

GETTER
Returns:
List of all gateways this node is taking care of
           (type=List of CommunityGateway)

getId(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getMdl(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getMdlDate(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getMdlVersion(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getName(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

Instance Variable Details

_authorizedComunities

All the communities this node is an authority of
Type:
List of String

_communities

IDs of all communities, this member is member of
Type:
List of String

_gateways

All the gateways this node is serving
Type:
List of CommunityGateway

_id

Inique ID for the Member
Type:
String

_mdl

Member description in XML
Type:
String

_mdldate

Date for the version of the XML member description
Type:
String

_mdlversion

Version for the XML member description
Type:
String

_name

Name for the Member
Type:
String

Generated by Epydoc 2.0 on Sat Oct 22 22:52:47 2005 http://epydoc.sf.net