com.monad.homerun.action
Class Plan

java.lang.Object
  extended by com.monad.homerun.base.DataObject
      extended by com.monad.homerun.action.Plan
All Implemented Interfaces:
java.io.Serializable

public class Plan
extends DataObject

Plan class holds a collection of bindings of actions to 'events', defined as model transitions or device changes.

See Also:
Serialized Form

Constructor Summary
Plan()
           
Plan(Plan plan)
           
Plan(java.lang.String planName)
           
Plan(java.lang.String planName, EventBinding[] bindings)
           
 
Method Summary
 void addBinding(EventBinding binding)
          Adds an event binding to the plan
 EventBinding[] getBindings()
           
 EventBinding[] getEventBindings(java.lang.String eventKey)
           
 EventBinding[] getEventBindings(java.lang.String domain, java.lang.String objectName, java.lang.String sourceName)
           
 java.util.Iterator getEventIterator()
          Return an iterator over the the event map
 int getNumBindings()
          Returns the number of bindings in this plan
 void loadBindings(EventBinding[] bindings)
           
 void mapBindings()
           
 void removeBinding(EventBinding binding)
          Removes an event binding from the plan
 
Methods inherited from class com.monad.homerun.base.DataObject
getCategory, getModificationTime, getName, getNote, setCategory, setModificationTime, setName, setNote
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plan

public Plan()

Plan

public Plan(java.lang.String planName)

Plan

public Plan(java.lang.String planName,
            EventBinding[] bindings)

Plan

public Plan(Plan plan)
Method Detail

getNumBindings

public int getNumBindings()
Returns the number of bindings in this plan

Returns:
the number of event bindings

loadBindings

public void loadBindings(EventBinding[] bindings)

addBinding

public void addBinding(EventBinding binding)
Adds an event binding to the plan

Parameters:
binding - the event binding to add

removeBinding

public void removeBinding(EventBinding binding)
Removes an event binding from the plan

Parameters:
binding - the event binding to remove

mapBindings

public void mapBindings()

getEventIterator

public java.util.Iterator getEventIterator()
Return an iterator over the the event map

Returns:
iterator - an iterator over events in the plan

getEventBindings

public EventBinding[] getEventBindings(java.lang.String domain,
                                       java.lang.String objectName,
                                       java.lang.String sourceName)

getEventBindings

public EventBinding[] getEventBindings(java.lang.String eventKey)

getBindings

public EventBinding[] getBindings()


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.