|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AdBeanInterface
This is the interface of all AdBean advertising beans. Beans to support advertising in the body of a page are put in the classpath and loaded by name, and must implement this interface.
An AdBean can produce several sorts of output, the usual one being some well-behaved HTML to insert into a page as a banner or elsewhere.
AdBean entities should be completely thread-safe and should probably not carry significant state from call to call.
AdBean items can signal their affinity to certain Gallery topic areas or keywords or even exhibit prefixes and may be used preferentially around such exhibits.
When asked to produce output, this is passed a random-number source to help generate its output. A bean should assume that the source is a shared resource (eg that is should not be locked for long periods) and that it may be expensive to use and so using it sparingly is a good thing.
Many of the routines take an immutable Context argument, which details which Gallery section and/or exhibit is featured near the ad insert, if appropriate, and what is the preferred user locale.
This interface and its subcomponents must not depend on any PG2K types/classes, because it must be possible to take this file/class on its own and compile against it.
| Nested Class Summary | |
|---|---|
static class |
AdBeanInterface.Context
Details context in which advertisement is to be shown. |
| Method Summary | |
|---|---|
boolean |
canMakeHTMLBodyInsert(AdBeanInterface.Context ctxt)
Can make an HTML body-text insert in the given context. |
java.lang.String |
getHTMLBodyInsert(AdBeanInterface.Context ctxt,
java.util.Random source)
Make HTML body text in the given context, or null if none can be made. |
AdBeanInterface |
setParams(java.lang.String rawParams)
Can be used to set general parameters for the bean, or can be null. |
| Method Detail |
|---|
AdBeanInterface setParams(java.lang.String rawParams)
boolean canMakeHTMLBodyInsert(AdBeanInterface.Context ctxt)
java.lang.String getHTMLBodyInsert(AdBeanInterface.Context ctxt,
java.util.Random source)
Returns the empty string if not possible.
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||