public class TypedNLDescription extends java.lang.Object implements Description
<!-- Various descriptions of the promotion --> <TypedNLDescription impl="com.ibm.commerce.marketing.promotion.TypedNLDescription"> <DefaultLocale>en_US</DefaultLocale> <Description locale="en_US" type="admin">A sample promotion</Description> <Description locale="en_US" type="long">A sample promotion</Description> <Description locale="en_US" type="short">A sample promotion</Description> <Description locale="en_US" type="custom1">A sample promotion</Description> <Description locale="en_US" type="custom2">A sample promotion</Description> <Description locale="en_US" type="custom3">A sample promotion</Description> <Description locale="en_US" type="custom4">A sample promotion</Description> <Description locale="en_US" type="custom5">A sample promotion</Description> </TypedNLDescription>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
Constructor and Description |
---|
TypedNLDescription()
Constructor for PromotionDescription.
|
Modifier and Type | Method and Description |
---|---|
void | addDescription(java.util.Locale locale, int type, java.lang.String description)
Adds a description with a type, locale and text.
|
static java.lang.String | formatToXMLCompatibleData(java.lang.String text)
Replaces illegal characters with entity references in XML.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.lang.String | getDefaultDescription(int type)
Returns the specified type of the description in the default locale.
|
java.util.Locale | getDefaultLocale()
Return the default locale defined in this promotion XML string.
|
java.lang.String | getDescription(java.util.Locale locale, int type)
Returns the specified type of the description in a particular locale.
|
java.util.Hashtable | getDescriptions()
Return all the descriptions defined in this promotion XML string.
|
void | removeDescription(java.util.Locale locale, int type)
Removes a description with a type and locale.
|
void | reset()
Resets the description, removes all descriptions.
|
void | setDefaultLocale(java.util.Locale aDefaultLocale)
Sets the default locale for this description object.
|
static java.util.Locale | stringToLocale(java.lang.String str)
Converts a string value to a Locale object.
|
static int | stringToType(java.lang.String str)
Converts string to integer values for description types
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public TypedNLDescription()
public java.lang.String getDescription(java.util.Locale locale, int type)
public java.lang.String getDefaultDescription(int type)
public void addDescription(java.util.Locale locale, int type, java.lang.String description)
public void removeDescription(java.util.Locale locale, int type)
public void reset()
public java.lang.String toXML() throws XMLizationException
public static int stringToType(java.lang.String str)
public static java.util.Locale stringToLocale(java.lang.String str)
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public void setDefaultLocale(java.util.Locale aDefaultLocale)
public static java.lang.String formatToXMLCompatibleData(java.lang.String text)
public java.util.Hashtable getDescriptions()
public java.util.Locale getDefaultLocale()