© 2001 BEA Systems, Inc.

com.bea.commerce.platform.ad
Interface AdBucketService

All Superinterfaces:
ContentBucket

public interface AdBucketService
extends ContentBucket

The remote bean interface for the AdBucketService. The AdBucketService implements the ContentBucket interface and provides ad content to the PlaceholderService. There are two "buckets" of ad that may be searched. Associated with each user is an AdBucket. If the ad isn't found in the users AdBucket then a global AdBucket is searched. When multiple ads are legal, the AdConflictResolver is called to select the "best" ad to be displayed.

The AdBucketService provides methods to add ads to both the user and global AdBuckets. In addition, their is a cleanup method which will remove all of the ads associated with a container.

Preview manages the life time of a query preview and allows all possible content matching the query to be rendered and returned to some type of preview object.


Inner classes inherited from class com.bea.commerce.platform.placeholder.ContentBucket
ContentBucket.PreviewInfo
 
Method Summary
 void cleanupAdBucket(java.lang.String containerUID)
          Remove the information about a container from both the user and global ad buckets.
 java.lang.String getContent(java.lang.String placeholderName, boolean mixGlobals, java.lang.String userId, java.lang.String servletBase, Request request, int height, int width)
          Return the content for the requested ad
 boolean globalAddAd(AdInfo adInfo, boolean remove)
          Add the adInfo to the global AdBucket
 java.util.Collection previewContent(java.lang.String userId, java.lang.String query)
          Return a collection of PreviewInfo structures which match all of the content for the query.
 void removeGlobalQueries(java.lang.String placeholderName, boolean removeAll)
          Remove queries from the add bucket.
 void setGlobalQuery(java.lang.String placeholderName, java.lang.String query, int weight)
          Set a global query for the placeholder.
 boolean userAddAd(AdInfo adInfo, boolean remove)
          Add the adInfo to the user's AdBucket
 

Method Detail

getContent

public java.lang.String getContent(java.lang.String placeholderName,
                                   boolean mixGlobals,
                                   java.lang.String userId,
                                   java.lang.String servletBase,
                                   Request request,
                                   int height,
                                   int width)
                            throws java.rmi.RemoteException,
                                   ContentException
Return the content for the requested ad
Specified by:
getContent in interface ContentBucket
Parameters:
placeholderName - The name of the placeholder
mixGlobals - Mix globals with bucket ads?
userId - The user id
servletBase - The Web App base for the click thru servlet
request - The HTTP request
height - The desired height
width - The desired width
Returns:
the content of an ad for the placeholder as an XHTML string.

previewContent

public java.util.Collection previewContent(java.lang.String userId,
                                           java.lang.String query)
                                    throws java.rmi.RemoteException,
                                           ContentException
Return a collection of PreviewInfo structures which match all of the content for the query.
Specified by:
previewContent in interface ContentBucket
Parameters:
userId - The userId for the preview
query - The content query to be previewed
Returns:
a collection of all of the XHTML strings representing the content that would be matched by the content query.

setGlobalQuery

public void setGlobalQuery(java.lang.String placeholderName,
                           java.lang.String query,
                           int weight)
                    throws java.rmi.RemoteException,
                           ContentException
Set a global query for the placeholder. A placeholder may have more than one global query.
Specified by:
setGlobalQuery in interface ContentBucket
Parameters:
placeholderName - the name of the placeholder setting the global query
query - The query expression of the query.
weight - The weight associated with the query

removeGlobalQueries

public void removeGlobalQueries(java.lang.String placeholderName,
                                boolean removeAll)
                         throws java.rmi.RemoteException,
                                ContentException
Remove queries from the add bucket. This will remove all or only global queries depending on the removeAll parameter.
Specified by:
removeGlobalQueries in interface ContentBucket
Parameters:
placeholderName - the name of the placeholder
removeAll - if true remove all entries for the placeholder, otherwise simply remove the global entries.

userAddAd

public boolean userAddAd(AdInfo adInfo,
                         boolean remove)
                  throws java.rmi.RemoteException,
                         ContentException
Add the adInfo to the user's AdBucket
Parameters:
adInfo - the ad related information
Returns:
true if the Ad is added, false otherwise
Throws:
Content - when the content cannot be created

globalAddAd

public boolean globalAddAd(AdInfo adInfo,
                           boolean remove)
                    throws java.rmi.RemoteException,
                           ContentException
Add the adInfo to the global AdBucket
Parameters:
adInfo - the ad related information
Returns:
true if the Ad is added, false otherwise
Throws:
Content - when the content cannot be created

cleanupAdBucket

public void cleanupAdBucket(java.lang.String containerUID)
                     throws java.rmi.RemoteException,
                            ContentException
Remove the information about a container from both the user and global ad buckets.
Parameters:
containerUID - The name of the container that we are cleaning up

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved