com.sapportals.wcm.protocol.webdav

Class InternationalString

java.lang.Object
  extended by com.sapportals.wcm.protocol.webdav.InternationalString
All Implemented Interfaces:
IInternationalString

public class InternationalString
extends Object
implements IInternationalString

Implementation of IInternationalString.

Copyright (c) SAP AG 2001-2005


Constructor Summary
InternationalString(ResourceBundle bundle, ResourceBundle secondaryBundle, String key)
          Build InternationalString from entry in bundle.
InternationalString(ResourceBundle bundle, String key)
          Build InternationalString from entry in bundle.
InternationalString(String languageTag, String text)
          Build InternationalString from tag and content.
 
Method Summary
 String getLanguageTag()
          Gets the language tag.
 String getText()
          Gets the text content.
 boolean matchesLocale(Locale loc, boolean exact)
          Check whether the language matches the given locale
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternationalString

public InternationalString(String languageTag,
                           String text)
Build InternationalString from tag and content.

Parameters:
languageTag - language tag
text - text content

InternationalString

public InternationalString(ResourceBundle bundle,
                           String key)
Build InternationalString from entry in bundle. When key is not found in the bundle, log the problem and use the key instead.

Parameters:
bundle - ResourceBundle from which to extract content and language
key - key in bundle to use

InternationalString

public InternationalString(ResourceBundle bundle,
                           ResourceBundle secondaryBundle,
                           String key)
Build InternationalString from entry in bundle. When key is not found in the bundle, log the problem and use the key instead.

Parameters:
bundle - ResourceBundle from which to extract content and language
secondaryBundle - secondary (fallback) bundle
key - key in bundle to use
Method Detail

getText

public String getText()
Description copied from interface: IInternationalString
Gets the text content.

Specified by:
getText in interface IInternationalString
Returns:
the text content

getLanguageTag

public String getLanguageTag()
Description copied from interface: IInternationalString
Gets the language tag.

Specified by:
getLanguageTag in interface IInternationalString
Returns:
the language tag (or null when language unspecified)

toString

public String toString()
Overrides:
toString in class Object
Returns:
"[tag]text"

matchesLocale

public boolean matchesLocale(Locale loc,
                             boolean exact)
Description copied from interface: IInternationalString
Check whether the language matches the given locale

Specified by:
matchesLocale in interface IInternationalString
Parameters:
loc - locale to match with
exact - when true, compare the complete tag. Otherwise, just compare the language.
Returns:
match or not
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice