org.sakaiproject.util.courier
Class BaseDelivery

java.lang.Object
  extended byorg.sakaiproject.util.courier.BaseDelivery
All Implemented Interfaces:
Delivery
Direct Known Subclasses:
ChatDelivery, DirectRefreshDelivery

public class BaseDelivery
extends Object
implements Delivery

BaseDelivery is a base class for all Delivery objects.

Version:
$Revision: 632 $
Author:
University of Michigan, Sakai Software Development Team

Field Summary
protected  String m_address
          The address.
protected  String m_elementId
          The elementId.
 
Constructor Summary
BaseDelivery(String address, String elementId)
          Construct.
 
Method Summary
 void act()
          Perform any pre-delivery actions.
 String compose()
          Compose a javascript message for delivery to the browser client window.
 boolean equals(Object obj)
          Are these the same?
 String getAddress()
          Access the delivery address.
 String getElement()
          Access the HTML Element Id that this delivery is in reference to.
 void setAddress(String address)
          Set the delivery address.
 void setElement(String id)
          Set the HTML Element Id that this delivery is in reference to.
 String toString()
          Display.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_address

protected String m_address
The address.


m_elementId

protected String m_elementId
The elementId.

Constructor Detail

BaseDelivery

public BaseDelivery(String address,
                    String elementId)
Construct.

Parameters:
address - The address.
elementId - The elementId.
Method Detail

setAddress

public void setAddress(String address)
Set the delivery address.

Specified by:
setAddress in interface Delivery
Parameters:
address - The delivery address.

getAddress

public String getAddress()
Access the delivery address.

Specified by:
getAddress in interface Delivery
Returns:
The delivery address.

setElement

public void setElement(String id)
Set the HTML Element Id that this delivery is in reference to.

Specified by:
setElement in interface Delivery
Parameters:
id - The HTML Element Id that this delivery is in reference to.

getElement

public String getElement()
Access the HTML Element Id that this delivery is in reference to.

Specified by:
getElement in interface Delivery
Returns:
The HTML Element Id that this delivery is in reference to.

act

public void act()
Perform any pre-delivery actions. Note: this is run in the same usage session as is being delivered to.

Specified by:
act in interface Delivery

compose

public String compose()
Compose a javascript message for delivery to the browser client window.

Specified by:
compose in interface Delivery
Returns:
The javascript message to send to the browser client window.

toString

public String toString()
Display.


equals

public boolean equals(Object obj)
Are these the same?

Returns:
true if obj is the same Delivery as this one.