# Path: cms/orderutil.py
# def reorder_ids_by_delta(all_ids, ids_to_reorder, delta):
# def reorder_ids_up(all_ids, ids_to_reorder, delta=1):
# def reorder_ids_down(all_ids, ids_to_reorder, delta=1):
# def reorder_ids_to_top(all_ids, ids_to_reorder):
# def reorder_ids_to_bottom(all_ids, ids_to_reorder):
# 
# Path: cms/exceptions.py
# class NonOrderedFolderException(Exception):
#     """ Raised by some Folder methods when an attempt is made to call some method that depends
#     on ordering, but the given folder is unordered.
#     """
#     def __init__(self):
#         Exception.__init__(self, "This folder doesn't support ordering.")
# 
# class Veto(Exception):
#     """ May be raised when an attempt is made to do something that the CMS doesn't allow,
#     such as adding an object to a folder with a name that's already in use.
#     Higher level code (such as views) may want to catch these Veto exceptions
#     and present them to end users in a friendly manner.
#     """
#     def __init__(self, msg):
#         Exception.__init__(self, msg)


from content import Content
from collection import Collection
from pyramid import security
from cms import orderutil
from cms.exceptions import NonOrderedFolderException, Veto
import colander, deform
import widgets
        if getattr(self.request, '_filter_unauth_traversal', False) and not security.authenticated_userid(self.request):
            child = self.get_viewable_child(name)
        else:
            child = self.get_child(name)
        if child is None:
            raise KeyError
        return child

    def get_viewable_children_and_total(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children_and_total(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_children(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_child_names_and_total(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_child_names_and_total(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_child_names(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_child_names(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_children_lazily(self, spec=None, sort=None):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children_lazily(self, spec=spec, sort=sort)

    def get_ordered_children(self):
        names = self.get_ordered_names()

# Path: cms/orderutil.py
# def reorder_ids_by_delta(all_ids, ids_to_reorder, delta):
# def reorder_ids_up(all_ids, ids_to_reorder, delta=1):
# def reorder_ids_down(all_ids, ids_to_reorder, delta=1):
# def reorder_ids_to_top(all_ids, ids_to_reorder):
# def reorder_ids_to_bottom(all_ids, ids_to_reorder):
# 
# Path: cms/exceptions.py
# class NonOrderedFolderException(Exception):
#     """ Raised by some Folder methods when an attempt is made to call some method that depends
#     on ordering, but the given folder is unordered.
#     """
#     def __init__(self):
#         Exception.__init__(self, "This folder doesn't support ordering.")
# 
# class Veto(Exception):
#     """ May be raised when an attempt is made to do something that the CMS doesn't allow,
#     such as adding an object to a folder with a name that's already in use.
#     Higher level code (such as views) may want to catch these Veto exceptions
#     and present them to end users in a friendly manner.
#     """
#     def __init__(self, msg):
#         Exception.__init__(self, msg)


# Path: cms/resources/folder.py
from content import Content
from collection import Collection
from pyramid import security
from cms import orderutil
from cms.exceptions import NonOrderedFolderException, Veto
import colander, deform
import widgets

        if getattr(self.request, '_filter_unauth_traversal', False) and not security.authenticated_userid(self.request):
            child = self.get_viewable_child(name)
        else:
            child = self.get_child(name)
        if child is None:
            raise KeyError
        return child

    def get_viewable_children_and_total(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children_and_total(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_children(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_child_names_and_total(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_child_names_and_total(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_child_names(self, spec=None, sort=None, skip=0, limit=0):
        spec = self._add_view_to_spec(spec)
        return Collection.get_child_names(self, spec=spec, sort=sort, skip=skip, limit=limit)

    def get_viewable_children_lazily(self, spec=None, sort=None):
        spec = self._add_view_to_spec(spec)
        return Collection.get_children_lazily(self, spec=spec, sort=sort)

    def get_ordered_children(self):
        names = self.get_ordered_names()

        if names is None: raise NonOrderedFolderException()