public abstract class XmlToBundleConverter extends Object
Modifier and Type | Field and Description |
---|---|
File |
bundleDir |
String |
bundleName |
File |
xmlFile |
Constructor and Description |
---|
XmlToBundleConverter() |
Modifier and Type | Method and Description |
---|---|
abstract Map<Locale,Properties> |
extract() |
protected Locale |
extractLocale(String bundleName) |
Properties |
getBundle(Map<Locale,Properties> bundles,
Locale l) |
protected org.jdom.Element |
getElementForLocale(List<org.jdom.Element> elements,
Locale l) |
protected org.jdom.Attribute |
getLanguageAttr(org.jdom.Element element) |
void |
inject(Map<Locale,Properties> bundles) |
abstract void |
injectNode(org.jdom.Element node,
Locale locale,
String value) |
org.jdom.Element |
lookupNode(org.jdom.Document doc,
Locale locale,
String bundleKey) |
abstract List<org.jdom.Element> |
lookupNodes(org.jdom.Element node,
List<String> path) |
Map<Locale,Properties> |
read() |
void |
write(Map<Locale,Properties> bundles) |
public File xmlFile
public File bundleDir
public String bundleName
public abstract Map<Locale,Properties> extract() throws Exception
Exception
public abstract void injectNode(org.jdom.Element node, Locale locale, String value) throws Exception
Exception
public abstract List<org.jdom.Element> lookupNodes(org.jdom.Element node, List<String> path) throws Exception
Exception
public Properties getBundle(Map<Locale,Properties> bundles, Locale l)
public Map<Locale,Properties> read() throws Exception
Exception
public void write(Map<Locale,Properties> bundles) throws Exception
Exception
public org.jdom.Element lookupNode(org.jdom.Document doc, Locale locale, String bundleKey) throws Exception
Exception
public void inject(Map<Locale,Properties> bundles) throws Exception
Exception
protected org.jdom.Element getElementForLocale(List<org.jdom.Element> elements, Locale l)
protected org.jdom.Attribute getLanguageAttr(org.jdom.Element element)
Copyright © 2012–2016 JBoss by Red Hat. All rights reserved.