Esempio n. 1
0
 def objectIds(self, spec=None, ordered=True):
     if self._aliasTraversal:
         try:
             aliased = self._target
         except ComponentLookupError:
             return []
         if aliased is not None:
             return aliased.objectIds(spec)
     return CMFOrderedBTreeFolderBase.objectIds(self, spec, ordered)
Esempio n. 2
0
 def objectIds(self, spec=None, ordered=True):
     # XXX : need to find better aproach
     aliased = getSite()
     aliased_objectIds = set()
     if aliased is not None:
         try:
             # spec = ['Dexterity Container',
             #         'Dexterity Item',
             #         'ATFolder',
             #         'ATDocument']
             aliased_objectIds.update(aliased.objectIds(spec))
             aliased_objectIds -= BLACK_LIST_IDS
         except AttributeError:
             pass
     own_elements = CMFOrderedBTreeFolderBase.objectIds(self, spec, False)
     return [item for item in own_elements] + list(aliased_objectIds)
Esempio n. 3
0
    def objectIds(self, spec=None, ordered=True):
        aliased = getSite()
        # XXX : need to find better aproach

        try:
            if aliased is not None:
                to_remove = []
                # spec = ['Dexterity Container', 'Dexterity Item', 'ATFolder', 'ATDocument']
                aliased_objectIds = list(aliased.objectIds(spec))
                for id in aliased_objectIds:
                    if id in _languagelist or id in _combinedlanguagelist:
                        aliased_objectIds.remove(id)
            else:
                aliased_objectIds = []

        except AttributeError:
            aliased_objectIds = []

        own_elements = CMFOrderedBTreeFolderBase.objectIds(self, spec, False)
        return [item for item in own_elements] + aliased_objectIds
Esempio n. 4
0
 def _checkId(self, id, allow_dup=0):
     """ check only locally """
     if not allow_dup and id in CMFOrderedBTreeFolderBase.objectIds(self, None, False):
         raise BadRequestException('The id "%s" is invalid--'
                                   'it is already in use.' % id)
Esempio n. 5
0
 def objectIds(self, spec=None, ordered=True):
     if self._aliasTraversal:
         aliased = self._target
         if aliased is not None:
             return aliased.objectIds(spec)
     return CMFOrderedBTreeFolderBase.objectIds(self, spec, ordered)
 def objectIds(self, spec=None, ordered=True):
     if self._aliasTraversal:
         aliased = self._target
         if aliased is not None:
             return aliased.objectIds(spec)
     return CMFOrderedBTreeFolderBase.objectIds(self, spec, ordered)
Esempio n. 7
0
 def objectIds(self, spec=None, ordered=True):
     link = self._link
     if link is not None:
         return link.objectIds(spec)
     return CMFOrderedBTreeFolderBase.objectIds(self, spec, ordered)