CVS: TapestryBook/bannerads/src/bannerads/components BannerAd.jwc,NONE,1.1 BannerAds.library,NONE,1.1 BannerService.java,1.1,1.2 BannerAd.java,1.1,1.2

Howard Lewis Ship <[email protected]> Sun, 25 May 2003 14:28:04 -0700
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/TapestryBook/bannerads/src/bannerads/components
In directory sc8-pr-cvs1:/tmp/cvs-serv25806/bannerads/src/bannerads/components

Modified Files:
	BannerService.java BannerAd.java 
Added Files:
	BannerAd.jwc BannerAds.library 
Log Message:
Update docs based on lengthy revisions.

--- NEW FILE: BannerAd.jwc ---
<?xml version="1.0"?>
<!-- $Id: BannerAd.jwc,v 1.1 2003/05/25 21:28:02 hship Exp $ -->
<!DOCTYPE component-specification PUBLIC 
	"-//Apache Software Foundation//Tapestry Specification 1.4//EN" 
	"http://jakarta.apache.org/tapestry/dtd/Tapestry_1_4.dtd">
	     	
<component-specification class="bannerads.components.BannerAd"
	allow-body="no"
	allow-informal-parameters="yes">
	
	<reserved-parameter name="href"/>
	
</component-specification>

--- NEW FILE: BannerAds.library ---
<?xml version="1.0"?>
<!-- $Id: BannerAds.library,v 1.1 2003/05/25 21:28:02 hship Exp $ -->
<!DOCTYPE library-specification PUBLIC 
	"-//Apache Software Foundation//Tapestry Specification 1.4//EN" 
	"http://jakarta.apache.org/tapestry/dtd/Tapestry_1_4.dtd">
	     	
<library-specification>

  <service name="bannerads.banner" class="bannerads.components.BannerService"/>
	
</library-specification>

Index: BannerService.java
===================================================================
RCS file: /cvsroot/tapestry/TapestryBook/bannerads/src/bannerads/components/BannerService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BannerService.java	1 May 2003 17:39:21 -0000	1.1
--- BannerService.java	25 May 2003 21:28:02 -0000	1.2
***************
*** 21,31 ****
  
      /**
-      * Name ("<code>bannerads.banner-source</code>")
-      * of an application extension that implements
-      * {@link bannerads.IBannerSource}. 
-      */
-     public static final String BANNER_SOURCE_EXTENSION_NAME = "bannerads.banner-source";
- 
-     /**
       *  The lone parameter should be the banner id.
       */
--- 21,24 ----
***************
*** 43,47 ****
          IBannerSource source =
              (IBannerSource) engine.getSpecification().getExtension(
!                 BANNER_SOURCE_EXTENSION_NAME,
                  IBannerSource.class);
  
--- 36,40 ----
          IBannerSource source =
              (IBannerSource) engine.getSpecification().getExtension(
!                IBannerSource.BANNER_SOURCE_EXTENSION_NAME,
                  IBannerSource.class);
  

Index: BannerAd.java
===================================================================
RCS file: /cvsroot/tapestry/TapestryBook/bannerads/src/bannerads/components/BannerAd.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BannerAd.java	1 May 2003 17:39:21 -0000	1.1
--- BannerAd.java	25 May 2003 21:28:02 -0000	1.2
***************
*** 47,56 ****
          IBannerSource source =
              (IBannerSource) engine.getSpecification().getExtension(
!                 BannerService.BANNER_SOURCE_EXTENSION_NAME,
                  IBannerSource.class);
  
          source.initialize(cycle);
  
!         return source.getRandomBanner();
      }
  
--- 47,60 ----
          IBannerSource source =
              (IBannerSource) engine.getSpecification().getExtension(
!                 IBannerSource.BANNER_SOURCE_EXTENSION_NAME,
                  IBannerSource.class);
  
          source.initialize(cycle);
  
!         IBanner result = source.getRandomBanner();
! 
!         source.recordImpression(result.getId());
! 
!         return result;
      }
  



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge