Jwma

dtw.webmail.plugin
Interface RandomAppendPlugin

All Superinterfaces:
JwmaPlugin

public interface RandomAppendPlugin
extends JwmaPlugin

Interface for a plugin that provides randomly selected quotes or nonsense, for being appended to a text message.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Field Summary
static java.lang.String TYPE_NONE
          Defines a type that will flag that a user does not want anything to be appended to his email.
 
Method Summary
 java.lang.String getRandomAppend(java.lang.String type, java.util.Locale locale)
          Returns a randomly selected quote or nonsense for being appended to a message in a given Locale.
 java.lang.String[] listAppendTypes(java.util.Locale locale)
          Returns a list of random append type identifiers this plugin can provide for a given Locale.
 boolean supportsAppendType(java.lang.String type, java.util.Locale loc)
          Tests whether this RandomAppendPlugin supports a given append type for a given Locale.
 
Methods inherited from interface dtw.webmail.plugin.JwmaPlugin
activate, deactivate
 

Field Detail

TYPE_NONE

public static final java.lang.String TYPE_NONE
Defines a type that will flag that a user does not want anything to be appended to his email.

See Also:
Constant Field Values
Method Detail

getRandomAppend

public java.lang.String getRandomAppend(java.lang.String type,
                                        java.util.Locale locale)
Returns a randomly selected quote or nonsense for being appended to a message in a given Locale.

Parameters:
type - a String representing a type what will be appended.
locale - the locale to be used for the append.
Returns:
a random String to be appended to the message.

listAppendTypes

public java.lang.String[] listAppendTypes(java.util.Locale locale)
Returns a list of random append type identifiers this plugin can provide for a given Locale.

Parameters:
locale - the Locale to be used.
Returns:
a String[] holding the type identifiers.

supportsAppendType

public boolean supportsAppendType(java.lang.String type,
                                  java.util.Locale loc)
Tests whether this RandomAppendPlugin supports a given append type for a given Locale.

Note:
If the method returns false, the setting will automatically be TYPE_NONE, which will tell the application logic, that nothing is to be appended.

Parameters:
type - a String representing an append type.
Returns:
true if the type is supported, false otherwise.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)