com.gentics.api.lib.i18n
Class Language

java.lang.Object
  extended by com.gentics.api.lib.i18n.Language
All Implemented Interfaces:
Resolvable, Serializable

public class Language
extends Object
implements Serializable, Resolvable

language object

Author:
laurin
See Also:
Serialized Form

Constructor Summary
Language(String id, Locale locale, Properties dic)
          load a language object according to given id, locale and dic.
 
Method Summary
 boolean canResolve()
          Check whether the resolvable is capable of resolving properties right now.
 Object get(String key)
          Get the property named by key or null if the property does not exist or is not set.
 Properties getDic()
           
 String getId()
          get the id of the language object.
 Locale getLocale()
           
 Object getProperty(String key)
          Get the property named by key or null if the property does not exist or is not set.
 void setDic(Properties dic)
           
 void setId(String id)
          set the id for the current language object.
 void setLocale(Locale locale)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Language

public Language(String id,
                Locale locale,
                Properties dic)
load a language object according to given id, locale and dic.

Parameters:
id - the id string, customizable.
Method Detail

getId

public String getId()
get the id of the language object.

Returns:
the id string, is customizable.

setId

public void setId(String id)
set the id for the current language object. same as constructor.

Parameters:
id - the id string, is customizable.

setDic

public void setDic(Properties dic)

getDic

public Properties getDic()

getLocale

public Locale getLocale()

setLocale

public void setLocale(Locale locale)

canResolve

public boolean canResolve()
Description copied from interface: Resolvable
Check whether the resolvable is capable of resolving properties right now.
if this method returns false all calls to Resolvable.getProperty(String) or Resolvable.get(String) will return null.

Specified by:
canResolve in interface Resolvable
Returns:
true when the resolvable can resolve properties. false if not

get

public Object get(String key)
Description copied from interface: Resolvable
Get the property named by key or null if the property does not exist or is not set.

Specified by:
get in interface Resolvable
Parameters:
key - key of the property
Returns:
value of the property or null

getProperty

public Object getProperty(String key)
Description copied from interface: Resolvable
Get the property named by key or null if the property does not exist or is not set. Alias for Resolvable.get(String).

Specified by:
getProperty in interface Resolvable
Parameters:
key - key of the property
Returns:
value of the property or null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.