Package g4ds :: Module g4dsconfigurationcontroller :: Class CommunityController
[show private | hide private]
[frames | no frames]

Class CommunityController


Handles controlling of communities.
Method Summary
  __init__(self)
Yet empty Constructor.
  dispatch(self, node, message, incomingmessageid)
Handles incoming messages.
  replyToRequestCommunityDescription(self, communityid, messageid)
Looks for the requested community description and replies appropriately.
  replyToRequestMemberList(self, communityid, messageid)
Looks for the members of the requested community - if available and allowed, a list of member ids is sent.
  replyToRequestMemberSubscription(self, newmemberid, communityid, messageid)
Generates the reply to requestMemberSubscription
String requestCommunityDescription(self, communityid, destinationMemberId)
Requests the community description for communityid from destinationMemberId.
String requestMemberList(self, communityid, destinationMemberId)
Requests a list of members subscriped to the community with the given community id.
  requestMemberSubscription(self, communityid, newmemberid, destinationmemberid)
Send a message to a CA in order to subscribe to a community.
String sendCommunityControllerMessage(self, destination, action, args, data, messagereference, sucess)
Any community message should be send through this interface.

Method Details

__init__(self)
(Constructor)

Yet empty Constructor.

dispatch(self, node, message, incomingmessageid)

Handles incoming messages.
Parameters:
node - Data of the message as DOM tree
           (type=xml.dom.Node)
message - XML Message in String representation
           (type=String)

replyToRequestCommunityDescription(self, communityid, messageid)

Looks for the requested community description and replies appropriately.
Parameters:
communityid - ID of the community the description was requested for
           (type=String)
messageid - ID of the incoming message
           (type=String)

replyToRequestMemberList(self, communityid, messageid)

Looks for the members of the requested community - if available and allowed, a list of member ids is sent.
Parameters:
communityid - ID of the community the member list was requested for
           (type=String)
messageid - ID of the incoming message
           (type=String)

replyToRequestMemberSubscription(self, newmemberid, communityid, messageid)

Generates the reply to requestMemberSubscription

requestCommunityDescription(self, communityid, destinationMemberId)

Requests the community description for communityid from destinationMemberId.

Note: Is does not wait for the reply. You have to register yourself with the JobScheduler in order to await the reply to the message!
Parameters:
communityid - ID of the community, the description shall be downloaded for
           (type=String)
destinationMemberId - ID of the member, the description shall be requested from
           (type=String)
Returns:
The ID of the message
           (type=String)

requestMemberList(self, communityid, destinationMemberId)

Requests a list of members subscriped to the community with the given community id.
Parameters:
communityid - ID of the community, the list of members shall be requested for
           (type=String)
destinationMemberId - ID of the member the list shall be requested from
           (type=String)
Returns:
ID of the sent message
           (type=String)

requestMemberSubscription(self, communityid, newmemberid, destinationmemberid)

Send a message to a CA in order to subscribe to a community.

sendCommunityControllerMessage(self, destination, action, args, data=None, messagereference=None, sucess='0')

Any community message should be send through this interface.
Parameters:
action - Action to perform - check constants in this module
           (type=String)
args - Arguments to pass in form of dictionary - name | value
           (type=dict)
data - Any additional data which does not fit into the args
           (type=String)
Returns:
The ID of the message
           (type=String)

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