Changeset 1574 in products
- Timestamp:
- Jan 21, 2010 12:28:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py
r1573 r1574 114 114 child.setAttribute('manager', manager_name) 115 115 child.setAttribute('category', category) 116 child.setAttribute('location', '/'.join(obj.getPhysicalPath()))117 116 118 117 status = assignable.getBlacklistStatus(category) … … 164 163 if elem.nodeName == 'assignment': 165 164 self.importAssignment(obj, elem) 166 #elif elem.nodeName == 'blacklist':167 #self.importBlacklist(obj, elem)165 elif elem.nodeName == 'blacklist': 166 self.importBlacklist(obj, elem) 168 167 169 168 yield item … … 204 203 assignment_handler = IPortletAssignmentExportImportHandler(assignment) 205 204 assignment_handler.import_assignment(portlet_interface, node) 205 206 def importBlacklist(self, obj, node): 207 """ Import a blacklist from a node 208 """ 209 manager = node.getAttribute('manager') 210 category = node.getAttribute('category') 211 status = node.getAttribute('status') 212 213 manager = getUtility(IPortletManager, name=manager) 214 215 assignable = queryMultiAdapter((obj, manager), ILocalPortletAssignmentManager) 216 217 if status.lower() == 'block': 218 assignable.setBlacklistStatus(category, True) 219 elif status.lower() == 'show': 220 assignable.setBlacklistStatus(category, False) 221 elif status.lower() == 'acquire': 222 assignable.setBlacklistStatus(category, None) 223 206 224 207 225 logger = logging.getLogger('quintagroup.transmogrifier.portletsimporter')
Note: See TracChangeset
for help on using the changeset viewer.