Package muntjac :: Package data :: Module item :: Class IItem
[hide private]
[frames] | no frames]

Class IItem

source code

object --+
         |
        IItem
Known Subclasses:

Provides a mechanism for handling a set of Properties, each associated to a locally unique non-null identifier. The interface is split into subinterfaces to enable a class to implement only the functionalities it needs.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
getItemProperty(self, idd)
Gets the Property corresponding to the given Property ID stored in the IItem.
source code
 
getItemPropertyIds(self)
Gets the collection of IDs of all Properties stored in the IItem.
source code
 
addItemProperty(self, idd, prop)
Tries to add a new Property into the IItem.
source code
 
removeItemProperty(self, idd)
Removes the Property identified by ID from the IItem.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getItemProperty(self, idd)

source code 

Gets the Property corresponding to the given Property ID stored in the IItem. If the IItem does not contain the Property, None is returned.

Parameters:
  • idd - identifier of the Property to get
Returns:
the Property with the given ID or None

getItemPropertyIds(self)

source code 

Gets the collection of IDs of all Properties stored in the IItem.

Returns:
iterable containing IDs of the Properties stored the IItem

addItemProperty(self, idd, prop)

source code 

Tries to add a new Property into the IItem.

This functionality is optional.

Parameters:
  • idd - ID of the new Property
  • prop - the Property to be added and associated with the id
Returns:
True if the operation succeeded, False if not
Raises:
  • NotImplementedError - if the operation is not supported.

removeItemProperty(self, idd)

source code 

Removes the Property identified by ID from the IItem.

This functionality is optional.

Parameters:
  • idd - ID of the Property to be removed
Returns:
True if the operation succeeded False if not
Raises:
  • NotImplementedError - if the operation is not supported.