Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.lmslogger.impl
Class LmsFileData

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.lmslogger.impl.LmsFileData

public final class LmsFileData
extends java.lang.Object

LMS file parser.
It is designed to be internally used in LmsMessageConveyor and LmsEnumGenerator.

See Also:
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

LmsFileData

public LmsFileData(java.lang.String filename)
            throws LmsLoadException
Reads and parses content of given LMS file.

Parameters:
filename - name of LMS file or resource.
Throws:
LmsLoadException - if no such file available or there is something wrong with its content (see exception message for details).
Method Detail

getLmsFile

public java.io.File getLmsFile()
Returns the LMS file source.


getHeader

public LmsFileHeader getHeader()
Returns the LMS file header.


getTemplates

public java.util.Collection<LmsMessageTemplate> getTemplates()
Returns collection of loaded LmsMessageTemplate's.


loadFrom

protected void loadFrom(java.io.File file)
                 throws LmsLoadException
Parses the *.lms file into the Header and Message templates.

Parameters:
file - the file to load.
Throws:
LmsLoadException

loadFrom

protected void loadFrom(java.io.BufferedReader reader)
                 throws LmsLoadException
Loads the *.lms file header and log templates from the "reader".

Parameters:
reader - the source to be read.
Throws:
LoggerException - if reader does not contain the valid lms file header (should be first string).
LmsLoadException

doLoadTemplates

protected void doLoadTemplates(java.io.BufferedReader reader)
                        throws LmsLoadException,
                               java.io.IOException
Throws:
LmsLoadException
java.io.IOException

getTemplate

public LmsMessageTemplate getTemplate(int msgid)
Gets the LmsMessageTemplate with the specified ID.

Parameters:
msgid - the ID of LmsMessageTemplate.
Returns:
Found LmsMessageTemplate.
Throws:
java.lang.IllegalArgumentException - If the LmsMessageTemplate with specified ID not found.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.