public class LabelSetImpl extends BasePropertyFile implements LabelSet
Labels are stored in a one or more XML files as defined by a LabelSetDescriptor.
A LabelSet is created/loaded by the GrammaticalLabelSetLoader
BasePropertyFile.MetaDataInfo, BasePropertyFile.Parser, BasePropertyFile.SubstitutionExceptiondata, lastModified, metaData, MISSING_LABEL| Modifier | Constructor and Description |
|---|---|
|
LabelSetImpl(BasePropertyFile.Parser p) |
|
LabelSetImpl(BasePropertyFile.Parser p,
PropertyFileData data) |
protected |
LabelSetImpl(PropertyFileData data,
Map<String,String> labelSectionToFilename)
Construct a label set from the given data and optional labelSectionToFileName
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(LabelReference reference) |
String |
getFilenameFromLabelSection(String sectionName) |
Map<String,String> |
getLabelSectionToFilename() |
PropertyFileData |
getPropertyFileData() |
String |
getString(String section,
String param)
Get the value stored in section/param in the IniFile as a string.
|
String |
getString(String section,
String param,
String ifNull)
Get the value stored in section/param in the IniFile as a string.
|
String |
getStringThrow(String section,
String param)
Get the value stored in section/param in the IniFile as a string.
|
boolean |
labelExists(String section,
String param) |
String |
processMissingLabel(String message,
boolean allowLabelException)
Will either throw an exception or send an error depending on whether we
are in production / test running more or note.
|
protected void |
setLabelSectionToFilename(Map<String,String> sectionMap) |
attachSharedKeyMap, containsListParam, containsParam, containsSection, doSubstitutions, doSubstitutions, entrySet, get, get, get, getBoolean, getBoolean, getCensoredString, getFloat, getFloat, getInt, getInt, getLastModified, getList, getList, getListConfigValues, getNumListEntryParams, getParams, getParams, getSection, inner_get, isProductionMode, makeListEntryParam, outputValueXML, outputValueXMLCensored, outputXML, outputXML, put, remove, removeSection, sectionNames, setLastModified, stringToBoolean, substituteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsParam, containsSection, getLastModified, getParams, getParams, sectionNamesget, getBoolean, getFloat, getInt, getList, getSectionentrySet, get, getBoolean, getCensoredString, getFloat, getInt, getListprotected LabelSetImpl(PropertyFileData data, Map<String,String> labelSectionToFilename)
data - the datalabelSectionToFilename - the map from label section to filename (not super useful)public LabelSetImpl(BasePropertyFile.Parser p) throws IOException
IOExceptionpublic LabelSetImpl(BasePropertyFile.Parser p, PropertyFileData data) throws IOException
IOExceptionpublic Map<String,String> getLabelSectionToFilename()
getLabelSectionToFilename in interface LabelSetpublic boolean labelExists(String section, String param)
labelExists in interface SharedLabelSetpublic String getString(String section, String param)
NonConfigIniFilegetString in interface NonConfigIniFilegetString in class BasePropertyFilesection - the section to look in.param - the param name to look for.public String getStringThrow(String section, String param)
NonConfigIniFilegetStringThrow in interface NonConfigIniFilegetStringThrow in class BasePropertyFilesection - the section to look in.param - the param name to look for.public String getString(String section, String param, String ifNull)
BaseNonConfigIniFilegetString in interface BaseNonConfigIniFilegetString in class BasePropertyFilesection - the section to look in.param - the param name to look for.ifNull - the default value to use.public Object get(LabelReference reference)
public PropertyFileData getPropertyFileData()
getPropertyFileData in class BasePropertyFilepublic String processMissingLabel(String message, boolean allowLabelException) throws ParameterNotFoundException
message - the message to return as the labelallowLabelException - - true to always throw an exception for a missing labelParameterNotFoundException - if label exception is allowedCopyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.