|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.apptemplate.lmslogger.impl.LmsFileData
public final class LmsFileData
LMS file parser.
It is designed to be internally used in LmsMessageConveyor
and LmsEnumGenerator
.
LmsMessageConveyor
Nested Class Summary | |
---|---|
static class |
LmsFileData.LmsMessageTemplImpl
Internal implementation of LmsMessageTemplate for representation of "localized"
LMS messages.Such message template instances will be created by actual LMS file content in a runtime, and registered in LmsMessageConveyor . |
Constructor Summary | |
---|---|
LmsFileData(java.lang.String filename)
Reads and parses content of given LMS file. |
Method Summary | |
---|---|
protected void |
doLoadTemplates(java.io.BufferedReader reader)
|
LmsFileHeader |
getHeader()
Returns the LMS file header. |
java.io.File |
getLmsFile()
Returns the LMS file source. |
LmsMessageTemplate |
getTemplate(int msgid)
Gets the LmsMessageTemplate with the specified ID. |
java.util.Collection<LmsMessageTemplate> |
getTemplates()
Returns collection of loaded LmsMessageTemplate 's. |
protected void |
loadFrom(java.io.BufferedReader reader)
Loads the *.lms file header and log templates from the "reader". |
protected void |
loadFrom(java.io.File file)
Parses the *.lms file into the Header and Message templates. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LmsFileData(java.lang.String filename) throws LmsLoadException
filename
- name of LMS file or resource.
LmsLoadException
- if no such file available or there is something wrong with its content
(see exception message for details).Method Detail |
---|
public java.io.File getLmsFile()
public LmsFileHeader getHeader()
public java.util.Collection<LmsMessageTemplate> getTemplates()
LmsMessageTemplate
's.
protected void loadFrom(java.io.File file) throws LmsLoadException
file
- the file to load.
LmsLoadException
protected void loadFrom(java.io.BufferedReader reader) throws LmsLoadException
reader
- the source to be read.
LoggerException
- if reader does not contain the valid
lms file header (should be first string).
LmsLoadException
protected void doLoadTemplates(java.io.BufferedReader reader) throws LmsLoadException, java.io.IOException
LmsLoadException
java.io.IOException
public LmsMessageTemplate getTemplate(int msgid)
LmsMessageTemplate
with the specified ID.
msgid
- the ID of LmsMessageTemplate
.
LmsMessageTemplate
.
java.lang.IllegalArgumentException
- If the LmsMessageTemplate
with
specified ID not found.public java.lang.String toString()
toString
in class java.lang.Object
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |