org.opengts.db
Class BasicPrivateLabelLoader

java.lang.Object
  extended by org.opengts.db.BasicPrivateLabelLoader
Direct Known Subclasses:
PrivateLabelLoader

public class BasicPrivateLabelLoader
extends java.lang.Object


Nested Class Summary
static interface BasicPrivateLabelLoader.OutputHandler
          OutputHandler interface
 
Field Summary
protected static boolean _isTrackServlet
           
static boolean ALLOW_DOMAIN_INCLUDE
           
static boolean ALWAYS_LOAD_WAR_PRIVATELABEL
           
static java.lang.String ATTR_access
           
static java.lang.String ATTR_accountLogin
           
static java.lang.String ATTR_aclName
           
static java.lang.String ATTR_active
           
static java.lang.String ATTR_alias
           
static java.lang.String ATTR_allowLogin
           
static java.lang.String ATTR_altButton
           
static java.lang.String ATTR_altDir
           
static java.lang.String ATTR_back
           
static java.lang.String ATTR_backOffset
           
static java.lang.String ATTR_backSize
           
static java.lang.String ATTR_baseURL
           
static java.lang.String ATTR_button
           
static java.lang.String ATTR_buttonDir
           
static java.lang.String ATTR_class
           
static java.lang.String ATTR_clear
           
static java.lang.String ATTR_code
           
static java.lang.String ATTR_color
           
static java.lang.String ATTR_cssDir
           
static java.lang.String ATTR_default
           
static java.lang.String ATTR_demo
           
static java.lang.String ATTR_desc
           
static java.lang.String ATTR_description
           
static java.lang.String ATTR_dir
           
static java.lang.String ATTR_domainName
           
static java.lang.String ATTR_emailLogin
           
static java.lang.String ATTR_enabled
           
static java.lang.String ATTR_eval
           
static java.lang.String ATTR_failover
           
static java.lang.String ATTR_file
           
static java.lang.String ATTR_from
           
static java.lang.String ATTR_geocode
           
static java.lang.String ATTR_help
           
static java.lang.String ATTR_hidden
           
static java.lang.String ATTR_host
           
static java.lang.String ATTR_i18n
           
static java.lang.String ATTR_i18nPackage
           
static java.lang.String ATTR_icon
           
static java.lang.String ATTR_iconAnchor
           
static java.lang.String ATTR_iconDir
           
static java.lang.String ATTR_iconHotspot
           
static java.lang.String ATTR_iconName
           
static java.lang.String ATTR_iconOffset
           
static java.lang.String ATTR_iconSize
           
static java.lang.String ATTR_id
           
static java.lang.String ATTR_ignoreDuplicates
           
static java.lang.String ATTR_image
           
static java.lang.String ATTR_includeDefault
           
static java.lang.String ATTR_jsp
           
static java.lang.String ATTR_jspFile
           
static java.lang.String ATTR_jspName
           
static java.lang.String ATTR_key
           
static java.lang.String ATTR_keyPrefix
           
static java.lang.String ATTR_locale
           
static java.lang.String ATTR_loggedIn
           
static java.lang.String ATTR_maximum
           
static java.lang.String ATTR_menuBar
           
static java.lang.String ATTR_name
           
static java.lang.String ATTR_navigation
           
static java.lang.String ATTR_only
           
static java.lang.String ATTR_optional
           
static java.lang.String ATTR_radius
           
static java.lang.String ATTR_restricted
           
static java.lang.String ATTR_rtKey
           
static java.lang.String ATTR_rtPropPrefix
           
static java.lang.String ATTR_ruleFactoryName
           
static java.lang.String ATTR_shadow
           
static java.lang.String ATTR_shadowSize
           
static java.lang.String ATTR_showPassword
           
static java.lang.String ATTR_sort
           
static java.lang.String ATTR_sysAdminOnly
           
static java.lang.String ATTR_target
           
static java.lang.String ATTR_topMenu
           
static java.lang.String ATTR_trim
           
static java.lang.String ATTR_type
           
static java.lang.String ATTR_url
           
static java.lang.String ATTR_useAsDefault
           
static java.lang.String ATTR_userLogin
           
static java.lang.String ATTR_value
           
static java.lang.String ATTR_values
           
static java.lang.String ATTR_zoom
           
static java.lang.String CLASS_Celltrac
           
static java.lang.String CLASS_PrivateLabelLoader
           
static java.lang.String CLASS_Service
           
static java.lang.String CLASS_Track
           
static java.util.Set<I18N.Text> I18N_STRINGS
           
static java.util.Map<java.lang.String,I18N.Text> I18N_STRINGS_MAP
           
static java.lang.String PRIVATE_LABEL_XML
           
protected static BasicPrivateLabelLoader privateLabelLoader
           
static boolean SAVE_I18N_STRINGS
           
static java.lang.String TAG_Acl
           
static java.lang.String TAG_AclName
           
static java.lang.String TAG_Acls
           
static java.lang.String TAG_ActionCommand
           
static java.lang.String TAG_Alias
           
static java.lang.String TAG_BaseURL
           
static java.lang.String TAG_Body
           
static java.lang.String TAG_ButtonImage
           
static java.lang.String TAG_ButtonImageAlt
           
static java.lang.String TAG_Copyright
           
static java.lang.String TAG_DateFormat
           
static java.lang.String TAG_DefaultLoginAccount
           
static java.lang.String TAG_DefaultLoginUser
           
static java.lang.String TAG_Description
           
static java.lang.String TAG_Domain
           
static java.lang.String TAG_EMailAddress
           
static java.lang.String TAG_EMailAddresses
           
static java.lang.String TAG_EventNotificationEMail
           
static java.lang.String TAG_GeocodeProvider
           
static java.lang.String TAG_I18N
           
static java.lang.String TAG_IconImage
           
static java.lang.String TAG_IconSelector
           
static java.lang.String TAG_Include
           
static java.lang.String TAG_JSP
           
static java.lang.String TAG_JSPEntries
           
static java.lang.String TAG_Legend
           
static java.lang.String TAG_Link
           
static java.lang.String TAG_Locale
           
static java.lang.String TAG_LogMessage
           
static java.lang.String TAG_MapProvider
           
static java.lang.String TAG_MapShapes
           
static java.lang.String TAG_MenuDescription
           
static java.lang.String TAG_MenuGroup
           
static java.lang.String TAG_MenuHelp
           
static java.lang.String TAG_MobileLocationProvider
           
static java.lang.String TAG_NavigationDescription
           
static java.lang.String TAG_NavigationTab
           
static java.lang.String TAG_Options
           
static java.lang.String TAG_Page
           
static java.lang.String TAG_PageTitle
           
static java.lang.String TAG_PasswordHandler
           
static java.lang.String TAG_POI
           
static java.lang.String TAG_Points
           
static java.lang.String TAG_PointsOfInterest
           
static java.lang.String TAG_PredefinedRuleActions
           
static java.lang.String TAG_PrivateLabels
           
static java.lang.String TAG_Properties
           
static java.lang.String TAG_Property
           
static java.lang.String TAG_PropertyGroup
           
static java.lang.String TAG_Pushpin
           
static java.lang.String TAG_Pushpins
           
static java.lang.String TAG_Report
           
static java.lang.String TAG_Reports
           
static java.lang.String TAG_ReverseGeocodeProvider
           
static java.lang.String TAG_RuleAction
           
static java.lang.String TAG_Select
           
static java.lang.String TAG_Shape
           
static java.lang.String TAG_StatusCode
           
static java.lang.String TAG_StatusCodes
           
static java.lang.String TAG_String
           
static java.lang.String TAG_Subject
           
static java.lang.String TAG_SupportedLocales
           
static java.lang.String TAG_TimeFormat
           
static java.lang.String TAG_TimeZones
           
static java.lang.String TAG_Title
           
static java.lang.String TAG_WebPages
           
 
Constructor Summary
BasicPrivateLabelLoader()
          Constructor
 
Method Summary
protected  void _addPrivateLabel(java.io.File xmlFile, BasicPrivateLabel privLabel, boolean ignoreDuplicates)
          Adds a BasicPrivateLabel to the managed private label list
protected  java.lang.String _adjustPropertyKey(java.io.File xmlFile, java.lang.String key)
          Trim and remove trailing '=' from Property key
protected static BasicPrivateLabelLoader _getInstance()
          Returns a singleton instance of BasicPrivateLabelLoader
protected  java.io.File _getPrivateXMLFile()
          Gets the 'private.xml' file which will be loaded
protected static boolean _isAttributeActive(java.lang.String active, java.lang.String name)
          Returns true if active ('active' is true, or equals 'name')
protected  int _loadXML(java.io.File xmlFile, RTProperties dftProps, RTProperties ovrProps, OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap, OrderedMap<java.lang.String,java.lang.String> dftLegend, boolean ignoreDuplicates)
          Loads/Reloads the specified XML file.
protected  int _resetLoadDefaultXML()
          Loads/Reloads the 'private.xml' file
protected  int _resetLoadXML(java.io.File xmlFile)
          Loads/Reloads the specified XML file.
protected  void _setHasParsingErrors(java.io.File xmlFile)
          Called by this BasicPrivateLabelLoader instance (or subclass) if a parsing error was encountered
protected  void _setHasParsingWarnings(java.io.File xmlFile)
          Called by this BasicPrivateLabelLoader instance (or subclass) if a parsing warning was encountered
protected  I18N.Text _validateI18NText(java.io.File xmlFile, I18N.Text text)
          Validates the specified I18N.Text value
protected  BasicPrivateLabel createPrivateLabel(java.io.File xmlFile, java.lang.String hostName)
          Creates a new BasicPrivalLabel instance.
protected  BasicPrivateLabel createPrivateLabel(java.io.File xmlFile, java.lang.String className, java.lang.String hostName)
          Instanciates a BasicPrivateLabel instance from the specified class name
static BasicPrivateLabel getDefaultPrivateLabel()
          Returns the default BasicPrivateLabel instance
static java.lang.Class getInstanceClass()
          Returns the BasicPrivateLabelLoader class (may be a subclass)
static BasicPrivateLabel getPrivateLabel(java.lang.String name)
          Returns the BasicPrivateLabel instance for the specified host name
static BasicPrivateLabel getPrivateLabelForURL(java.net.URL url)
          Returns the BasicPrivateLabel instance for the specified request URL
protected  java.util.Map<java.lang.String,BasicPrivateLabel> getPrivateLabelMap()
          Gets the Map of managed BasicPrivateLabel instances
static java.util.Collection<java.lang.String> getPrivateLabelNames()
          Returns a String array of all private label keys/names
static java.util.Collection<java.lang.String> getPrivateLabelNames(boolean nameOnly)
          Returns a String array of all private label keys/names
static java.io.File getPrivateXMLFile()
          Returns the the 'private.xml' File (from which the BasicPrivateLabel will be loaded)
static BasicPrivateLabel getThreadPrivateLabel()
          Gets the current BasicPrivateLabel (or subclass) instance assigned to the current Thread
static java.lang.String getURLHostName(java.lang.String urlStr)
          Extracts and returns the host name from the specified URL
static boolean hasDefaultPrivateLabel()
          Returns true if a default PrivateLabel Domain has been defined
static boolean hasParsingErrors()
          Returns true if this BasicPrivateLabelLoader encounted errors while parsing 'private.xml'
static boolean hasParsingWarnings()
          Returns true if this BasicPrivateLabelLoader encounted warnings while parsing 'private.xml'
static boolean isTrackServlet()
           
protected  boolean isValidEMailAddress(java.lang.String emailAddr)
           
protected  boolean isValidHostname(java.lang.String host)
          Returns true if the specified host is valid
static int loadPrivateLabelXML()
          Loads the 'private.xml' file
static int loadPrivateLabelXML(java.io.File xmlFile)
          Loads the 'private.xml' file
static void main(java.lang.String[] argv)
          Debug/Testing entry point
protected static I18N.Text parseI18N(java.io.File xmlFile, java.lang.String pkgName, java.lang.String i18nKey, java.lang.String dftStr)
          Create an I18N.Text wrapper with the specified key and default text
protected static I18N.Text parseI18N(java.io.File xmlFile, java.lang.String pkgName, java.lang.String i18nKey, java.lang.String dftStr, boolean showError)
          Create an I18N.Text wrapper with the specified key and default text
protected  java.lang.String parseLegendHTML(java.lang.String refName, java.util.Locale locale, OrderedMap pushpinMap, java.lang.String legendType, org.w3c.dom.Element legendElem)
          Parse HTML Legend
protected  void parseTag_Acls(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element acls)
          Parse 'Acls' tag
protected  void parseTag_Alias(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element attrElem)
          Parse 'Alias' tag
protected  void parseTag_BaseURL(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element attrElem)
          Parse 'BaseURL' tag
protected  void parseTag_Domain(java.io.File xmlFile, java.lang.String i18nPkgName, org.w3c.dom.Element domain, RTProperties backstopProps, RTProperties overrideProps, OrderedSet<java.lang.String> timeZones, OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap, OrderedMap<java.lang.String,java.lang.String> dftLegend, boolean ignoreDuplicates)
          Parse 'Domain' tag
protected  void parseTag_EMailAddresses(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element listAttrElem)
          Parse 'EMailAddresses' tag
protected  void parseTag_EventNotificationEMail(java.io.File xmlFile, java.lang.String i18nPackage, BasicPrivateLabel pl, org.w3c.dom.Element attrElem)
          Parse 'EventNotificationEMail' tag
protected  void parseTag_GeocodeProvider(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element gpAttrElem)
          Parse 'GeocodeProvider' tag
protected  void parseTag_I18N(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element attrElem, RTProperties i18nStr)
          Parse 'I18N' tag
protected  void parseTag_JSPEntries(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element jspFiles)
          Parse 'JSPFiles' tag.
protected  void parseTag_LogMessage(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element attrElem)
          Parse 'LogMessage' tag.
protected  void parseTag_MapProvider(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element attrElem, OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap, OrderedMap<java.lang.String,java.lang.String> dftLegend)
          Parse 'MapProvider' tag.
protected  void parseTag_MapShapes(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel bpl, org.w3c.dom.Element mapShps)
          Parse 'MapShapes' tag.
protected  void parseTag_MobileLocationProvider(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element mpAttrElem)
          Parse 'MobileLocationProvider' tag
protected  void parseTag_PasswordHandler(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element phAttrElem)
          Parse 'PasswordHandler' tag
protected  void parseTag_PointsOfInterest(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel bpl, org.w3c.dom.Element pois)
          Parse 'PointsOfInterest' tag.
protected  void parseTag_PredefinedRuleActions(java.io.File xmlFile, java.lang.String i18nPackage, BasicPrivateLabel pl, org.w3c.dom.Element attrElem)
          Parse 'EventNotificationEMail' tag
protected  void parseTag_Properties(java.io.File xmlFile, RTConfig.PropertySetter ps, org.w3c.dom.Element attrElem, java.lang.String keyPrefix, java.lang.String rtPrefix, boolean defaultRTPOverride)
          Parse 'Properties' tag
protected  void parseTag_Property(java.io.File xmlFile, RTConfig.PropertySetter ps, org.w3c.dom.Element attrElem, java.lang.String prefix, java.lang.String rtPropPrefix)
          Parse 'Property' tag
protected  OrderedMap<java.lang.String,java.lang.Object> parseTAG_Pushpins(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element attrElem, OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap, boolean isGlobalPushpins)
          Parse 'PushPins' tag.
protected  void parseTag_Reports(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel bpl, org.w3c.dom.Element reports)
          Parse 'Reports' tag.
protected  void parseTag_ReverseGeocodeProvider(java.io.File xmlFile, BasicPrivateLabel pl, org.w3c.dom.Element rgpAttrElem)
          Parse 'ReverseGeocodeProvider' tag
protected  void parseTag_StatusCodes(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element listAttrElem)
          Parse 'StatusCodes' tag
protected  void parseTag_String(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element attrElem, RTProperties i18nStr)
          Parse 'String' tag
protected  OrderedMap<java.lang.String,I18N.Text> parseTag_SupportedLocales(java.io.File xmlFile, java.lang.String i18nPkgName, org.w3c.dom.Element elemNode)
          Parse 'SupportedLocales' tag
protected  OrderedSet<java.lang.String> parseTag_Timezones(org.w3c.dom.Element elemNode)
          Parse 'Timezones' tag
protected  void parseTag_WebPages(java.io.File xmlFile, java.lang.String i18nPkgName, BasicPrivateLabel pl, org.w3c.dom.Element webPages)
          Parse 'WebPages' tag.
protected static void printDebug(java.lang.String msg, java.lang.Object... args)
          Display error messages
protected static void printError(java.lang.String msg, java.lang.Object... args)
          Display error messages
protected static void printInfo(java.lang.String msg, java.lang.Object... args)
          Display error messages
protected static void printWarn(java.lang.String msg, java.lang.Object... args)
          Display error messages
static void setOutputHandler(BasicPrivateLabelLoader.OutputHandler output)
          Sets the output delegate
static void setThreadPrivateLabel(BasicPrivateLabel bpl)
          Assigns the specified BasicPrivateLabel instance to the current Thread
static void setTrackServlet_debugOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_DOMAIN_INCLUDE

public static boolean ALLOW_DOMAIN_INCLUDE

ALWAYS_LOAD_WAR_PRIVATELABEL

public static boolean ALWAYS_LOAD_WAR_PRIVATELABEL

CLASS_Track

public static final java.lang.String CLASS_Track
See Also:
Constant Field Values

CLASS_Service

public static final java.lang.String CLASS_Service
See Also:
Constant Field Values

CLASS_Celltrac

public static final java.lang.String CLASS_Celltrac
See Also:
Constant Field Values

CLASS_PrivateLabelLoader

public static final java.lang.String CLASS_PrivateLabelLoader
See Also:
Constant Field Values

PRIVATE_LABEL_XML

public static final java.lang.String PRIVATE_LABEL_XML
See Also:
Constant Field Values

TAG_LogMessage

public static final java.lang.String TAG_LogMessage
See Also:
Constant Field Values

TAG_PrivateLabels

public static final java.lang.String TAG_PrivateLabels
See Also:
Constant Field Values

TAG_SupportedLocales

public static final java.lang.String TAG_SupportedLocales
See Also:
Constant Field Values

TAG_Locale

public static final java.lang.String TAG_Locale
See Also:
Constant Field Values

TAG_TimeZones

public static final java.lang.String TAG_TimeZones
See Also:
Constant Field Values

TAG_Domain

public static final java.lang.String TAG_Domain
See Also:
Constant Field Values

TAG_Include

public static final java.lang.String TAG_Include
See Also:
Constant Field Values

TAG_BaseURL

public static final java.lang.String TAG_BaseURL
See Also:
Constant Field Values

TAG_Alias

public static final java.lang.String TAG_Alias
See Also:
Constant Field Values

TAG_DefaultLoginAccount

public static final java.lang.String TAG_DefaultLoginAccount
See Also:
Constant Field Values

TAG_DefaultLoginUser

public static final java.lang.String TAG_DefaultLoginUser
See Also:
Constant Field Values

TAG_PageTitle

public static final java.lang.String TAG_PageTitle
See Also:
Constant Field Values

TAG_Copyright

public static final java.lang.String TAG_Copyright
See Also:
Constant Field Values

TAG_DateFormat

public static final java.lang.String TAG_DateFormat
See Also:
Constant Field Values

TAG_TimeFormat

public static final java.lang.String TAG_TimeFormat
See Also:
Constant Field Values

TAG_MapProvider

public static final java.lang.String TAG_MapProvider
See Also:
Constant Field Values

TAG_Legend

public static final java.lang.String TAG_Legend
See Also:
Constant Field Values

TAG_IconSelector

