From dfc2b65c1b6d2f938f68b7868a14d8f9a4faab9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 11 Jun 2009 03:15:15 +0000 Subject: Merge unifyroutesandtraversal branch into trunk --- repoze/bfg/interfaces.py | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 79ef25f09..b8f62c05f 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -3,13 +3,6 @@ from zope.interface import Interface from zope.component.interfaces import IObjectEvent -class IRequestFactory(Interface): - """ A utility which generates a request object """ - def __call__(): - """ Return a request factory (a callable that accepts an - environ and returns an object implementing IRequest, - e.g. ``webob.Request``)""" - class IRequest(Interface): """ Request type interface attached to all request objects """ @@ -47,7 +40,11 @@ class IView(Interface): class IRootFactory(Interface): def __call__(environ): - """ Return a root object """ + """ Return a root object based on the WSGI environ """ + +class IDefaultRootFactory(Interface): + def __call__(environ): + """ Return the *default* root object for an application """ class ITraverser(Interface): def __call__(environ): @@ -126,10 +123,6 @@ class IRouter(Interface): registry = Attribute( """Component architecture registry local to this application.""") -class IRoutesContext(Interface): - """ A context (model instance) that is created as a result of URL - dispatching""" - class INewRequest(Interface): """ An event type that is emitted whenever repoze.bfg begins to process a new request """ @@ -165,10 +158,6 @@ class ILogger(Interface): class IRoutesMapper(Interface): """ Interface representing a Routes ``Mapper`` object """ -class IContextNotFound(Interface): - """ Interface implemented by contexts generated by code which - cannot find a context during root finding or traversal """ - class IForbiddenView(Interface): """ A utility which returns an IResponse as the result of the denial of a view invocation by a security policy.""" @@ -210,10 +199,6 @@ class IContextURL(Interface): def __call__(): """ Return a URL that points to the context """ -class IRoutesContextFactory(Interface): - """ A marker interface used to look up the default routes context factory - """ - class IAuthenticationPolicy(Interface): """ An object representing a BFG authentication policy. """ def authenticated_userid(request): -- cgit v1.2.3