ploneintranet.theme package

Submodules

ploneintranet.theme.interfaces module

interface ploneintranet.theme.interfaces.IThemeSpecific

Bases: plone.theme.interfaces.IDefaultPloneLayer

Marker interface that defines a Zope 3 browser layer and a plone skin marker.

setPublication(publication)

Set the request’s publication object

traverse(obj)

Traverse from the given object to the published object

The published object is returned.

The following hook methods on the publication will be called:

  • callTraversalHooks is called before each step and after the last step.
  • traverseName to actually do a single traversal
getTraversalStack()

Return the request traversal stack

This is a sequence of steps to traverse in reverse order. They will be traversed from last to first.

get()

Query for an attribute description

locale = <zope.interface.interface.Attribute object>

Return the locale object associated with this request.

debug = <zope.interface.interface.Attribute object>

Debug flags (see IDebugFlags).

interaction = <zope.interface.interface.Attribute object>

The interaction

setTraversalStack(stack)

Change the traversal stack.

See getTraversalStack.

close()

Release resources held by the request.

hold(held)

Hold a reference to an object until the request is closed.

The object should be an IHeld. If it is an IHeld, its release method will be called when it is released.

response = <zope.interface.interface.Attribute object>

The request’s response object

Return an IPublisherResponse for the request.

setupLocale()

Setup the locale object based on languages returned by IUserPreferredLanguages adapter.

principal = <zope.interface.interface.Attribute object>

The authenticated principal

retry()

Return a retry request

Return a request suitable for repeating the publication attempt.

publication = <zope.interface.interface.Attribute object>

The request’s publication object

The publication object, an IRequestPublication provides application-specific functionality hooks.

items()

Return the items of the mapping object.

setPathSuffix(steps)

Add additional traversal steps to be taken after all other traversal

This is used to handle HTTP request methods (except for GET and POST in the case of browser requests) and XML-RPC methods.

processInputs()

Do any input processing that needs to be done before traversing

This is done after construction to allow the publisher to handle errors that arise.

annotations = <zope.interface.interface.Attribute object>

Stores arbitrary application data under package-unique keys.

By “package-unique keys”, we mean keys that are are unique by virtue of including the dotted name of a package as a prefex. A package name is used to limit the authority for picking names for a package to the people using that package.

For example, when implementing annotations for hypothetical request-persistent adapters in a hypothetical zope.persistentadapter package, the key would be (or at least begin with) the following:

"zope.persistentadapter"
environment = <zope.interface.interface.Attribute object>

Request environment data

This is a read-only mapping from variable name to value.

keys()

Return the keys of the mapping object.

values()

Return the values of the mapping object.

bodyStream = <zope.interface.interface.Attribute object>

The stream that provides the data of the request.

The data returned by the stream will not include any possible header information, which should have been stripped by the server (or previous layer) before.

Also, the body stream might already be read and not return any data. This is commonly done when retrieving the data for the body attribute.

If you access this stream directly to retrieve data, it will not be possible by other parts of the framework to access the data of the request via the body attribute.

getPositionalArguments()

Return the positional arguments given to the request.

setPrincipal(principal)

Set the principal attribute.

It should be IPrincipal wrapped in its AuthenticationService’s context.

supportsRetry()

Check whether the request supports retry

Return a boolean value indicating whether the request can be retried.

method = <zope.interface.interface.Attribute object>

Request method, normalized to upper case

ploneintranet.theme.setuphandlers module

Module contents