|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.converter.DefaultObjectConverter
org.norther.tammi.core.mail.DefaultInternetAddressConverter
public class DefaultInternetAddressConverter
A converter for instances representing internet email addresses according to RFC822 .
Note that XML conversion is applied so that addresses may contain < and > signs.
| Field Summary | |
|---|---|
static String |
ADDR_PATTERN
The pattern for plain address "A" specifies address being used as such and not converted to a RFC822/RFC2047 encoded mail-safe address. |
static String |
INTERNET_ADDRESS_TYPE
An internet address type. |
static String |
LOOSE_SYNTAX
The pattern for loose syntax "!" ignores the syntax of the address address formed by three parts: a name part, a domain separator @ and a domain part containing a dot. |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultInternetAddressConverter()
Constructs a new converter. |
|
| Method Summary | |
|---|---|
protected Object |
getComponentInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
Gets an instance of the named component class by converting the source object and optionally applying the specified pattern and limits. |
Object |
getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
Gets an instance of the named class by converting the source object and optionally applying the specified pattern and limits. |
boolean |
isConversionSupported(String className)
Checks whether conversion of the specified class is supported. |
protected String |
toComponentString(String className,
Object object,
String pattern)
Returns a string representation of an object of the named component class by optionally applying the specified pattern. |
String |
toString(String className,
Object object,
String pattern)
Returns a string representation of an object of the named class by optionally applying the specified pattern. |
| Methods inherited from class org.norther.tammi.core.converter.DefaultObjectConverter |
|---|
fromLocalizedObject, getFormatPattern, getInstance, getInstance, getLocalizedPattern, getResourceFinderName, postmanaged, setResourceFinderName, toLocalizedObject, toString, toString, toStrings, toStrings, toStrings, unmanaged |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String INTERNET_ADDRESS_TYPE
public static final String LOOSE_SYNTAX
Examples: name@xxxxx.yy firstname.lastname@xxxxx.yyyy.zzz
public static final String ADDR_PATTERN
Examples: Without plain address pattern an address Mika Häkkinen<mika.hakkinen@xxxxx.yy> will be converted to: "Mika Häkkinen" <mika.hakkinen@xxxxx.yy>. If the pattern is specified the same address is converted to: <mika.hakkinen@xxxxx.yy>.
| Constructor Detail |
|---|
public DefaultInternetAddressConverter()
| Method Detail |
|---|
public boolean isConversionSupported(String className)
ObjectConverter
isConversionSupported in interface ObjectConverterisConversionSupported in class DefaultObjectConverterclassName - the class name.
public Object getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
throws ConversionException
ObjectConverter
getInstance in interface ObjectConvertergetInstance in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.minValue - an optional minimum value.maxValue - an optional maximum value.
ConversionException - if conversion fails.
public String toString(String className,
Object object,
String pattern)
ObjectConverter
toString in interface ObjectConvertertoString in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.
protected Object getComponentInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
throws ConversionException
DefaultObjectConverter
getComponentInstance in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.minValue - an optional minimum value.maxValue - an optional maximum value.
ConversionException - if conversion fails.
protected String toComponentString(String className,
Object object,
String pattern)
DefaultObjectConverter
toComponentString in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||