public static final java.lang.String TAG_IconSelector
See Also:
Constant Field Values

TAG_PasswordHandler

public static final java.lang.String TAG_PasswordHandler
See Also:
Constant Field Values

TAG_ReverseGeocodeProvider

public static final java.lang.String TAG_ReverseGeocodeProvider
See Also:
Constant Field Values

TAG_GeocodeProvider

public static final java.lang.String TAG_GeocodeProvider
See Also:
Constant Field Values

TAG_MobileLocationProvider

public static final java.lang.String TAG_MobileLocationProvider
See Also:
Constant Field Values

TAG_I18N

public static final java.lang.String TAG_I18N
See Also:
Constant Field Values

TAG_String

public static final java.lang.String TAG_String
See Also:
Constant Field Values

TAG_Properties

public static final java.lang.String TAG_Properties
See Also:
Constant Field Values

TAG_PropertyGroup

public static final java.lang.String TAG_PropertyGroup
See Also:
Constant Field Values

TAG_Property

public static final java.lang.String TAG_Property
See Also:
Constant Field Values

TAG_Pushpins

public static final java.lang.String TAG_Pushpins
See Also:
Constant Field Values

TAG_Pushpin

public static final java.lang.String TAG_Pushpin
See Also:
Constant Field Values

TAG_EMailAddresses

public static final java.lang.String TAG_EMailAddresses
See Also:
Constant Field Values

TAG_EMailAddress

public static final java.lang.String TAG_EMailAddress
See Also:
Constant Field Values

TAG_StatusCodes

public static final java.lang.String TAG_StatusCodes
See Also:
Constant Field Values

TAG_StatusCode

public static final java.lang.String TAG_StatusCode
See Also:
Constant Field Values

TAG_Acls

public static final java.lang.String TAG_Acls
See Also:
Constant Field Values

TAG_Acl

public static final java.lang.String TAG_Acl
See Also:
Constant Field Values

TAG_JSPEntries

public static final java.lang.String TAG_JSPEntries
See Also:
Constant Field Values

TAG_JSP

public static final java.lang.String TAG_JSP
See Also:
Constant Field Values

TAG_WebPages

public static final java.lang.String TAG_WebPages
See Also:
Constant Field Values

TAG_MenuGroup

public static final java.lang.String TAG_MenuGroup
See Also:
Constant Field Values

TAG_Title

public static final java.lang.String TAG_Title
See Also:
Constant Field Values

TAG_Description

public static final java.lang.String TAG_Description
See Also:
Constant Field Values

TAG_Page

public static final java.lang.String TAG_Page
See Also:
Constant Field Values

TAG_Link

public static final java.lang.String TAG_Link
See Also:
Constant Field Values

TAG_NavigationDescription

public static final java.lang.String TAG_NavigationDescription
See Also:
Constant Field Values

TAG_NavigationTab

public static final java.lang.String TAG_NavigationTab
See Also:
Constant Field Values

TAG_MenuDescription

public static final java.lang.String TAG_MenuDescription
See Also:
Constant Field Values

TAG_MenuHelp

public static final java.lang.String TAG_MenuHelp
See Also:
Constant Field Values

TAG_IconImage

public static final java.lang.String TAG_IconImage
See Also:
Constant Field Values

TAG_ButtonImage

public static final java.lang.String TAG_ButtonImage
See Also:
Constant Field Values

TAG_ButtonImageAlt

public static final java.lang.String TAG_ButtonImageAlt
See Also:
Constant Field Values

TAG_AclName

public static final java.lang.String TAG_AclName
See Also:
Constant Field Values

TAG_Reports

public static final java.lang.String TAG_Reports
See Also:
Constant Field Values

TAG_Report

public static final java.lang.String TAG_Report
See Also:
Constant Field Values

TAG_Options

public static final java.lang.String TAG_Options
See Also:
Constant Field Values

TAG_Select

public static final java.lang.String TAG_Select
See Also:
Constant Field Values

TAG_EventNotificationEMail

public static final java.lang.String TAG_EventNotificationEMail
See Also:
Constant Field Values

TAG_Subject

public static final java.lang.String TAG_Subject
See Also:
Constant Field Values

TAG_Body

public static final java.lang.String TAG_Body
See Also:
Constant Field Values

TAG_PredefinedRuleActions

public static final java.lang.String TAG_PredefinedRuleActions
See Also:
Constant Field Values

TAG_RuleAction

public static final java.lang.String TAG_RuleAction
See Also:
Constant Field Values

TAG_ActionCommand

public static final java.lang.String TAG_ActionCommand
See Also:
Constant Field Values

TAG_PointsOfInterest

public static final java.lang.String TAG_PointsOfInterest
See Also:
Constant Field Values

TAG_POI

public static final java.lang.String TAG_POI
See Also:
Constant Field Values

TAG_MapShapes

public static final java.lang.String TAG_MapShapes
See Also:
Constant Field Values

TAG_Shape

public static final java.lang.String TAG_Shape
See Also:
Constant Field Values

TAG_Points

public static final java.lang.String TAG_Points
See Also:
Constant Field Values

ATTR_i18nPackage

public static final java.lang.String ATTR_i18nPackage
See Also:
Constant Field Values

ATTR_enabled

public static final java.lang.String ATTR_enabled
See Also:
Constant Field Values

ATTR_dir

public static final java.lang.String ATTR_dir
See Also:
Constant Field Values

ATTR_altDir

public static final java.lang.String ATTR_altDir
See Also:
Constant Field Values

ATTR_file

public static final java.lang.String ATTR_file
See Also:
Constant Field Values

ATTR_host

public static final java.lang.String ATTR_host
See Also:
Constant Field Values

ATTR_restricted

public static final java.lang.String ATTR_restricted
See Also:
Constant Field Values

ATTR_allowLogin

public static final java.lang.String ATTR_allowLogin
See Also:
Constant Field Values

ATTR_accountLogin

public static final java.lang.String ATTR_accountLogin
See Also:
Constant Field Values

ATTR_userLogin

public static final java.lang.String ATTR_userLogin
See Also:
Constant Field Values

ATTR_emailLogin

public static final java.lang.String ATTR_emailLogin
See Also:
Constant Field Values

ATTR_showPassword

public static final java.lang.String ATTR_showPassword
See Also:
Constant Field Values

ATTR_class

public static final java.lang.String ATTR_class
See Also:
Constant Field Values

ATTR_jsp

public static final java.lang.String ATTR_jsp
See Also:
Constant Field Values

ATTR_jspFile

public static final java.lang.String ATTR_jspFile
See Also:
Constant Field Values

ATTR_jspName

public static final java.lang.String ATTR_jspName
See Also:
Constant Field Values

ATTR_cssDir

