org.apache.jetspeed.om.impl
Class LanguageImpl

java.lang.Object
  extended by java.util.ResourceBundle
      extended by org.apache.jetspeed.om.impl.LanguageImpl
All Implemented Interfaces:
Serializable, org.apache.jetspeed.om.common.MutableLanguage, org.apache.pluto.om.common.Language, org.apache.pluto.om.Model

public class LanguageImpl
extends ResourceBundle
implements org.apache.jetspeed.om.common.MutableLanguage, Serializable

LanguageImpl
Okay, base Language really has nothing to really do at all with language per se. It actually represents the locallized title and short-title attributes of a portlet's definition. It also contains a resource bundle for the specifc locale.
TODO: org.apache.pluto.om.common.Language should be seperated into TODO a Language class that just contains the resource bundle and TODO a Title class that contains a localized title and short title.

Version:
$Id: LanguageImpl.java 516448 2007-03-09 16:25:47Z ate $
Author:
Scott T. Weaver , Ate Douma
See Also:
Serialized Form

Field Summary
protected  long id
          This field can be used by persistence tools for storing PK info Otherwise it has no effect on the functioning of the portal.
static String JAVAX_PORTLET_KEYWORDS
           
static String JAVAX_PORTLET_SHORT_TITLE
           
static String JAVAX_PORTLET_TITLE
           
private  Set keys
           
private  Collection keywords
           
private  String keywordStr
           
private  Locale locale
           
protected  long portletId
           
private  String shortTitle
           
private  String title
           
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
LanguageImpl()
           
 
Method Summary
 boolean equals(Object obj)
           
 Enumeration getKeys()
           
 Iterator getKeywords()
           
 String getKeywordStr()
           
 Locale getLocale()
           
 ResourceBundle getParentResourceBundle()
           
 ResourceBundle getResourceBundle()
           
 String getShortTitle()
           
private  String getStringValue(ResourceBundle bundle, String key, String defaultValue)
           
 String getTitle()
           
protected  Object handleGetObject(String key)
           
 int hashCode()
           
 void loadDefaults()
           
 void setKeywords(Collection keywords)
           
 void setKeywords(String keywordStr)
           
 void setLocale(Locale locale)
           
 void setResourceBundle(ResourceBundle bundle)
           
 void setShortTitle(String shortTitle)
           
 void setTitle(String title)
           
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVAX_PORTLET_KEYWORDS

public static final String JAVAX_PORTLET_KEYWORDS
See Also:
Constant Field Values

JAVAX_PORTLET_SHORT_TITLE

public static final String JAVAX_PORTLET_SHORT_TITLE
See Also:
Constant Field Values

JAVAX_PORTLET_TITLE

public static final String JAVAX_PORTLET_TITLE
See Also:
Constant Field Values

keys

private Set keys

title

private String title

shortTitle

private String shortTitle

locale

private Locale locale

keywordStr

private String keywordStr

keywords

private Collection keywords

id

protected long id
This field can be used by persistence tools for storing PK info Otherwise it has no effect on the functioning of the portal.


portletId

protected long portletId
Constructor Detail

LanguageImpl

public LanguageImpl()
Method Detail

getKeys

public Enumeration getKeys()
Specified by:
getKeys in class ResourceBundle

handleGetObject

protected Object handleGetObject(String key)
Specified by:
handleGetObject in class ResourceBundle

getStringValue

private String getStringValue(ResourceBundle bundle,
                              String key,
                              String defaultValue)

setResourceBundle

public void setResourceBundle(ResourceBundle bundle)

loadDefaults

public void loadDefaults()

getLocale

public Locale getLocale()
Specified by:
getLocale in interface org.apache.pluto.om.common.Language
Overrides:
getLocale in class ResourceBundle
See Also:
Language.getLocale()

getTitle

public String getTitle()
Specified by:
getTitle in interface org.apache.pluto.om.common.Language
See Also:
Language.getTitle()

getShortTitle

public String getShortTitle()
Specified by:
getShortTitle in interface org.apache.pluto.om.common.Language
See Also:
Language.getShortTitle()

getKeywords

public Iterator getKeywords()
Specified by:
getKeywords in interface org.apache.pluto.om.common.Language
See Also:
Language.getKeywords()

getResourceBundle

public ResourceBundle getResourceBundle()
Specified by:
getResourceBundle in interface org.apache.pluto.om.common.Language
See Also:
Language.getResourceBundle()

getParentResourceBundle

public ResourceBundle getParentResourceBundle()

setLocale

public void setLocale(Locale locale)
Specified by:
setLocale in interface org.apache.jetspeed.om.common.MutableLanguage
See Also:
org.apache.pluto.om.common.LanguageCtrl#setLocale(java.util.Locale)

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface org.apache.jetspeed.om.common.MutableLanguage
See Also:
org.apache.pluto.om.common.LanguageCtrl#setTitle(java.lang.String)

setShortTitle

public void setShortTitle(String shortTitle)
Specified by:
setShortTitle in interface org.apache.jetspeed.om.common.MutableLanguage
See Also:
org.apache.pluto.om.common.LanguageCtrl#setShortTitle(java.lang.String)

setKeywords

public void setKeywords(Collection keywords)
Specified by:
setKeywords in interface org.apache.jetspeed.om.common.MutableLanguage
See Also:
org.apache.jetspeed.om.common.LanguageComposite#setKeywords(java.util.Collection)

setKeywords

public void setKeywords(String keywordStr)

getKeywordStr

public String getKeywordStr()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.