Back to index

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

List of all members.

Public Member Functions

def __init__
def category
def key
def getAssignmentMappingUrl
def getAssignmentsForManager
def has_legacy_portlets
def set_blacklist_status
def convert_legacy_portlets

Detailed Description

Definition at line 35 of file manage.py.


Constructor & Destructor Documentation

Definition at line 38 of file manage.py.

00038 
00039     def __init__(self, context, request):
00040         super(ManageContextualPortlets, self).__init__(context, request)
00041         self.request.set('disable_border', True)
        

Here is the caller graph for this function:


Member Function Documentation

Definition at line 45 of file manage.py.

00045 
00046     def category(self):
00047         return CONTEXT_CATEGORY
        

Definition at line 94 of file manage.py.

00094 
00095     def convert_legacy_portlets(self):
00096         utils.convert_legacy_portlets(self.context)
00097         self.context.request.response.redirect(self.context.absolute_url() + '/@@manage-portlets')

Here is the call graph for this function:

Definition at line 52 of file manage.py.

00052 
00053     def getAssignmentMappingUrl(self, manager):
00054         baseUrl = str(getMultiAdapter((self.context, self.request), name='absolute_url'))
00055         return '%s/++contextportlets++%s' % (baseUrl, manager.__name__)
    

Here is the call graph for this function:

Definition at line 56 of file manage.py.

00056 
00057     def getAssignmentsForManager(self, manager):
00058         assignments = getMultiAdapter((self.context, manager), IPortletAssignmentMapping)
00059         return assignments.values()
    

Here is the call graph for this function:

Definition at line 62 of file manage.py.

00062 
00063     def has_legacy_portlets(self):
00064         left_slots = getattr(aq_base(self.context), 'left_slots', [])
00065         right_slots = getattr(aq_base(self.context), 'right_slots', [])
00066         
00067         return (left_slots or right_slots)

Here is the call graph for this function:

Definition at line 49 of file manage.py.

00049 
00050     def key(self):
00051         return '/'.join(self.context.getPhysicalPath())
    

Here is the caller graph for this function:

def plone.app.portlets.browser.manage.ManageContextualPortlets.set_blacklist_status (   self,
  manager,
  group_status,
  content_type_status,
  context_status 
)

Definition at line 69 of file manage.py.

00069 
00070     def set_blacklist_status(self, manager, group_status, content_type_status, context_status):
00071         portletManager = getUtility(IPortletManager, name=manager)
00072         assignable = getMultiAdapter((self.context, portletManager,), ILocalPortletAssignmentManager)
00073         assignments = getMultiAdapter((self.context, portletManager), IPortletAssignmentMapping)
00074         
00075         IPortletPermissionChecker(assignments.__of__(aq_inner(self.context)))()
00076         
00077         def int2status(status):
00078             if status == 0:
00079                 return None
00080             elif status > 0:
00081                 return True
00082             else:
00083                 return False
00084         
00085         assignable.setBlacklistStatus(GROUP_CATEGORY, int2status(group_status))
00086         assignable.setBlacklistStatus(CONTENT_TYPE_CATEGORY, int2status(content_type_status))
00087         assignable.setBlacklistStatus(CONTEXT_CATEGORY, int2status(context_status))
00088         
00089         baseUrl = str(getMultiAdapter((self.context, self.request), name='absolute_url'))
00090         self.request.response.redirect(baseUrl + '/@@manage-portlets')
00091         return ''
    

Here is the call graph for this function:


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