public static final java.lang.String ATTR_cssDir
See Also:
Constant Field Values

ATTR_iconDir

public static final java.lang.String ATTR_iconDir
See Also:
Constant Field Values

ATTR_buttonDir

public static final java.lang.String ATTR_buttonDir
See Also:
Constant Field Values

ATTR_url

public static final java.lang.String ATTR_url
See Also:
Constant Field Values

ATTR_target

public static final java.lang.String ATTR_target
See Also:
Constant Field Values

ATTR_demo

public static final java.lang.String ATTR_demo
See Also:
Constant Field Values

ATTR_id

public static final java.lang.String ATTR_id
See Also:
Constant Field Values

ATTR_name

public static final java.lang.String ATTR_name
See Also:
Constant Field Values

ATTR_code

public static final java.lang.String ATTR_code
See Also:
Constant Field Values

ATTR_clear

public static final java.lang.String ATTR_clear
See Also:
Constant Field Values

ATTR_iconName

public static final java.lang.String ATTR_iconName
See Also:
Constant Field Values

ATTR_domainName

public static final java.lang.String ATTR_domainName
See Also:
Constant Field Values

ATTR_access

public static final java.lang.String ATTR_access
See Also:
Constant Field Values

ATTR_default

public static final java.lang.String ATTR_default
See Also:
Constant Field Values

ATTR_maximum

public static final java.lang.String ATTR_maximum
See Also:
Constant Field Values

ATTR_values

public static final java.lang.String ATTR_values
See Also:
Constant Field Values

ATTR_value

public static final java.lang.String ATTR_value
See Also:
Constant Field Values

ATTR_hidden

public static final java.lang.String ATTR_hidden
See Also:
Constant Field Values

ATTR_aclName

public static final java.lang.String ATTR_aclName
See Also:
Constant Field Values

ATTR_optional

public static final java.lang.String ATTR_optional
See Also:
Constant Field Values

ATTR_ignoreDuplicates

public static final java.lang.String ATTR_ignoreDuplicates
See Also:
Constant Field Values

ATTR_navigation

public static final java.lang.String ATTR_navigation
See Also:
Constant Field Values

ATTR_description

public static final java.lang.String ATTR_description
See Also:
Constant Field Values

ATTR_desc

public static final java.lang.String ATTR_desc
See Also:
Constant Field Values

ATTR_help

public static final java.lang.String ATTR_help
See Also:
Constant Field Values

ATTR_sort

public static final java.lang.String ATTR_sort
See Also:
Constant Field Values

ATTR_type

public static final java.lang.String ATTR_type
See Also:
Constant Field Values

ATTR_keyPrefix

public static final java.lang.String ATTR_keyPrefix
See Also:
Constant Field Values

ATTR_key

public static final java.lang.String ATTR_key
See Also:
Constant Field Values

ATTR_trim

public static final java.lang.String ATTR_trim
See Also:
Constant Field Values

ATTR_failover

public static final java.lang.String ATTR_failover
See Also:
Constant Field Values

ATTR_rtPropPrefix

public static final java.lang.String ATTR_rtPropPrefix
See Also:
Constant Field Values

ATTR_rtKey

public static final java.lang.String ATTR_rtKey
See Also:
Constant Field Values

ATTR_loggedIn

public static final java.lang.String ATTR_loggedIn
See Also:
Constant Field Values

ATTR_locale

public static final java.lang.String ATTR_locale
See Also:
Constant Field Values

ATTR_from

public static final java.lang.String ATTR_from
See Also:
Constant Field Values

ATTR_useAsDefault

public static final java.lang.String ATTR_useAsDefault
See Also:
Constant Field Values

ATTR_i18n

public static final java.lang.String ATTR_i18n
See Also:
Constant Field Values

ATTR_active

public static final java.lang.String ATTR_active
See Also:
Constant Field Values

ATTR_menuBar

public static final java.lang.String ATTR_menuBar
See Also:
Constant Field Values

ATTR_topMenu

public static final java.lang.String ATTR_topMenu
See Also:
Constant Field Values

ATTR_baseURL

public static final java.lang.String ATTR_baseURL
See Also:
Constant Field Values

ATTR_only

public static final java.lang.String ATTR_only
See Also:
Constant Field Values

ATTR_sysAdminOnly

public static final java.lang.String ATTR_sysAdminOnly
See Also:
Constant Field Values

ATTR_geocode

public static final java.lang.String ATTR_geocode
See Also:
Constant Field Values

ATTR_icon

public static final java.lang.String ATTR_icon
See Also:
Constant Field Values

ATTR_button

public static final java.lang.String ATTR_button
See Also:
Constant Field Values

ATTR_altButton

public static final java.lang.String ATTR_altButton
See Also:
Constant Field Values

ATTR_image

public static final java.lang.String ATTR_image
See Also:
Constant Field Values

ATTR_eval

public static final java.lang.String ATTR_eval
See Also:
Constant Field Values

ATTR_alias

public static final java.lang.String ATTR_alias
See Also:
Constant Field Values

ATTR_iconSize

public static final java.lang.String ATTR_iconSize
See Also:
Constant Field Values

ATTR_iconHotspot

public static final java.lang.String ATTR_iconHotspot
See Also:
Constant Field Values

ATTR_iconAnchor

public static final java.lang.String ATTR_iconAnchor
See Also:
Constant Field Values

ATTR_iconOffset

public static final java.lang.String ATTR_iconOffset
See Also:
Constant Field Values

ATTR_shadow

public static final java.lang.String ATTR_shadow
See Also:
Constant Field Values

ATTR_shadowSize

public static final java.lang.String ATTR_shadowSize
See Also:
Constant Field Values

ATTR_back

public static final java.lang.String ATTR_back
See Also:
Constant Field Values

ATTR_backSize

public static final java.lang.String ATTR_backSize
See Also:
Constant Field Values

ATTR_backOffset

public static final java.lang.String ATTR_backOffset
See Also:
Constant Field Values

ATTR_ruleFactoryName

public static final java.lang.String ATTR_ruleFactoryName
See Also:
Constant Field Values

ATTR_radius

public static final java.lang.String ATTR_radius
See Also:
Constant Field Values

ATTR_color

public static final java.lang.String ATTR_color
See Also:
Constant Field Values

ATTR_zoom

public static final java.lang.String ATTR_zoom
See Also:
Constant Field Values

ATTR_includeDefault

public static final java.lang.String ATTR_includeDefault
See Also:
Constant Field Values

_isTrackServlet

protected static boolean _isTrackServlet

privateLabelLoader

protected static BasicPrivateLabelLoader privateLabelLoader

SAVE_I18N_STRINGS

public static boolean SAVE_I18N_STRINGS

I18N_STRINGS

