Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
plone.app.portlets.browser.manage.ManageDashboardPortlets Class Reference
Inheritance diagram for plone.app.portlets.browser.manage.ManageDashboardPortlets:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.browser.manage.ManageDashboardPortlets:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def category
def key
def getAssignmentMappingUrl
def getAssignmentsForManager

Private Member Functions

def _getUserId

Detailed Description

Definition at line 98 of file manage.py.


Member Function Documentation

Definition at line 127 of file manage.py.

00127 
00128     def _getUserId(self):
00129         membership = getToolByName(aq_inner(self.context), 'portal_membership', None)
00130         if membership.isAnonymousUser():
00131             raise Unauthorized, "Cannot get portlet assignments for anonymous through this view"
00132         
00133         member = membership.getAuthenticatedMember()
00134         memberId = member.getId()
00135         
00136         if memberId is None:
00137             raise KeyError, "Cannot find user id of current user" 
00138         
00139         return memberId

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 104 of file manage.py.

00104 
00105     def category(self):
00106         return USER_CATEGORY
        

Definition at line 111 of file manage.py.

00111 
00112     def getAssignmentMappingUrl(self, manager):
00113         baseUrl = str(getMultiAdapter((self.context, self.request), name='absolute_url'))
00114         userId = self._getUserId()
00115         return '%s/++dashboard++%s+%s' % (baseUrl, manager.__name__, userId)

Here is the call graph for this function:

Definition at line 116 of file manage.py.

00116 
00117     def getAssignmentsForManager(self, manager):
00118         userId = self._getUserId()
00119         column = getUtility(IPortletManager, name=manager.__name__)
00120         category = column[USER_CATEGORY]
00121         mapping = category.get(userId, None)
00122         if mapping is None:
00123             mapping = category[userId] = UserPortletAssignmentMapping(manager=manager.__name__,
00124                                                                       category=USER_CATEGORY,
00125                                                                       name=userId)
00126         return mapping.values()
    

Here is the call graph for this function:

Definition at line 108 of file manage.py.

00108 
00109     def key(self):
00110         return self._getUserId()
    

Here is the call graph for this function:

Here is the caller graph for this function:


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