com.ibm.mashups.enabler.wire
Interface WireModel

All Superinterfaces:
com.ibm.mashups.enabler.DirtyFlagProvider, ListModel, ListModelController, Locator, Model

public WireModel
extends ListModelController, com.ibm.mashups.enabler.DirtyFlagProvider

This list model controller exposes wires, which are available with the provider of the wire model. It allows to add and remove wires.

Since:
2.4

Method Summary
 Wire create(JSON context)
           Creates a wire.
 Deferred findByTargetWidget(Identifiable id)
           Returns an array of Wires with the given target widget id.
 Deferred findBySourceWidget(Identifiable id)
           Returns an array of Wires with the given source widget id.
 
Methods inherited from interface com.ibm.mashups.enabler.ListModelController
create, confirmCreate, insert, confirmInsert, remove, confirmRemove
 
Methods inherited from interface com.ibm.mashups.enabler.ListModel
iterator
 
Methods inherited from interface com.ibm.mashups.enabler.model.Model
setStrategy, getStrategies, getStrategy, addStrategy, removeStrategy
 
Methods inherited from interface com.ibm.mashups.enabler.Locator
find
 

Method Detail

create

Wire create(JSON context)
Creates a wire. Note that the wire will not appear in the model unless it is inserted using the insert method.

Parameters:
context - array of predefined information used for the creation of the wire. Must not be null. You must specify all of following:
  sourceWidgetId - com.ibm.mashups.enabler.Identifiable of source widget window; mandatory
  sourcePageId - com.ibm.mashups.enabler.Identifiable of source page; mandatory
  sourceEventId - com.ibm.mashups.enabler.Identifiable of source event; mandatory
  targetWidgetId - com.ibm.mashups.enabler.Identifiable of target widget window; mandatory
  targetPageId - com.ibm.mashups.enabler.Identifiable of target page; mandatory
  targetEventId - com.ibm.mashups.enabler.Identifiable of target event; mandatory
Returns:
the created wire, or null in case the wire cannot be created.
See Also:
WidgetWindow

findByTargetWidget

Deferred findByTargetWidget(Identifiable id)
Returns an array of Wires with the given target widget id.

Parameters:
id - identifiable or string id of the target widget; must not be null.
Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is an array of { com.ibm.mashups.enabler.wire.Wire} objects with the given target widget id. Never null, but may be empty.

findBySourceWidget

Deferred findBySourceWidget(Identifiable id)
Returns an array of Wires with the given source widget id.

Parameters:
id - identifiable or string id of the source widget; must not be null.
Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is an array of { com.ibm.mashups.enabler.wire.Wire} objects with the given source widget id. Never null, but may be empty.


Copyright IBM Corp. 2010 All Rights Reserved.