public static java.util.Set<I18N.Text> I18N_STRINGS

I18N_STRINGS_MAP

public static java.util.Map<java.lang.String,I18N.Text> I18N_STRINGS_MAP
Constructor Detail

BasicPrivateLabelLoader

public BasicPrivateLabelLoader()
Constructor

Method Detail

setOutputHandler

public static void setOutputHandler(BasicPrivateLabelLoader.OutputHandler output)
Sets the output delegate


printError

protected static void printError(java.lang.String msg,
                                 java.lang.Object... args)
Display error messages


printWarn

protected static void printWarn(java.lang.String msg,
                                java.lang.Object... args)
Display error messages


printInfo

protected static void printInfo(java.lang.String msg,
                                java.lang.Object... args)
Display error messages


printDebug

protected static void printDebug(java.lang.String msg,
                                 java.lang.Object... args)
Display error messages


setTrackServlet_debugOnly

public static void setTrackServlet_debugOnly()

isTrackServlet

public static boolean isTrackServlet()

_getInstance

protected static BasicPrivateLabelLoader _getInstance()
Returns a singleton instance of BasicPrivateLabelLoader

Returns:
A singleton instance of BasicPrivateLabelLoader

getInstanceClass

public static java.lang.Class getInstanceClass()
Returns the BasicPrivateLabelLoader class (may be a subclass)

Returns:
The BasicPrivateLabelLoader class (may be a subclass)

getPrivateXMLFile

public static java.io.File getPrivateXMLFile()
Returns the the 'private.xml' File (from which the BasicPrivateLabel will be loaded)

Returns:
The 'private.xml' File

loadPrivateLabelXML

public static int loadPrivateLabelXML()
Loads the 'private.xml' file

Returns:
The number of 'Domain' tags found in the 'private.xml' file

loadPrivateLabelXML

public static int loadPrivateLabelXML(java.io.File xmlFile)
Loads the 'private.xml' file

Returns:
The number of 'Domain' tags found in the 'private.xml' file

setThreadPrivateLabel

public static void setThreadPrivateLabel(BasicPrivateLabel bpl)
Assigns the specified BasicPrivateLabel instance to the current Thread

Parameters:
bpl - The BasicPrivateLabel instance to assign to the current Thread

getThreadPrivateLabel

public static BasicPrivateLabel getThreadPrivateLabel()
Gets the current BasicPrivateLabel (or subclass) instance assigned to the current Thread

Returns:
The current BasicPrivateLabel instance assigned to the current Thread

_isAttributeActive

protected static boolean _isAttributeActive(java.lang.String active,
                                            java.lang.String name)
Returns true if active ('active' is true, or equals 'name')

Parameters:
active - 'active' attribute
name - 'name' attribute
Returns:
True if active

createPrivateLabel

protected BasicPrivateLabel createPrivateLabel(java.io.File xmlFile,
                                               java.lang.String hostName)
Creates a new BasicPrivalLabel instance. Subclasses must override this method to return their own instance of the BasicPrivalLabel subclass.

Parameters:
hostName - The host name assigned to the BasicPrivateLabel instance
Returns:
The BasicPrivateLabel instance.

_getPrivateXMLFile

protected java.io.File _getPrivateXMLFile()
Gets the 'private.xml' file which will be loaded

Returns:
The 'private.xml' file to load

_resetLoadDefaultXML

protected int _resetLoadDefaultXML()
Loads/Reloads the 'private.xml' file

Returns:
The number of domains loaded

_resetLoadXML

protected int _resetLoadXML(java.io.File xmlFile)
Loads/Reloads the specified XML file.

Parameters:
xmlFile - The XML file to load
Returns:
The number of domains loaded

_loadXML

protected int _loadXML(java.io.File xmlFile,
                       RTProperties dftProps,
                       RTProperties ovrProps,
                       OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap,
                       OrderedMap<java.lang.String,java.lang.String> dftLegend,
                       boolean ignoreDuplicates)
Loads/Reloads the specified XML file. The list of domains is NOT reset.

Parameters:
xmlFile - The XML file to load
Returns:
The number of domains loaded

parseTag_SupportedLocales

protected OrderedMap<java.lang.String,I18N.Text> parseTag_SupportedLocales(java.io.File xmlFile,
                                                                           java.lang.String i18nPkgName,
                                                                           org.w3c.dom.Element elemNode)
Parse 'SupportedLocales' tag

Parameters:
elemNode - The 'SupportedLocales' parent node
Returns:
An OrderSet of parsed SupportedLocales

parseTag_Timezones

protected OrderedSet<java.lang.String> parseTag_Timezones(org.w3c.dom.Element elemNode)
Parse 'Timezones' tag

Parameters:
elemNode - The 'Timezones' parent node
Returns:
An OrderSet of parsed Timezones

parseTag_Domain

protected void parseTag_Domain(java.io.File xmlFile,
                               java.lang.String i18nPkgName,
                               org.w3c.dom.Element domain,
                               RTProperties backstopProps,
                               RTProperties overrideProps,
                               OrderedSet<java.lang.String> timeZones,
                               OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap,
                               OrderedMap<java.lang.String,java.lang.String> dftLegend,
                               boolean ignoreDuplicates)
Parse 'Domain' tag

Parameters:
i18nPkgName - The i18n resource package name for localized text
domain - The 'Domain' node
timeZones - The set of previously parse Timezones

isValidHostname

protected boolean isValidHostname(java.lang.String host)
Returns true if the specified host is valid

Parameters:
host - the host name
Returns:
True if the specified host is valid

parseTag_BaseURL

protected void parseTag_BaseURL(java.io.File xmlFile,
                                BasicPrivateLabel pl,
                                org.w3c.dom.Element attrElem)
Parse 'BaseURL' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'BaseURL' node

parseTag_Alias

protected void parseTag_Alias(java.io.File xmlFile,
                              BasicPrivateLabel pl,
                              org.w3c.dom.Element attrElem)
Parse 'Alias' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'Alias' node

parseTag_I18N

protected void parseTag_I18N(java.io.File xmlFile,
                             java.lang.String i18nPkgName,
                             BasicPrivateLabel pl,
                             org.w3c.dom.Element attrElem,
                             RTProperties i18nStr)
Parse 'I18N' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'Properties' node

parseTag_String

protected void parseTag_String(java.io.File xmlFile,
                               java.lang.String i18nPkgName,
                               BasicPrivateLabel pl,
                               org.w3c.dom.Element attrElem,
                               RTProperties i18nStr)
Parse 'String' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'Property' node

parseTag_Properties

protected void parseTag_Properties(java.io.File xmlFile,
                                   RTConfig.PropertySetter ps,
                                   org.w3c.dom.Element attrElem,
                                   java.lang.String keyPrefix,
                                   java.lang.String rtPrefix,
                                   boolean defaultRTPOverride)
