Chapter 10. Package com.itmill.toolkit.data

Table of Contents

Package Specification
Validation
Interface Buffered
Synopsis
commit()
discard()
isModified()
isReadThrough()
isWriteThrough()
setReadThrough(boolean)
setWriteThrough(boolean)
Exception Buffered.SourceException
Synopsis
Buffered.SourceException(Buffered)
Buffered.SourceException(Buffered, Throwable)
Buffered.SourceException(Buffered, Throwable[])
addListener(Paintable.RepaintRequestListener)
getCause()
getCauses()
getErrorLevel()
getSource()
removeListener(Paintable.RepaintRequestListener)
requestRepaint()
Interface BufferedValidatable
Synopsis
isInvalidCommitted()
setInvalidCommitted(boolean)
Interface Container
Synopsis
addContainerProperty(Object, Class, Object)
addItem()
addItem(Object)
containsId(Object)
getContainerProperty(Object, Object)
getContainerPropertyIds()
getItem(Object)
getItemIds()
getType(Object)
removeAllItems()
removeContainerProperty(Object)
removeItem(Object)
size()
Interface Container.Editor
Synopsis
Interface Container.Hierarchical
Synopsis
areChildrenAllowed(Object)
getChildren(Object)
getParent(Object)
hasChildren(Object)
isRoot(Object)
rootItemIds()
setChildrenAllowed(Object, boolean)
setParent(Object, Object)
Interface Container.Indexed
Synopsis
addItemAt(int)
addItemAt(int, Object)
getIdByIndex(int)
indexOfId(Object)
Interface Container.ItemSetChangeEvent
Synopsis
getContainer()
Interface Container.ItemSetChangeListener
Synopsis
containerItemSetChange(Container.ItemSetChangeEvent)
Interface Container.ItemSetChangeNotifier
Synopsis
addListener(Container.ItemSetChangeListener)
removeListener(Container.ItemSetChangeListener)
Interface Container.Ordered
Synopsis
addItemAfter(Object)
addItemAfter(Object, Object)
firstItemId()
isFirstId(Object)
isLastId(Object)
lastItemId()
nextItemId(Object)
prevItemId(Object)
Interface Container.PropertySetChangeEvent
Synopsis
getContainer()
Interface Container.PropertySetChangeListener
Synopsis
containerPropertySetChange(Container.PropertySetChangeEvent)
Interface Container.PropertySetChangeNotifier
Synopsis
addListener(Container.PropertySetChangeListener)
removeListener(Container.PropertySetChangeListener)
Interface Container.Sortable
Synopsis
getSortableContainerPropertyIds()
sort(Object[], boolean[])
Interface Container.Viewer
Synopsis
getContainerDataSource()
setContainerDataSource(Container)
Interface Item
Synopsis
addItemProperty(Object, Property)
getItemProperty(Object)
getItemPropertyIds()
removeItemProperty(Object)
Interface Item.Editor
Synopsis
Interface Item.PropertySetChangeEvent
Synopsis
getItem()
Interface Item.PropertySetChangeListener
Synopsis
itemPropertySetChange(Item.PropertySetChangeEvent)
Interface Item.PropertySetChangeNotifier
Synopsis
addListener(Item.PropertySetChangeListener)
removeListener(Item.PropertySetChangeListener)
Interface Item.Viewer
Synopsis
getItemDataSource()
setItemDataSource(Item)
Interface Property
Synopsis
getType()
getValue()
isReadOnly()
setReadOnly(boolean)
setValue(Object)
toString()
Exception Property.ConversionException
Synopsis
Property.ConversionException()
Property.ConversionException(String)
Property.ConversionException(Throwable)
Interface Property.Editor
Synopsis
Exception Property.ReadOnlyException
Synopsis
Property.ReadOnlyException()
Property.ReadOnlyException(String)
Interface Property.ReadOnlyStatusChangeEvent
Synopsis
getProperty()
Interface Property.ReadOnlyStatusChangeListener
Synopsis
readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent)
Interface Property.ReadOnlyStatusChangeNotifier
Synopsis
addListener(Property.ReadOnlyStatusChangeListener)
removeListener(Property.ReadOnlyStatusChangeListener)
Interface Property.ValueChangeEvent
Synopsis
getProperty()
Interface Property.ValueChangeListener
Synopsis
valueChange(Property.ValueChangeEvent)
Interface Property.ValueChangeNotifier
Synopsis
addListener(Property.ValueChangeListener)
removeListener(Property.ValueChangeListener)
Interface Property.Viewer
Synopsis
getPropertyDataSource()
setPropertyDataSource(Property)
Interface Validatable
Synopsis
addValidator(Validator)
getValidators()
isInvalidAllowed()
isValid()
removeValidator(Validator)
setInvalidAllowed(boolean)
validate()
Interface Validator
Synopsis
isValid(Object)
validate(Object)
Exception Validator.InvalidValueException
Synopsis
Validator.InvalidValueException(String)
Validator.InvalidValueException(String, Validator.InvalidValueException[])
addListener(Paintable.RepaintRequestListener)
getErrorLevel()
removeListener(Paintable.RepaintRequestListener)
requestRepaint()
Interface Validator.Suggestive
Synopsis
suggestValidValue(Object)

Provides interfaces for the data layer which contains classes for typed data values, data collections, and handlers. A Property is a simple typed data value; an Item is a collection of Properties, each corresponding to a unique identifier; a Container is a collection of identified Items with special constraints; a Buffered class is able to track its changes and to commit or discard them later.

Package Specification

The package contains a three-tiered structure for typed data objects and collections of them:

  • The simplest of these is the Property which represents a single typed data value. A Property may be read-only in which case attempts to modify its contents will throw an exception.

  • The second level of the data layer is represented by the Item which embodies a set of Properties . Each Property in an Item corresponds to a locally unique(that is, inside the Item) identifier.

  • The third level is called the Container which can be visualized as a set of Items, each corresponding to a locally unique identifier. Note that the Container imposes a few restrictions on the data stored in it, see further documentation in the class specification .

In addition to these interfaces the package contains the Buffered interface, which defines the methods to make an object buffered, that is, track the changes to an object and allow committing or discarding them at a later time.

Provides interfaces for the validation framework. The framework defines two interfaces; one for classes that need to support external validation, and another one for the validators themselves.