Example #1
0
 def getArrowCategoryDict(self, context=None, **kw):
   result = {}
   dynamic_category_list = self._getDynamicCategoryList(context)
   for base_category in self.getSourceArrowBaseCategoryList() +\
           self.getDestinationArrowBaseCategoryList():
     category_url_list = Path._getAcquiredCategoryMembershipList(
       self, base_category, **kw)
     if len(category_url_list) == 0 and context is not None:
       category_url_list = self._filterCategoryList(dynamic_category_list,
                                                    base_category, **kw)
     if len(category_url_list) > 0:
       result[base_category] = category_url_list
   return result
Example #2
0
 def _getAcquiredCategoryMembershipList(self, category, **kw):
   """
     Overridden in order to take into account dynamic arrow categories in case if no static
     categories are set on Business Path
   """
   context = kw.pop('context', None)
   result = Path._getAcquiredCategoryMembershipList(self, category, **kw)
   if len(result) > 0:
     return result
   if context is not None:
     dynamic_category_list = self._getDynamicCategoryList(context)
     dynamic_category_list = self._filterCategoryList(dynamic_category_list, category, **kw)
     result = dynamic_category_list
   return result