Parse 'Properties' tag

Parameters:
xmlFile - The current XML file being loaded
ps - A handle to a PropertySetter instance
attrElem - The Properties tag element/node
keyPrefix - The property key prefix
rtPrefix - The RT properties key "prefix"
defaultRTPOverride - True to default allowing RTConfig property overrides

parseTag_Property

protected void parseTag_Property(java.io.File xmlFile,
                                 RTConfig.PropertySetter ps,
                                 org.w3c.dom.Element attrElem,
                                 java.lang.String prefix,
                                 java.lang.String rtPropPrefix)
Parse 'Property' tag

Parameters:
xmlFile - The currentl XML file dbeing parsed.
ps - The PropertySetter which will received the parse properties
attrElem - The 'Property' node
prefix - The property key prefix
rtPropPrefix - The key prefix used to lookup externally defined runtime values.

parseTag_EMailAddresses

protected void parseTag_EMailAddresses(java.io.File xmlFile,
                                       BasicPrivateLabel pl,
                                       org.w3c.dom.Element listAttrElem)
Parse 'EMailAddresses' tag

Parameters:
xmlFile - The current loading xml file
pl - The BasicPrivateLabel instance for the current 'Domain'
listAttrElem - The 'EMailAddresses' node

isValidEMailAddress

protected boolean isValidEMailAddress(java.lang.String emailAddr)

parseTag_StatusCodes

protected void parseTag_StatusCodes(java.io.File xmlFile,
                                    java.lang.String i18nPkgName,
                                    BasicPrivateLabel pl,
                                    org.w3c.dom.Element listAttrElem)
Parse 'StatusCodes' tag

Parameters:
xmlFile - The current loading xml file
pl - The BasicPrivateLabel instance for the current 'Domain'
listAttrElem - The 'StatusCodes' node

parseTag_PasswordHandler

protected void parseTag_PasswordHandler(java.io.File xmlFile,
                                        BasicPrivateLabel pl,
                                        org.w3c.dom.Element phAttrElem)
Parse 'PasswordHandler' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
phAttrElem - The 'PasswordHandler' node

parseTag_ReverseGeocodeProvider

protected void parseTag_ReverseGeocodeProvider(java.io.File xmlFile,
                                               BasicPrivateLabel pl,
                                               org.w3c.dom.Element rgpAttrElem)
Parse 'ReverseGeocodeProvider' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
rgpAttrElem - The 'ReverseGeocodeProvider' node

parseTag_GeocodeProvider

protected void parseTag_GeocodeProvider(java.io.File xmlFile,
                                        BasicPrivateLabel pl,
                                        org.w3c.dom.Element gpAttrElem)
Parse 'GeocodeProvider' tag

Parameters:
pl - The BasicPrivateLabel instance for the current 'Domain'
gpAttrElem - The 'GeocodeProvider' node

parseTag_MobileLocationProvider

protected void parseTag_MobileLocationProvider(java.io.File xmlFile,
                                               BasicPrivateLabel pl,
                                               org.w3c.dom.Element mpAttrElem)
Parse 'MobileLocationProvider' tag

Parameters:
xmlFile - The current XML file being processed
pl - The BasicPrivateLabel instance for the current 'Domain'
mpAttrElem - The 'MobileLocationProvider' node

parseTag_Acls

protected void parseTag_Acls(java.io.File xmlFile,
                             java.lang.String i18nPkgName,
                             BasicPrivateLabel pl,
                             org.w3c.dom.Element acls)
Parse 'Acls' tag

Parameters:
i18nPkgName - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
acls - The 'Acls' node

parseTag_EventNotificationEMail

protected void parseTag_EventNotificationEMail(java.io.File xmlFile,
                                               java.lang.String i18nPackage,
                                               BasicPrivateLabel pl,
                                               org.w3c.dom.Element attrElem)
Parse 'EventNotificationEMail' tag

Parameters:
i18nPackage - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'EventNotificationEMail' node

parseTag_PredefinedRuleActions

protected void parseTag_PredefinedRuleActions(java.io.File xmlFile,
                                              java.lang.String i18nPackage,
                                              BasicPrivateLabel pl,
                                              org.w3c.dom.Element attrElem)
Parse 'EventNotificationEMail' tag

Parameters:
i18nPackage - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'EventNotificationEMail' node

parseTAG_Pushpins

protected OrderedMap<java.lang.String,java.lang.Object> parseTAG_Pushpins(java.io.File xmlFile,
                                                                          BasicPrivateLabel pl,
                                                                          org.w3c.dom.Element attrElem,
                                                                          OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap,
                                                                          boolean isGlobalPushpins)
Parse 'PushPins' tag.

Parameters:
xmlFile - The currentl XML file being parsed
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'MapProvider' node
dftPushpinMap - The default pushpin map
Returns:
'null' (must be overridden to change behavior)

parseTag_LogMessage

protected void parseTag_LogMessage(java.io.File xmlFile,
                                   BasicPrivateLabel pl,
                                   org.w3c.dom.Element attrElem)
Parse 'LogMessage' tag.

Parameters:
xmlFile - The currentl XML file being parsed
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'MapProvider' node

parseTag_MapProvider

protected void parseTag_MapProvider(java.io.File xmlFile,
                                    java.lang.String i18nPkgName,
                                    BasicPrivateLabel pl,
                                    org.w3c.dom.Element attrElem,
                                    OrderedMap<java.lang.String,java.lang.Object> dftPushpinMap,
                                    OrderedMap<java.lang.String,java.lang.String> dftLegend)
Parse 'MapProvider' tag. This method is intended to be subclassed.

Parameters:
i18nPkgName - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
attrElem - The 'MapProvider' node

parseLegendHTML

protected java.lang.String parseLegendHTML(java.lang.String refName,
                                           java.util.Locale locale,
                                           OrderedMap pushpinMap,
                                           java.lang.String legendType,
                                           org.w3c.dom.Element legendElem)
Parse HTML Legend


parseTag_JSPEntries

protected void parseTag_JSPEntries(java.io.File xmlFile,
                                   java.lang.String i18nPkgName,
                                   BasicPrivateLabel pl,
                                   org.w3c.dom.Element jspFiles)
Parse 'JSPFiles' tag. This method is intended to be subclassed.

Parameters:
i18nPkgName - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
jspFiles - The 'JSPFiles' node

parseTag_WebPages

protected void parseTag_WebPages(java.io.File xmlFile,
                                 java.lang.String i18nPkgName,
                                 BasicPrivateLabel pl,
                                 org.w3c.dom.Element webPages)
Parse 'WebPages' tag. This method is intended to be subclassed.

Parameters:
i18nPkgName - The i18n resource package name for localized text
pl - The BasicPrivateLabel instance for the current 'Domain'
webPages - The 'WebPages' node

parseTag_Reports

protected void parseTag_Reports(java.io.File xmlFile,
                                java.lang.String i18nPkgName,
                                BasicPrivateLabel bpl,
                                org.w3c.dom.Element reports)
Parse 'Reports' tag. This method is intended to be subclassed.

Parameters:
xmlFile - The current xml file being parsed.
i18nPkgName - The i18n resource package name for localized text
bpl - The BasicPrivateLabel instance for the current 'Domain'
reports - The 'Reports' node

parseTag_PointsOfInterest

protected void parseTag_PointsOfInterest(java.io.File xmlFile,
                                         java.lang.String i18nPkgName,
                                         BasicPrivateLabel bpl,
                                         org.w3c.dom.Element pois)
Parse 'PointsOfInterest' tag. This method is intended to be subclassed.

Parameters:
xmlFile - The current xml file being parsed.
i18nPkgName - The i18n resource package name for localized text
bpl - The BasicPrivateLabel instance for the current 'Domain'
pois - The 'PointsOfInterest' node

parseTag_MapShapes

protected void parseTag_MapShapes(java.io.File xmlFile,
                                  java.lang.String i18nPkgName,
                                  BasicPrivateLabel bpl,
                                  org.w3c.dom.Element mapShps)
Parse 'MapShapes' tag. This method is intended to be subclassed.

Parameters:
xmlFile - The current xml file being parsed.
i18nPkgName - The i18n resource package name for localized text
bpl - The BasicPrivateLabel instance for the current 'Domain'
mapShps - The 'MapShapes' node

getURLHostName

public static java.lang.String getURLHostName(java.lang.String urlStr)
Extracts and returns the host name from the specified URL

Parameters:
urlStr - The URL to parse for the host name
Returns:
The parsed host name

getPrivateLabelForURL

public static BasicPrivateLabel getPrivateLabelForURL(java.net.URL url)
Returns the BasicPrivateLabel instance for the specified request URL

Parameters:
url - The request URL
Returns:
The BasicPrivateLabel instance

getPrivateLabel

public static BasicPrivateLabel getPrivateLabel(java.lang.String name)
Returns the BasicPrivateLabel instance for the specified host name

Parameters:
name - The host name
Returns:
The BasicPrivateLabel instance

getDefaultPrivateLabel

public static BasicPrivateLabel getDefaultPrivateLabel()
Returns the default BasicPrivateLabel instance

Returns:
The default BasicPrivateLabel instance

getPrivateLabelNames

public static java.util.Collection<java.lang.String> getPrivateLabelNames()
Returns a String array of all private label keys/names

Returns:
A String array of all private label keys/names

getPrivateLabelNames

public static java.util.Collection<java.lang.String> getPrivateLabelNames(boolean nameOnly)
Returns a String array of all private label keys/names

Parameters:
nameOnly - True to return a list of PrivateLabel names only (excluding hosts/aliases).
Returns:
A String array of all private label keys/names

hasParsingWarnings

public static boolean hasParsingWarnings()
Returns true if this BasicPrivateLabelLoader encounted warnings while parsing 'private.xml'

Returns:
True if warnings were encounted, false otherwise

_setHasParsingWarnings

protected void _setHasParsingWarnings(java.io.File xmlFile)
Called by this BasicPrivateLabelLoader instance (or subclass) if a parsing warning was encountered


hasParsingErrors

public static boolean hasParsingErrors()
Returns true if this BasicPrivateLabelLoader encounted errors while parsing 'private.xml'

Returns:
True if errors were encounted, false otherwise

_setHasParsingErrors

protected void _setHasParsingErrors(java.io.File xmlFile)
Called by this BasicPrivateLabelLoader instance (or subclass) if a parsing error was encountered


_validateI18NText

protected I18N.Text _validateI18NText(java.io.File xmlFile,
                                      I18N.Text text)
Validates the specified I18N.Text value

Parameters:
text - The I18N.Text value
Returns:
The specified I18N.Text value

_adjustPropertyKey

protected java.lang.String _adjustPropertyKey(java.io.File xmlFile,
                                              java.lang.String key)
Trim and remove trailing '=' from Property key

Parameters:
key - The property key
Returns:
The normalized/adjusted property key

hasDefaultPrivateLabel

public static boolean hasDefaultPrivateLabel()
Returns true if a default PrivateLabel Domain has been defined

Returns:
True if a default PrivateLabel Domain has been defined

_addPrivateLabel

protected void _addPrivateLabel(java.io.File xmlFile,
                                BasicPrivateLabel privLabel,
                                boolean ignoreDuplicates)
Adds a BasicPrivateLabel to the managed private label list

Parameters:
privLabel - The BasicPrivateLabel to add

getPrivateLabelMap

protected java.util.Map<java.lang.String,BasicPrivateLabel> getPrivateLabelMap()
Gets the Map of managed BasicPrivateLabel instances

Returns:
The Map of managed BasicPrivateLabel instances

createPrivateLabel

protected BasicPrivateLabel createPrivateLabel(java.io.File xmlFile,
                                               java.lang.String className,
                                               java.lang.String hostName)
Instanciates a BasicPrivateLabel instance from the specified class name

Parameters:
className - The class name of the BasicPrivateLabel to instantiate
hostName - The host name to assign to assign to the new BasicPrivateLabel
Returns:
The new BasicPrivateLabel instance

parseI18N

protected static I18N.Text parseI18N(java.io.File xmlFile,
                                     java.lang.String pkgName,
                                     java.lang.String i18nKey,
                                     java.lang.String dftStr)
Create an I18N.Text wrapper with the specified key and default text

Parameters:
xmlFile - The XML file in which this String was defined.
pkgName - The package containing the "LocalStrings_XX.properties" files.
i18nKey - The key used to look up the localized string.
dftStr - The default text to return if the key is not found.
Returns:
The enocded I18N string

parseI18N

protected static I18N.Text parseI18N(java.io.File xmlFile,
                                     java.lang.String pkgName,
                                     java.lang.String i18nKey,
                                     java.lang.String dftStr,
                                     boolean showError)
Create an I18N.Text wrapper with the specified key and default text

Parameters:
xmlFile - The XML file in which this String was defined.
pkgName - The package containing the "LocalStrings_XX.properties" files.
i18nKey - The key used to look up the localized string.
dftStr - The default text to return if the key is not found.
showError - If true, a stacktrace will be display if the key is invalid.
Returns:
The enocded I18N string

main

public static void main(java.lang.String[] argv)
Debug/Testing entry point

Parameters:
argv - The command-line arguments