CVS: TapestryBook/bannerads/src/bannerads IBannerSource.java,NONE,1.1 IBanner.java,NONE,1.1
Howard Lewis Ship <[email protected]> Thu, 01 May 2003 10:39:26 -0700
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/TapestryBook/bannerads/src/bannerads
In directory sc8-pr-cvs1:/tmp/cvs-serv13484/bannerads/src/bannerads
Added Files:
IBannerSource.java IBanner.java
Log Message:
Add new example for banner ads (services + components).
--- NEW FILE: IBannerSource.java ---
package bannerads;
import org.apache.tapestry.IRequestCycle;
public interface IBannerSource
{
/**
* Invoked to ensure the source is initialized.
*
*/
public void initialize(IRequestCycle cycle);
/**
* Gets a random banner instance.
*/
public IBanner getRandomBanner();
/**
* Gets a specific banner instance.
*/
public IBanner getBanner(String bannerId);
/**
* Records an impression (that is, notes that a particular
* banner was displayed on a page.
*/
public void recordImpression(String bannerId);
/**
* Records a clickthru, indicating the user clicked on
* the banner ad and was redirected to the banner site.
*/
public void recordClickthru(String bannerId);
}
--- NEW FILE: IBanner.java ---
package bannerads;
public interface IBanner
{
/**
* Returns the unique identifier for this banner ad, used to track
* impressions and click-thrus.
*/
public String getId();
/**
* Returns the URL for the banner image.
*/
public String getImageURL();
/**
* Returns the width of the image.
*/
public int getWidth();
/**
* Returns the height of the image.
*/
public int getHeight();
/**
* Returns the click-thru URL for the banner ad.
*/
public String getClickThruURL();
/**
* Returns the title (alt text) for the banner.
*
*/
public String getTitle();
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf