Package trac :: Module attachment :: Class AttachmentModule

Class AttachmentModule

source code

    object --+    
             |    
core.Component --+
                 |
                AttachmentModule

Nested Classes

Inherited from core.Component: __metaclass__

Instance Methods
 
get_active_navigation_item(self, req) source code
 
get_navigation_items(self, req) source code
 
match_request(self, req) source code
 
process_request(self, req) source code
 
get_wiki_syntax(self) source code
 
get_link_resolvers(self) source code
 
viewable_attachments(self, context)
Return the list of viewable attachments in the given context.
source code
 
attachment_data(self, context)
Return a data dictionary describing the list of viewable attachments in the current context.
source code
 
get_history(self, start, stop, realm)
Return an iterable of tuples describing changes to attachments on a particular object realm.
source code
 
get_timeline_events(self, req, resource_realm, start, stop)
Return an event generator suitable for ITimelineEventProvider.
source code
 
render_timeline_event(self, context, field, event) source code
 
get_search_results(self, req, resource_realm, terms)
Return a search result generator suitable for ISearchSource.
source code
 
get_resource_realms(self) source code
 
get_resource_url(self, resource, href, **kwargs)
Return an URL to the attachment itself.
source code
 
get_resource_description(self, resource, format=None, **kwargs) source code
 
resource_exists(self, resource) source code

Inherited from core.Component: __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component: implements

Class Variables
  realm = 'attachment'
  is_valid_default_handler = False
  CHUNK_SIZE = 4096
  max_size = <IntOption [attachment] 'max_size'>
  max_zip_size = <IntOption [attachment] 'max_zip_size'>
  render_unsafe_content = <BoolOption [attachment] 'render_unsaf...
Properties
  change_listeners
List of components that implement ~trac.attachment.IAttachmentChangeListener
  manipulators
List of components that implement ~trac.attachment.IAttachmentManipulator

Inherited from object: __class__

Method Details

viewable_attachments(self, context)

source code 
Return the list of viewable attachments in the given context.
Parameters:
  • context - the ~trac.mimeview.api.RenderingContext corresponding to the parent ~trac.resource.Resource for the attachments

get_history(self, start, stop, realm)

source code 

Return an iterable of tuples describing changes to attachments on a particular object realm.

The tuples are in the form (change, realm, id, filename, time, description, author). change can currently only be created.

FIXME: no iterator

get_timeline_events(self, req, resource_realm, start, stop)

source code 

Return an event generator suitable for ITimelineEventProvider.

Events are changes to attachments on resources of the given resource_realm.realm.

get_search_results(self, req, resource_realm, terms)

source code 

Return a search result generator suitable for ISearchSource.

Search results are attachments on resources of the given resource_realm.realm whose filename, description or author match the given terms.

get_resource_url(self, resource, href, **kwargs)

source code 

Return an URL to the attachment itself.

A format keyword argument equal to 'raw' will be converted to the raw-attachment prefix.


Class Variable Details

render_unsafe_content

Value:
<BoolOption [attachment] 'render_unsafe_content'>

Property Details

change_listeners

List of components that implement ~trac.attachment.IAttachmentChangeListener
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.

manipulators

List of components that implement ~trac.attachment.IAttachmentManipulator
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.