com.plumtree.xpshared.htmlconstructs
Class PTConstructType

java.lang.Object
  extended by com.plumtree.xpshared.htmlconstructs.PTConstructType
Direct Known Subclasses:
PTBannerType, PTButtonType, PTImageType

public abstract class PTConstructType
extends java.lang.Object

Author:
beng All classes representing types of constructs must extend this class.

Field Summary
static java.lang.String DO_NOT_UPDATE
          Use this as the value for those strings which should not be automatically updated by the factory.
 
Constructor Summary
PTConstructType()
           
 
Method Summary
abstract  java.lang.String GetDescription()
           
abstract  ElementName GetElementName(java.lang.String sElementNameID)
          Call this method to obtain an ElementName object indicating a specific html element found within this construct.
 HTMLElement GetHTMLElement()
          Call this method to obtain a prototype HTMLElement for this particular construct type.
abstract  XPHashtable GetImgElementNameToAltIdMap()
          Call this method to obtain a string dictionary mapping element names to img alt id's.
abstract  XPHashtable GetStringMap()
          Call this method to obtain the string dictionary for this construct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO_NOT_UPDATE

public static final java.lang.String DO_NOT_UPDATE
Use this as the value for those strings which should not be automatically updated by the factory. For example, a gadget banner's title is not a string that is extracted and localized, but rather a string that simply needs to be filled in.

See Also:
Constant Field Values
Constructor Detail

PTConstructType

public PTConstructType()
Method Detail

GetDescription

public abstract java.lang.String GetDescription()
Returns:

GetElementName

public abstract ElementName GetElementName(java.lang.String sElementNameID)
Call this method to obtain an ElementName object indicating a specific html element found within this construct.

For example, to obtain an ElementName object indicating the html element containing the wide banner's title, do the following:

myEName = PTBannerType.WIDE.GetElementName( PTBannerType.ELEMENT_NAME_ID_TITLE );

Parameters:
sElementNameID - Pass a constant indicating which ElementName you wish to obtain. Each concrete PTConstructType provides a unique set of constants for obtaining ElementName objects.
Returns:
Throws:
java.lang.Exception

GetStringMap

public abstract XPHashtable GetStringMap()
Call this method to obtain the string dictionary for this construct.

A construct's string dictionary contains, as keys, the name's of those html elements that must be updated with localized strings. The values corresponding to these keys are the id's used to obtain the corresponding localized string. For example, if a banner's string dictionary containes one pair of strings:

   "title" - "titleID"

then, the element named "title" would need to be updated with the localized string retrieved with the id "titleID".

Returns:

GetHTMLElement

public HTMLElement GetHTMLElement()
Call this method to obtain a prototype HTMLElement for this particular construct type. This prototype should neither be used, nor modified, though it may be examined or cloned.

If you wish to obtain an HTMLElement representation of this construct type that is all your own, with which you're free to do as you please, use the PTConstructFactory.GetConstruct() method.

Returns:
Throws:
java.lang.Exception

GetImgElementNameToAltIdMap

public abstract XPHashtable GetImgElementNameToAltIdMap()
Call this method to obtain a string dictionary mapping element names to img alt id's. An element name indicates the name of a particular HTMLImg element within this construct. An img alt id indicates the id that may be used to obtain an alt string.

Returns:



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.