© 2001 BEA Systems, Inc.

com.bea.commerce.platform.placeholder
Interface ContentBucket

All Known Subinterfaces:
AdBucketService

public interface ContentBucket

A ContentBucket is an interface which the PlaceholderService uses to obtain content for the PlaceholderTag. A placeholder is bound to an EJB. The EJB must implement the ContentBucket interace.


Inner Class Summary
static class ContentBucket.PreviewInfo
          Struct class that captures the information from the preview
 
Method Summary
 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 specific placeholder and user.
 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 allQueries)
          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.
 

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 specific placeholder and user.
Parameters:
placeholderName - The name of the specific placeholder requesting the content
mixGlobals - Flag indicating if globals should be mixed
userinfo - An Object which represents the user
servletBase - the Web App root for the Click thru servlet
request - the HTTP request
height - A requested height for the content
width - A requested width for the content
Returns:
an XML string representing the content.
Throws:
Content - thrown when there was a failure to get the content

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.
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.
Parameters:
placeholderName - the name of the placeholder setting the global query
query - The query expression of the query.
weight - the weight associated with the content

removeGlobalQueries

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

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved