|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.jaxfront.core.util.LanguageEnhancedProperties
com.jaxfront.core.xui.NLS
public class NLS
Defines a NLS Property set which holds all the translated values in the current language.
Field Summary | |
---|---|
static java.lang.String |
CLASSIFICATION_TOOL_TIP
|
static java.lang.String |
CLOSING_DELIMITER
|
static java.lang.String |
CONTEXT_CAPTION
|
static java.lang.String |
CONTEXT_CHOICE
|
static java.lang.String |
CONTEXT_CONTEXTDIALOG
|
static java.lang.String |
CONTEXT_DELETION_MESSAGE
|
static java.lang.String |
CONTEXT_DIALOG
|
static java.lang.String |
CONTEXT_HELP
|
static java.lang.String |
CONTEXT_LABEL
|
static java.lang.String |
CONTEXT_LINE_INFO
|
static java.lang.String |
CONTEXT_LINE_INFO_PDF
|
static java.lang.String |
CONTEXT_LINE_INFO_TOOLTIP
|
static java.lang.String |
CONTEXT_MESSAGE
|
static java.lang.String |
CONTEXT_MESSAGE_FORMULA
|
static java.lang.String |
CONTEXT_MODE_VALIDATION_MESSAGE
|
static java.lang.String |
CONTEXT_PAGING
|
static java.lang.String |
CONTEXT_TREE_ENTRY
|
static java.lang.String |
LABEL_DELIMITER
|
static char |
TAG_DELIMITER
|
static java.lang.String |
UNDEFINED_VALUE
|
static java.lang.String |
XPATH_DELIMITER
|
Constructor Summary | |
---|---|
NLS()
Creates empty NLS properties. |
|
NLS(java.lang.String nlsContentStream)
Creates an NLS according a NLS String stream representing the content of a language specific NLS. |
|
NLS(java.net.URL xsdURL,
Document uiDoc,
FingerPrint fingerPrint,
java.lang.String language,
boolean handleIncludes,
boolean includesOnly)
Construct NLS properties based on a fingerprint and a language |
|
NLS(java.net.URL xsdURL,
FingerPrint fingerPrint,
java.lang.String language)
Construct NLS properties based on a fingerprint and a language. |
|
NLS(java.net.URL xsdURL,
FingerPrint fingerPrint,
java.lang.String language,
boolean handleIncludes)
Construct NLS properties based on a fingerprint and a language. |
|
NLS(java.net.URL xsdURL,
FingerPrint fingerPrint,
java.lang.String language,
boolean handleIncludes,
boolean includesOnly)
Construct NLS properties based on a fingerprint and a language |
Method Summary | |
---|---|
void |
addNLSChangeListener(NLSChangeListener listener)
|
void |
clearSmallCash()
|
java.util.Hashtable |
convertAllNLSFor(java.lang.String sourceXPath,
java.lang.String targetXPath,
boolean updateNLS)
|
java.util.Hashtable |
convertAllNLSFor(Type sourceType,
Type targetType,
boolean updateNLS)
|
static java.lang.String |
convertFromGlobalXPath(java.lang.String xpath)
|
java.util.Hashtable |
copyAllNLS(java.lang.String sourceXPath,
java.lang.String targetXpath)
|
java.util.Hashtable |
copyAllNLS(Type sourceType,
Type targetType)
|
void |
copyNLSStartingWithKey(java.lang.String sourceKey,
java.lang.String targetKey)
|
void |
copyNLSWithKey(java.lang.String sourceKey,
java.lang.String targetKey)
|
static java.lang.String |
createKeyForXUIEditor(Type type,
java.lang.String context,
java.lang.String subId,
java.lang.String classification)
Create the right key for a context |
static java.lang.String |
createParamNLSKey(Type nlsType)
|
static java.lang.String |
createParamNLSKey(Type nlsType,
java.lang.String paramSuffix,
int ruleIndex,
int actionIndex,
int paramIndex)
|
static java.lang.String |
createTargetXPathForXUIEditor(Type type)
Create the right key for a context |
java.util.Properties |
extractRelativeNLS(java.lang.String relativeTo)
|
java.lang.String |
get(java.lang.String key)
Returns the translated value for a key |
java.lang.String |
get(Type source,
java.lang.String key)
Returns the translated value for a source type and a key |
java.lang.String |
get(Type source,
java.lang.String key,
java.lang.String[] variables)
Returns the translated value for a souce type and a key. |
java.util.Vector |
getAllNLSFor(java.lang.String typeXPath)
|
java.util.Vector |
getAllNLSFor(java.lang.String typeXPath,
java.lang.String context,
boolean contextStartsWith)
|
java.util.Vector |
getAllNLSFor(Type aType)
|
java.util.Vector |
getAllNLSFor(Type aType,
java.lang.String context,
boolean contextStartsWith)
|
java.util.Vector |
getAllNLSWithKey(java.lang.String startsWith)
|
static java.lang.String |
getContext(Type type)
Get the context of the type (e.q. treeEntry, caption, ...) |
java.lang.String |
getFormula(Type source,
java.lang.String context,
java.lang.String subId)
|
java.lang.String |
getLanguage()
|
static java.lang.String |
getNLSHeader()
|
java.util.List |
getNLSListener()
|
static java.lang.String |
getNLSPageLayoutContext(Type type)
|
static java.lang.String |
getSubId(Type type)
Get the subid of the type (e.q. tablelayout 0,1,L,C ...) |
java.lang.String |
getTranslation(Type source,
java.lang.String defaultNLS,
java.lang.String context,
java.lang.String subId,
java.lang.String classification)
|
boolean |
hasChanged()
|
boolean |
hasFormula(Type source,
java.lang.String context,
java.lang.String subId)
|
static boolean |
hasIncludedNLS(Document uiDoc)
|
static boolean |
hasIncludedNLS(org.w3c.dom.Document w3cUIDoc)
|
void |
insertRelativeNLS(java.net.URL location,
java.lang.String relativeTo)
|
static boolean |
isInContext(java.lang.String key,
java.lang.String context)
|
void |
moveAllListEntryNLS(ListType list,
java.lang.String context,
int from,
int to)
|
void |
moveAllListEntryNLS(java.lang.String xpath,
java.lang.String context,
int from,
int to,
boolean removeSource)
|
static java.lang.String |
nlsKey(Type source,
java.lang.String context,
java.lang.String subId,
java.lang.String classification)
|
static java.lang.String |
nlsKey(Type source,
java.lang.String xpath,
java.lang.String context,
java.lang.String subId,
java.lang.String classification)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
Type sourceType,
java.lang.Object raiser)
|
void |
putAll(java.util.Map t)
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map. |
void |
putInCacheArray(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
removeAllNLSWithPartitialKey(java.lang.String sourceKey)
|
void |
removeNLS(java.lang.String xpath)
|
void |
removeNLSChangeListener(NLSChangeListener listener)
|
static void |
removeStoredEmbeddedNLS(Document uiDOM)
|
void |
replaceAllNLSWithPartitialKey(java.lang.String sourceKey,
java.lang.String destKey)
|
static java.lang.String |
replaceVariables(java.lang.String text,
java.lang.String[] variables)
|
static java.lang.String |
replaceXPathPointers(Type source,
java.lang.String text)
Replaces place holder for 'labels' and 'values' of a passing text. |
static java.lang.String |
resolveKeyXPath(Type type)
|
static java.lang.String |
resolveKeyXPathFromXuiComponent(Type xuiType)
|
void |
save(java.io.OutputStream out,
java.lang.String header)
Deprecated. This method does not throw an IOException if an I/O error occurs while saving the property list. As of the Java 2 platform v1.2, the preferred way to save a properties list is via the store(OutputStream out,
String header)
method. |
java.lang.Object |
searchInCacheArray(java.lang.Object o)
|
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
|
void |
store(java.io.OutputStream out,
java.lang.String header)
Calls the store(OutputStream out, String header) method
with the JAXFront.getDefaultFileEncoding! |
void |
store(Type contentType)
|
void |
store(java.io.Writer out,
java.lang.String header)
Calls the store(Writer out, String header) method
without any encodings! |
void |
storeAsSortedNLS(java.io.File file,
java.lang.String rootTypeName)
|
static void |
storeEmbeddedNLS(Document uiDOM,
NLS nls)
|
void |
swapAllNLSWithPartitialKey(java.lang.String sourceKey,
java.lang.String destKey)
|
Methods inherited from class com.jaxfront.core.util.LanguageEnhancedProperties |
---|
load, load |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, loadFromXML, propertyNames, storeToXML, storeToXML |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, size, toString, values |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XPATH_DELIMITER
public static final java.lang.String LABEL_DELIMITER
public static final java.lang.String UNDEFINED_VALUE
public static final java.lang.String CLOSING_DELIMITER
public static final char TAG_DELIMITER
public static final java.lang.String CONTEXT_TREE_ENTRY
public static final java.lang.String CONTEXT_LABEL
public static final java.lang.String CONTEXT_PAGING
public static final java.lang.String CONTEXT_CHOICE
public static final java.lang.String CONTEXT_CAPTION
public static final java.lang.String CONTEXT_HELP
public static final java.lang.String CONTEXT_MESSAGE
public static final java.lang.String CONTEXT_LINE_INFO
public static final java.lang.String CONTEXT_LINE_INFO_PDF
public static final java.lang.String CONTEXT_DIALOG
public static final java.lang.String CONTEXT_CONTEXTDIALOG
public static final java.lang.String CONTEXT_DELETION_MESSAGE
public static final java.lang.String CONTEXT_MESSAGE_FORMULA
public static final java.lang.String CONTEXT_LINE_INFO_TOOLTIP
public static final java.lang.String CONTEXT_MODE_VALIDATION_MESSAGE
public static final java.lang.String CLASSIFICATION_TOOL_TIP
Constructor Detail |
---|
public NLS(java.lang.String nlsContentStream)
public NLS()
public NLS(java.net.URL xsdURL, FingerPrint fingerPrint, java.lang.String language)
fingerPrint
- to create NLS properties fromlanguage
- nls languagepublic NLS(java.net.URL xsdURL, FingerPrint fingerPrint, java.lang.String language, boolean handleIncludes)
fingerPrint
- to create NLS properties fromlanguage
- nls languagehandleIncludes
- indicates if internal includes should be processedpublic NLS(java.net.URL xsdURL, FingerPrint fingerPrint, java.lang.String language, boolean handleIncludes, boolean includesOnly)
fingerPrint
- to create NLS properties fromlanguage
- nls languagehandleIncludes
- indicates if internal includes should be processedincludesOnly
- process only included fingerprintspublic NLS(java.net.URL xsdURL, Document uiDoc, FingerPrint fingerPrint, java.lang.String language, boolean handleIncludes, boolean includesOnly)
fingerPrint
- to create NLS properties fromlanguage
- nls languagehandleIncludes
- indicates if internal includes should be processedincludesOnly
- process only included fingerprintsMethod Detail |
---|
public static boolean hasIncludedNLS(Document uiDoc)
public static boolean hasIncludedNLS(org.w3c.dom.Document w3cUIDoc)
public java.lang.String get(java.lang.String key)
key
- nls keypublic void putAll(java.util.Map t)
putAll
in interface java.util.Map<java.lang.Object,java.lang.Object>
putAll
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
t
- Mappings to be stored in this map.
java.lang.NullPointerException
- if the specified map is null.public java.lang.String get(Type source, java.lang.String key)
source
- type sourcekey
- nls keypublic java.lang.String get(Type source, java.lang.String key, java.lang.String[] variables)
source
- type sourcekey
- nls keyvariables
- to replace %public static java.lang.String replaceVariables(java.lang.String text, java.lang.String[] variables)
public static java.lang.String replaceXPathPointers(Type source, java.lang.String text)
source
- type soucetext
- to replace
public boolean hasChanged()
public java.lang.Object setProperty(java.lang.String key, java.lang.String value)
setProperty
in class java.util.Properties
public void save(java.io.OutputStream out, java.lang.String header)
store(OutputStream out,
String header)
method.
store(OutputStream out, String header)
method
and suppresses IOExceptions that were thrown. Uses the
JAXFront.getDefaultFileEncoding!
save
in class LanguageEnhancedProperties
out
- an output stream.header
- a description of the property list.
java.lang.ClassCastException
- if this Properties
object contains any keys
or values that are not Strings
.public void store(java.io.OutputStream out, java.lang.String header) throws java.io.IOException
store(OutputStream out, String header)
method
with the JAXFront.getDefaultFileEncoding!
store
in class LanguageEnhancedProperties
out
- an output stream.header
- a description of the property list.
java.lang.ClassCastException
- if this Properties
object contains any keys
or values that are not Strings
.
java.io.IOException
public void store(java.io.Writer out, java.lang.String header) throws java.io.IOException
LanguageEnhancedProperties
store(Writer out, String header)
method
without any encodings!
store
in class LanguageEnhancedProperties
out
- an output stream.header
- a description of the property list.
java.io.IOException
public static java.lang.String getNLSHeader()
public void store(Type contentType) throws java.io.IOException
java.io.IOException
public void storeAsSortedNLS(java.io.File file, java.lang.String rootTypeName) throws java.io.IOException
java.io.IOException
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
put
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public java.lang.Object put(java.lang.Object key, java.lang.Object value, Type sourceType, java.lang.Object raiser)
public static java.lang.String createParamNLSKey(Type nlsType, java.lang.String paramSuffix, int ruleIndex, int actionIndex, int paramIndex)
public static java.lang.String createParamNLSKey(Type nlsType)
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.Object,java.lang.Object>
remove
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public void removeNLS(java.lang.String xpath)
public void swapAllNLSWithPartitialKey(java.lang.String sourceKey, java.lang.String destKey)
public void removeAllNLSWithPartitialKey(java.lang.String sourceKey)
public void replaceAllNLSWithPartitialKey(java.lang.String sourceKey, java.lang.String destKey)
public void insertRelativeNLS(java.net.URL location, java.lang.String relativeTo) throws java.io.IOException
java.io.IOException
public java.util.Properties extractRelativeNLS(java.lang.String relativeTo)
public java.lang.String getFormula(Type source, java.lang.String context, java.lang.String subId)
public boolean hasFormula(Type source, java.lang.String context, java.lang.String subId)
public java.lang.String getTranslation(Type source, java.lang.String defaultNLS, java.lang.String context, java.lang.String subId, java.lang.String classification)
public java.lang.Object searchInCacheArray(java.lang.Object o)
public void clearSmallCash()
public void putInCacheArray(java.lang.Object key, java.lang.Object value)
public static java.lang.String getNLSPageLayoutContext(Type type)
public static java.lang.String nlsKey(Type source, java.lang.String xpath, java.lang.String context, java.lang.String subId, java.lang.String classification)
public static java.lang.String nlsKey(Type source, java.lang.String context, java.lang.String subId, java.lang.String classification)
public java.util.Vector getAllNLSFor(Type aType)
public java.util.Vector getAllNLSFor(java.lang.String typeXPath)
public java.util.Vector getAllNLSWithKey(java.lang.String startsWith)
public java.util.Vector getAllNLSFor(Type aType, java.lang.String context, boolean contextStartsWith)
public java.util.Vector getAllNLSFor(java.lang.String typeXPath, java.lang.String context, boolean contextStartsWith)
public java.util.Hashtable convertAllNLSFor(Type sourceType, Type targetType, boolean updateNLS)
public java.util.Hashtable copyAllNLS(Type sourceType, Type targetType)
public java.util.Hashtable copyAllNLS(java.lang.String sourceXPath, java.lang.String targetXpath)
public void copyNLSWithKey(java.lang.String sourceKey, java.lang.String targetKey)
public void copyNLSStartingWithKey(java.lang.String sourceKey, java.lang.String targetKey)
public void moveAllListEntryNLS(ListType list, java.lang.String context, int from, int to)
public static boolean isInContext(java.lang.String key, java.lang.String context)
public void moveAllListEntryNLS(java.lang.String xpath, java.lang.String context, int from, int to, boolean removeSource)
public java.util.Hashtable convertAllNLSFor(java.lang.String sourceXPath, java.lang.String targetXPath, boolean updateNLS)
public static java.lang.String convertFromGlobalXPath(java.lang.String xpath)
public static java.lang.String resolveKeyXPath(Type type)
public static java.lang.String resolveKeyXPathFromXuiComponent(Type xuiType)
public static java.lang.String createKeyForXUIEditor(Type type, java.lang.String context, java.lang.String subId, java.lang.String classification)
type
- the typepublic static java.lang.String createTargetXPathForXUIEditor(Type type)
type
- the typepublic void addNLSChangeListener(NLSChangeListener listener)
public void removeNLSChangeListener(NLSChangeListener listener)
public java.util.List getNLSListener()
public java.lang.String getLanguage()
public static java.lang.String getSubId(Type type)
type
- the type for the contextpublic static java.lang.String getContext(Type type)
type
- the type for the contextpublic static void removeStoredEmbeddedNLS(Document uiDOM) throws java.io.IOException
java.io.IOException
public static void storeEmbeddedNLS(Document uiDOM, NLS nls) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |