Class LabelManagerFactory
- java.lang.Object
-
- org.apache.ofbiz.webtools.labelmanager.LabelManagerFactory
-
public class LabelManagerFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Set<java.lang.String>
componentNamesFound
protected java.util.List<LabelInfo>
duplicatedLocalesLabelsList
protected static java.util.Map<java.lang.String,LabelFile>
filesFound
static java.lang.String
keySeparator
protected java.util.Map<java.lang.String,LabelInfo>
labels
protected java.util.Set<java.lang.String>
localesFound
static java.lang.String
module
static java.lang.String
resource
-
Constructor Summary
Constructors Modifier Constructor Description protected
LabelManagerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
findMatchingLabels(java.lang.String component, java.lang.String fileName, java.lang.String key, java.lang.String locale, boolean onlyNotUsedLabels)
static java.util.Set<java.lang.String>
getComponentNamesFound()
int
getDuplicatedLocalesLabels()
java.util.List<LabelInfo>
getDuplicatedLocalesLabelsList()
static java.util.Collection<LabelFile>
getFilesFound()
static LabelManagerFactory
getInstance()
LabelFile
getLabelFile(java.lang.String fileName)
java.util.Map<java.lang.String,LabelInfo>
getLabels()
java.util.Set<java.lang.String>
getLabelsList()
java.util.Set<java.lang.String>
getLocalesFound()
protected static void
loadComponentNames()
protected static void
loadLabelFiles()
int
updateLabelValue(java.util.List<java.lang.String> localeNames, java.util.List<java.lang.String> localeValues, java.util.List<java.lang.String> localeComments, LabelInfo label, java.lang.String key, java.lang.String keyComment, java.lang.String fileName)
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
keySeparator
public static final java.lang.String keySeparator
- See Also:
- Constant Field Values
-
componentNamesFound
protected static java.util.Set<java.lang.String> componentNamesFound
-
filesFound
protected static java.util.Map<java.lang.String,LabelFile> filesFound
-
labels
protected java.util.Map<java.lang.String,LabelInfo> labels
-
localesFound
protected java.util.Set<java.lang.String> localesFound
-
duplicatedLocalesLabelsList
protected java.util.List<LabelInfo> duplicatedLocalesLabelsList
-
-
Method Detail
-
getInstance
public static LabelManagerFactory getInstance() throws java.io.IOException
- Throws:
java.io.IOException
-
loadComponentNames
protected static void loadComponentNames()
-
loadLabelFiles
protected static void loadLabelFiles() throws java.io.IOException
- Throws:
java.io.IOException
-
findMatchingLabels
public void findMatchingLabels(java.lang.String component, java.lang.String fileName, java.lang.String key, java.lang.String locale, boolean onlyNotUsedLabels) throws java.net.MalformedURLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, java.io.IOException, GeneralException
- Throws:
java.net.MalformedURLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
GeneralException
-
getLabelFile
public LabelFile getLabelFile(java.lang.String fileName)
-
getLabels
public java.util.Map<java.lang.String,LabelInfo> getLabels()
-
getLocalesFound
public java.util.Set<java.lang.String> getLocalesFound()
-
getFilesFound
public static java.util.Collection<LabelFile> getFilesFound()
-
getComponentNamesFound
public static java.util.Set<java.lang.String> getComponentNamesFound()
-
getLabelsList
public java.util.Set<java.lang.String> getLabelsList()
-
getDuplicatedLocalesLabels
public int getDuplicatedLocalesLabels()
-
getDuplicatedLocalesLabelsList
public java.util.List<LabelInfo> getDuplicatedLocalesLabelsList()
-
updateLabelValue
public int updateLabelValue(java.util.List<java.lang.String> localeNames, java.util.List<java.lang.String> localeValues, java.util.List<java.lang.String> localeComments, LabelInfo label, java.lang.String key, java.lang.String keyComment, java.lang.String fileName)
-
-