l.s.l.b.ProxiedLibraryFileAlias : class documentation

Part of lp.services.librarian.browser View In Hierarchy

Known subclasses: lp.soyuz.adapters.proxiedsourcefiles.ProxiedSourceLibraryFileAlias

A `LibraryFileAlias` decorator for use in URL generation.

The URL's output by this decorator will always point at the webapp. This
is useful when:
 - the webapp has to be contacted to get access to a file (required for
   restricted files).
 - files might change from public to private and thus not work even if the
   user has access to the once its private, unless they go via the webapp.

This should be used anywhere we are outputting URL's to LibraryFileAliases
other than directly in rendered pages. For rendered pages, using a
LibraryFileAlias directly is OK as at that point the status of the file
is known.

Overrides `ILibraryFileAlias.http_url` to always point to the webapp URL,
even when called from the webservice domain.
Method __init__ Undocumented
Method request Undocumented
Method http_url Return the webapp URL for the context LibraryFileAlias.
def __init__(self, context, parent):
Undocumented
@property
def request(self):
Undocumented
@property
def http_url(self):
Return the webapp URL for the context LibraryFileAlias.

Preserve the LibraryFileAlias.http_url behaviour for deleted files, returning None.

Mask webservice requests if it's the case, so the returned URL will be always relative to the parent webapp URL.

API Documentation for Launchpad, generated by pydoctor at 2018-12-19 00:00:19.