Package p6 :: Package metadata :: Module adapters
[show private | hide private]
[frames | no frames]

Module p6.metadata.adapters

Adapters for determining the metadata values as they apply to specific interfaces and objects.
Function Summary
sequence collectRootAppliesTo(event)
Adapts an IUpdateMetadataEvent to a particular interface, returning a list of Items which implement that interface.
sequence collectStorageAppliesTo(event)
Adapts an IUpdateMetadataEvent to a particular interface, returning a list of Storage which implement that interface.
  groupToXml(metaGroup)
Converts a Metadata Group to an XML string.
  loadMetadata(event)
Event handler for p6.metadata.events.ILoadMetadataEvent.
  updateMetadata(event)
Event handler for p6.metadata.events.IUpdateMetadataEvent.

Function Details

collectRootAppliesTo(event)

Adapts an IUpdateMetadataEvent to a particular interface, returning a list of Items which implement that interface. Used for updating metadata when we know the interface, but not instance we want to apply the value to.
Parameters:
event - the event object to handle
           (type=object implementing p6.metadata.events.IUpdateMetadataEvent)
Returns:
a list of Items which implement the interface specified by event.item
           (type=sequence)

collectStorageAppliesTo(event)

Adapts an IUpdateMetadataEvent to a particular interface, returning a list of Storage which implement that interface. Used for updating metadata when we know the interface, but not instance we want to apply the value to.
Parameters:
event - the event object to handle
           (type=object implementing p6.metadata.events.IUpdateMetadataEvent)
Returns:
a list of Storages which implement the interface specified by event.item
           (type=sequence)

groupToXml(metaGroup)

Converts a Metadata Group to an XML string.

loadMetadata(event)

Event handler for p6.metadata.events.ILoadMetadataEvent. Attempts to load the value for the field from persistant storage.
Parameters:
event - the event object to handle
           (type=object implementing p6.metadata.events.ILoadMetadataEvent)

updateMetadata(event)

Event handler for p6.metadata.events.IUpdateMetadataEvent. Attempts to adapt the event's item to IMetadataStorage and set the value. If the field is flagged for persistant storage, it's value is stored.
Parameters:
event - the event object to handle
           (type=object implementing p6.metadata.events.IUpdateMetadataEvent)

Generated by Epydoc 2.1 on Fri Jun 24 12:01:20 2005 http://epydoc.sf.net