package com.ibm.emb.junit;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.PropertyResourceBundle;

/**
 * A utility class of which at most one instance can exist per VM. Use
 * EMBTestConfiguration.instance() to access this instance.
 */
public class EMBTestConfiguration implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 3689352100358664754L;

    public static final String propertyFile = "EmbTestConfiguration";

    protected String testClient;

    protected String testClientIPAddress;

    protected PropertyResourceBundle rb = null;

    protected BufferedWriter traceWriter = null;

    protected BufferedWriter logWriter = null;

    protected BufferedWriter junitWriter = null;

    protected String mediaDir = null;

    protected boolean includeLongRunningTest = false;

    protected boolean logKnownErrors = false;

    protected boolean writeTrace = false;

    protected boolean writeLog = false;

    protected String bmpPictureName1 = null;

    protected String bmpPictureName2 = null;

    protected String jpgPictureName1 = null;

    protected String jpgPictureName2 = null;

    protected String mp3SoundName1 = null;

    protected String mp3SoundName2 = null;

    protected String playlistName1 = null;

    protected String playlistName2 = null;

    protected String mpegMovieName1 = null;

    protected String wavSoundName1 = null;

    protected String gzipCorruptFileName = null;

    protected String nonEmbeddedMediaClassName = null;

    protected String nonEmbeddedMediaFileExt = null;

    protected String nonEmbeddedMediaFile = null;

    protected String allMediaFormats = null;

    protected String allMediaConverterSpecs = null;

    protected String streamServerTypes = null;

    protected String classSignatureFile = null;

    protected String listOfClassNamesFile = null;

    protected String xmlFile1 = null;

    protected String xmlFile2 = null;

    protected String invalidXMLFile1 = null;

    protected String invalidXMLFile2 = null;

    protected String queryLanguages = null;

    protected String mediaListeners = null;

    protected String maxMediaSize = null;

    /**
     * The constructor could be made private to prevent others from
     * instantiating this class. But this would also make it impossible to
     * create instances of Singleton subclasses.
     */
    public EMBTestConfiguration() {
    }

    /**
     * A handle to the unique Singleton instance.
     */
    static protected EMBTestConfiguration _instance = null;

    /**
     * @return The unique instance of this class.
     */
    static public EMBTestConfiguration instance() {
        if (null == _instance) {
            _instance = new EMBTestConfiguration();
            _instance.initConfig();
        }
        return _instance;
    }

    /**
     * initialize the configuration
     */
    public void initConfig() {
        try {
            this.rb = (PropertyResourceBundle) PropertyResourceBundle.getBundle(propertyFile);
            EMBStaticHelper.testTrace("MEDIADIR=" + this.rb.getString("MEDIADIR"));
            this.mediaDir = this.rb.getString("MEDIADIR");

            EMBStaticHelper.testTrace("includeLongRunningTest=" + this.rb.getString("includeLongRunningTest"));
            if (this.rb.getString("includeLongRunningTest").equals("1")) {
                this.setIncludeLongRunningTest(true);
            }
            EMBStaticHelper.testTrace("logKnownErrors=" + this.rb.getString("logKnownErrors"));
            if (this.rb.getString("logKnownErrors").equals("1")) {
                this.setLogKnownErrors(true);
            }

            EMBStaticHelper.testTrace("writeTrace=" + this.rb.getString("writeTrace"));
            if (this.rb.getString("writeTrace").equals("1")) {
                this.setWriteTrace(true);
            }
            EMBStaticHelper.testTrace("writeLog=" + this.rb.getString("writeLog"));
            if (this.rb.getString("writeLog").equals("1")) {
                this.setWriteLog(true);
            }

        } catch (java.util.MissingResourceException e) {
            EMBStaticHelper.testTrace("Resource " + propertyFile + " not found");
            e.printStackTrace();
            throw new RuntimeException();
        }

        File traceFile = null;
        File logFile = null;
        File junitFile = null;
        SimpleDateFormat df = new java.text.SimpleDateFormat("MMddyyyy_HHmmss");
        String timeString = df.format(new Date());

        try {
            FileWriter fwriter = null;
            if (this.getWriteTrace()) {
                traceFile = new File(getMediaDir() + File.separator + "log" + File.separator
                        + this.rb.getString("TRACEFILE") + timeString + ".log");
                EMBStaticHelper.testTrace("traceFile = " + traceFile.getAbsolutePath());

                traceFile.createNewFile();
                fwriter = new FileWriter(traceFile);
                this.traceWriter = new BufferedWriter(fwriter);
            }
            if (this.getWriteLog()) {
                logFile = new File(getMediaDir() + File.separator + "log" + File.separator
                        + this.rb.getString("LOGFILE") + timeString + ".log");
                EMBStaticHelper.testTrace("logFile = " + logFile.getAbsolutePath());
                logFile.createNewFile();
                fwriter = new FileWriter(logFile);
                this.logWriter = new BufferedWriter(fwriter);
            }
            junitFile = new File(getMediaDir() + File.separator + "log" + File.separator
                    + this.rb.getString("JUNITFILE") + timeString + ".log");
            EMBStaticHelper.testTrace("junitFile = " + junitFile.getAbsolutePath());
            junitFile.createNewFile();
            fwriter = new FileWriter(junitFile);
            this.junitWriter = new BufferedWriter(fwriter);
        } catch (Exception e) {
            if (traceFile != null && logFile != null) {
            EMBStaticHelper.testTrace("error creating traceFiles" + traceFile.getAbsolutePath() + " or "
                    + logFile.getAbsolutePath());
            } else {
                EMBStaticHelper.testTrace("error creating traceFiles");
            }
            e.printStackTrace();
        }

    }

    /**
     * Gets the testComputer
     * @return Returns a String
     */
    public String getTestClient() {
        if (this.testClient == null) {
            // EMBStaticHelper.testTrace("testClient=" +
            // this.rb.getString("TESTCLIENT"));
            this.setTestClient(this.rb.getString("TESTCLIENT"));

        }

        return this.testClient;
    }

    /**
     * Sets the testComputer
     * @param testComputer The testComputer to set
     */
    public void setTestClient(String testComputer) {
        this.testClient = testComputer;
    }

    /**
     * Gets the traceWriter
     * @return Returns a BufferedWriter
     */
    public BufferedWriter getTraceWriter() {
        return traceWriter;
    }

    /**
     * Sets the traceWriter
     * @param traceWriter The traceWriter to set
     */
    public void setTraceWriter(BufferedWriter traceWriter) {
        this.traceWriter = traceWriter;
    }

    /**
     * Gets the logWriter
     * @return Returns a BufferedWriter
     */
    public BufferedWriter getLogWriter() {
        return logWriter;
    }

    /**
     * Sets the logWriter
     * @param logWriter The logWriter to set
     */
    public void setLogWriter(BufferedWriter logWriter) {
        this.logWriter = logWriter;
    }

    /**
     * Gets the junitWriter
     * @return Returns a BufferedWriter
     */
    public BufferedWriter getJunitWriter() {
        return junitWriter;
    }

    /**
     * Sets the junitWriter
     * @param junitWriter The junitWriter to set
     */
    public void setJunitWriter(BufferedWriter junitWriter) {
        this.junitWriter = junitWriter;
    }

    /**
     * Gets the media directory
     */
    public String getMediaDir() {
        // return this.workingDir + File.separator + "media";
        return this.mediaDir;
    }

    /**
     * Gets the includeLongRunningTest
     * @return Returns a boolean
     */
    public boolean getIncludeLongRunningTest() {
        return includeLongRunningTest;
    }

    /**
     * Sets the includeLongRunningTest
     * @param includeLongRunningTest The includeLongRunningTest to set
     */
    public void setIncludeLongRunningTest(boolean includeLongRunningTest) {
        this.includeLongRunningTest = includeLongRunningTest;
    }

    /**
     * Gets the jpgPictureName1
     * @return Returns a String
     */
    public String getJpgPictureName1() {
        if (this.jpgPictureName1 == null) {
            EMBStaticHelper.testTrace("jpgPictureName1=" + this.rb.getString("jpgPictureName1"));
            this.setJpgPictureName1(this.rb.getString("jpgPictureName1"));

        }
        return this.jpgPictureName1;
    }

    /**
     * Sets the jpgPictureName1
     * @param jpgPictureName1 The jpgPictureName1 to set
     */
    public void setJpgPictureName1(String jpgPictureName1) {
        this.jpgPictureName1 = jpgPictureName1;
    }

    /**
     * Gets the jpgPictureName2
     * @return Returns a String
     */
    public String getJpgPictureName2() {
        if (this.jpgPictureName2 == null) {
            EMBStaticHelper.testTrace("jpgPictureName2=" + this.rb.getString("jpgPictureName2"));
            this.setJpgPictureName2(this.rb.getString("jpgPictureName2"));

        }
        return this.jpgPictureName2;
    }

    /**
     * Sets the jpgPictureName2
     * @param jpgPictureName2 The jpgPictureName2 to set
     */
    public void setJpgPictureName2(String jpgPictureName2) {
        this.jpgPictureName2 = jpgPictureName2;
    }

    /**
     * Gets the bmpPictureName1
     * @return Returns a String
     */
    public String getBmpPictureName1() {
        if (this.bmpPictureName1 == null) {
            EMBStaticHelper.testTrace("bmpPictureName1=" + this.rb.getString("bmpPictureName1"));
            this.setBmpPictureName1(this.rb.getString("bmpPictureName1"));
        }
        return this.bmpPictureName1;
    }

    /**
     * Sets the bmpPictureName1
     * @param bmpPictureName1 The bmpPictureName1 to set
     */
    public void setBmpPictureName1(String bmpPictureName1) {
        this.bmpPictureName1 = bmpPictureName1;
    }

    /**
     * Gets the bmpPictureName2
     * @return Returns a String
     */
    public String getBmpPictureName2() {
        if (this.bmpPictureName2 == null) {
            EMBStaticHelper.testTrace("bmpPictureName2=" + this.rb.getString("bmpPictureName2"));
            this.setBmpPictureName2(this.rb.getString("bmpPictureName2"));
        }
        return this.bmpPictureName2;
    }

    /**
     * Sets the bmpPictureName2
     * @param bmpPictureName2 The bmpPictureName2 to set
     */
    public void setBmpPictureName2(String bmpPictureName2) {
        this.bmpPictureName2 = bmpPictureName2;
    }

    /**
     * Gets the mpegMovieName1
     * @return Returns a String
     */
    public String getMpegMovieName1() {
        if (this.mpegMovieName1 == null) {
            EMBStaticHelper.testTrace("mpegMovieName1=" + this.rb.getString("mpegMovieName1"));
            this.setMpegMovieName1(this.rb.getString("mpegMovieName1"));
        }
        return this.mpegMovieName1;
    }

    /**
     * Sets the mpegMovieName1
     * @param mpegMovieName1 The mpegMovieName1 to set
     */
    public void setMpegMovieName1(String mpegMovieName1) {
        this.mpegMovieName1 = mpegMovieName1;
    }

    /**
     * Gets the mp3SoundName1
     * @return Returns a String
     */
    public String getMp3SoundName1() {
        if (this.mp3SoundName1 == null) {
            EMBStaticHelper.testTrace("mp3SoundName1=" + this.rb.getString("mp3SoundName1"));
            this.setMp3SoundName1(this.rb.getString("mp3SoundName1"));
        }
        return this.mp3SoundName1;
    }

    /**
     * Sets the mp3SoundName1
     * @param mp3SoundName1 The mp3SoundName1 to set
     */
    public void setMp3SoundName1(String mp3SoundName1) {
        this.mp3SoundName1 = mp3SoundName1;
    }

    /**
     * Gets the mp3SoundName2
     * @return Returns a String
     */
    public String getMp3SoundName2() {
        if (this.mp3SoundName2 == null) {
            EMBStaticHelper.testTrace("mp3SoundName2=" + this.rb.getString("mp3SoundName2"));
            this.setMp3SoundName2(this.rb.getString("mp3SoundName2"));
        }
        return this.mp3SoundName2;
    }

    /**
     * Sets the mp3SoundName2
     * @param mp3SoundName2 The mp3SoundName2 to set
     */
    public void setMp3SoundName2(String mp3SoundName2) {
        this.mp3SoundName2 = mp3SoundName2;
    }

    /**
     * Gets the playlistName1
     * @return Returns a String
     */
    public String getPlaylistName1() {
        if (this.playlistName1 == null) {
            EMBStaticHelper.testTrace("playlistName1=" + this.rb.getString("playlistName1"));
            this.setPlaylistName1(this.rb.getString("playlistName1"));
        }
        return this.playlistName1;
    }

    /**
     * Sets the playlistName1
     * @param playlistName1 The playlistName1 to set
     */
    public void setPlaylistName1(String playlistName1) {
        this.playlistName1 = playlistName1;
    }

    /**
     * Gets the playlistName2
     * @return Returns a String
     */
    public String getPlaylistName2() {
        if (this.playlistName2 == null) {
            EMBStaticHelper.testTrace("playlistName2=" + this.rb.getString("playlistName2"));
            this.setPlaylistName2(this.rb.getString("playlistName2"));
        }
        return this.playlistName2;
    }

    /**
     * Sets the playlistName2
     * @param playlistName2 The playlistName2 to set
     */
    public void setPlaylistName2(String playlistName2) {
        this.playlistName2 = playlistName2;
    }

    /**
     * Gets the wavSoundName1
     * @return Returns a String
     */
    public String getWavSoundName1() {
        if (this.wavSoundName1 == null) {
            EMBStaticHelper.testTrace("wavSoundName1=" + this.rb.getString("wavSoundName1"));
            this.setWavSoundName1(this.rb.getString("wavSoundName1"));
        }
        return this.wavSoundName1;
    }

    /**
     * Sets the wavSoundName1
     * @param wavSoundName1 The wavSoundName1 to set
     */
    public void setWavSoundName1(String wavSoundName1) {
        this.wavSoundName1 = wavSoundName1;
    }

    /**
     * Gets the writeTrace
     * @return Returns a boolean
     */
    public boolean getWriteTrace() {
        return writeTrace;
    }

    /**
     * Sets the writeTrace
     * @param writeTrace The writeTrace to set
     */
    public void setWriteTrace(boolean writeTrace) {
        this.writeTrace = writeTrace;
    }

    /**
     * Gets the writeLog
     * @return Returns a boolean
     */
    public boolean getWriteLog() {
        return writeLog;
    }

    /**
     * Sets the writeLog
     * @param writeLog The writeLog to set
     */
    public void setWriteLog(boolean writeLog) {
        this.writeLog = writeLog;
    }

    /**
     * Gets the logKnownErrors
     * @return Returns a boolean
     */
    public boolean getLogKnownErrors() {
        return logKnownErrors;
    }

    /**
     * Sets the logKnownErrors
     * @param logKnownErrors The logKnownErrors to set
     */
    public void setLogKnownErrors(boolean logKnownErrors) {
        this.logKnownErrors = logKnownErrors;
    }

    /**
     * Gets the testClientIPAddress
     * @return Returns a String
     */
    public String getTestClientIPAddress() {
        if (this.testClientIPAddress == null) {
            EMBStaticHelper.testTrace("TESTCLIENTIPADDRESS=" + this.rb.getString("TESTCLIENTIPADDRESS"));
            this.setTestClientIPAddress(this.rb.getString("TESTCLIENTIPADDRESS"));
        }
        return testClientIPAddress;
    }

    /**
     * Sets the testClientIPAddress
     * @param testClientIPAddress The testClientIPAddress to set
     */
    public void setTestClientIPAddress(String testClientIPAddress) {
        this.testClientIPAddress = testClientIPAddress;
    }

    /**
     * Gets the gzipCorruptFileName
     * @return Returns a String
     */
    public String getGzipCorruptFileName() {
        if (this.gzipCorruptFileName == null) {
            EMBStaticHelper.testTrace("gzipCorruptFileName=" + this.rb.getString("gzipCorruptFileName"));
            this.setGzipCorruptFileName(this.rb.getString("gzipCorruptFileName"));

        }
        return this.gzipCorruptFileName;
    }

    /**
     * Sets the gzipCorruptFileName
     * @param gzipCorruptFileName The gzipCorruptFileName to set
     */
    public void setGzipCorruptFileName(String gzipCorruptFileName) {
        this.gzipCorruptFileName = gzipCorruptFileName;
    }

    /**
     * Gets the nonEmbeddedMediaClassName
     * @return Returns a String
     */
    public String getNonEmbeddedMediaClassName() {
        if (this.nonEmbeddedMediaClassName == null) {
            EMBStaticHelper.testTrace("nonEmbeddedMediaClassName=" + this.rb.getString("nonEmbeddedMediaClassName"));
            this.setNonEmbeddedMediaClassName(this.rb.getString("nonEmbeddedMediaClassName"));
        }
        return this.nonEmbeddedMediaClassName;
    }

    /**
     * Sets the nonEmbeddedMediaClassName
     * @param nonEmbeddedMediaClassName The nonEmbeddedMediaClassName to set
     */
    public void setNonEmbeddedMediaClassName(String nonEmbeddedMediaClassName) {
        this.nonEmbeddedMediaClassName = nonEmbeddedMediaClassName;
    }

    /**
     * Gets the nonEmbeddedMediaFileExt
     * @return Returns a String
     */
    public String getNonEmbeddedMediaFileExt() {
        if (this.nonEmbeddedMediaFileExt == null) {
            EMBStaticHelper.testTrace("nonEmbeddedMediaFileExt=" + this.rb.getString("nonEmbeddedMediaFileExt"));
            this.setNonEmbeddedMediaFileExt(this.rb.getString("nonEmbeddedMediaFileExt"));
        }
        return this.nonEmbeddedMediaFileExt;
    }

    /**
     * Sets the nonEmbeddedMediaFileExt
     * @param nonEmbeddedMediaFileExt The nonEmbeddedMediaFileExt to set
     */
    public void setNonEmbeddedMediaFileExt(String nonEmbeddedMediaFileExt) {
        this.nonEmbeddedMediaFileExt = nonEmbeddedMediaFileExt;
    }

    /**
     * Gets the nonEmbeddedMediaFile
     * @return Returns a String
     */
    public String getNonEmbeddedMediaFile() {
        if (this.nonEmbeddedMediaFile == null) {
            EMBStaticHelper.testTrace("nonEmbeddedMediaFile=" + this.rb.getString("nonEmbeddedMediaFile"));
            this.setNonEmbeddedMediaFile(this.rb.getString("nonEmbeddedMediaFile"));
        }
        return this.nonEmbeddedMediaFile;
    }

    /**
     * Sets the nonEmbeddedMediaFile
     * @param nonEmbeddedMediaFile The nonEmbeddedMediaFile to set
     */
    public void setNonEmbeddedMediaFile(String nonEmbeddedMediaFile) {
        this.nonEmbeddedMediaFile = nonEmbeddedMediaFile;
    }

    /**
     * Gets the allMediaFormats
     * @return Returns a String
     */
    public String getAllMediaFormats() {
        if (this.allMediaFormats == null) {
            // EMBStaticHelper.testTrace("allMediaFormats=" +
            // this.rb.getString("allMediaFormats"));
            this.setAllMediaFormats(this.rb.getString("allMediaFormats"));
        }
        return this.allMediaFormats;
    }

    /**
     * Sets the allMediaFormats
     * @param allMediaFormats The allMediaFormats to set
     */
    public void setAllMediaFormats(String allMediaFormats) {
        this.allMediaFormats = allMediaFormats;
    }

    /**
     * Gets the allMediaConverterSpecs
     * @return Returns a String
     */
    public String getAllMediaConverterSpecs() {
        if (this.allMediaConverterSpecs == null) {
            EMBStaticHelper.testTrace("allMediaConverterSpecs=" + this.rb.getString("allMediaConverterSpecs"));
            this.setAllMediaConverterSpecs(this.rb.getString("allMediaConverterSpecs"));
        }
        return this.allMediaConverterSpecs;
    }

    /**
     * Sets the allMediaConverterSpecs
     * @param allMediaConverterSpecs The allMediaConverterSpecs to set
     */
    public void setAllMediaConverterSpecs(String allMediaConverterSpecs) {
        this.allMediaConverterSpecs = allMediaConverterSpecs;
    }

    /**
     * Gets the streamServerTypes
     * @return Returns a string
     */
    public String getStreamServerTypes() {
        if (this.streamServerTypes == null) {
            EMBStaticHelper.testTrace("streamServerTypes=" + this.rb.getString("streamServerTypes"));
            this.setStreamServerTypes(this.rb.getString("streamServerTypes"));
        }
        return this.streamServerTypes;
    }

    /**
     * Sets the streamServerTypes
     * @param streamServerTypes The streamServerTypes to set
     */
    public void setStreamServerTypes(String streamServerTypes) {
        this.streamServerTypes = streamServerTypes;
    }

    /**
     * Gets the classSignatureFile
     * @return Returns a string
     */
    public String getClassSignatureFile() {
        if (this.classSignatureFile == null) {
            EMBStaticHelper.testTrace("classSignatureFile=" + this.rb.getString("classSignatureFile"));
            this.setClassSignatureFile(this.rb.getString("classSignatureFile"));
        }
        return this.classSignatureFile;
    }

    /**
     * Sets the classSignatureFile
     * @param classSignatureFile The classSignatureFile to set
     */
    public void setClassSignatureFile(String classSignatureFile) {
        this.classSignatureFile = classSignatureFile;
    }

    /**
     * Gets the listOfClassNamesFile
     * @return Returns a string
     */
    public String getListOfClassNamesFile() {
        if (this.listOfClassNamesFile == null) {
            EMBStaticHelper.testTrace("listOfClassNamesFile=" + this.rb.getString("listOfClassNamesFile"));
            this.setListOfClassNamesFile(this.rb.getString("listOfClassNamesFile"));
        }
        return this.listOfClassNamesFile;
    }

    /**
     * Sets the listOfClassNamesFile
     * @param listOfClassNamesFile The listOfClassNamesFile to set
     */
    public void setListOfClassNamesFile(String listOfClassNamesFile) {
        this.listOfClassNamesFile = listOfClassNamesFile;
    }

    /**
     * Gets the xmlFile1
     * @return Returns a string
     */
    public String getXMLFile1() {
        if (this.xmlFile1 == null) {
            EMBStaticHelper.testTrace("xmlFile1=" + this.rb.getString("xmlFile1"));
            this.setXMLFile1(this.rb.getString("xmlFile1"));
        }
        return this.xmlFile1;
    }

    /**
     * Sets the xmlFile1
     * @param xmlFile1 The xmlFile1 to set
     */
    public void setXMLFile1(String xmlFile1) {
        this.xmlFile1 = xmlFile1;
    }

    /**
     * Gets the xmlFile2
     * @return Returns a string
     */
    public String getXMLFile2() {
        if (this.xmlFile2 == null) {
            EMBStaticHelper.testTrace("xmlFile2=" + this.rb.getString("xmlFile2"));
            this.setXMLFile2(this.rb.getString("xmlFile2"));
        }
        return this.xmlFile2;
    }

    /**
     * Sets the xmlFile2
     * @param xmlFile2 The xmlFile2 to set
     */
    public void setXMLFile2(String xmlFile2) {
        this.xmlFile2 = xmlFile2;
    }

    /**
     * Gets the invalidXMLFile1
     * @return Returns a string
     */
    public String getInvalidXMLFile1() {
        if (this.invalidXMLFile1 == null) {
            EMBStaticHelper.testTrace("invalidXMLFile1=" + this.rb.getString("invalidXMLFile1"));
            this.setInvalidXMLFile1(this.rb.getString("invalidXMLFile1"));
        }
        return this.invalidXMLFile1;
    }

    /**
     * Sets the invalidXMLFile1
     * @param invalidXMLFile1 The invalidXMLFile1 to set
     */
    public void setInvalidXMLFile1(String invalidXMLFile1) {
        this.invalidXMLFile1 = invalidXMLFile1;
    }

    /**
     * Gets the invalidXMLFile2
     * @return Returns a string
     */
    public String getInvalidXMLFile2() {
        if (this.invalidXMLFile2 == null) {
            EMBStaticHelper.testTrace("invalidXMLFile2=" + this.rb.getString("invalidXMLFile2"));
            this.setInvalidXMLFile2(this.rb.getString("invalidXMLFile2"));
        }
        return this.invalidXMLFile1;
    }

    /**
     * Sets the invalidXMLFile2
     * @param invalidXMLFile2 The invalidXMLFile2 to set
     */
    public void setInvalidXMLFile2(String invalidXMLFile2) {
        this.invalidXMLFile2 = invalidXMLFile2;
    }

    /**
     * Gets the queryLanguages
     * @return Returns a string
     */
    public String getQueryLanguages() {
        if (this.queryLanguages == null) {
            EMBStaticHelper.testTrace("queryLanguages=" + this.rb.getString("queryLanguages"));
            this.setQueryLanguages(this.rb.getString("queryLanguages"));
        }
        return this.queryLanguages;
    }

    /**
     * Sets the queryLanguages
     * @param queryLanguages The queryLanguages to set
     */
    public void setQueryLanguages(String queryLanguages) {
        this.queryLanguages = queryLanguages;
    }

    /**
     * Gets the mediaListeners
     * @return Returns a string
     */
    public String getMediaListeners() {
        if (this.mediaListeners == null) {
            EMBStaticHelper.testTrace("mediaListeners=" + this.rb.getString("mediaListeners"));
            this.setMediaListeners(this.rb.getString("mediaListeners"));
        }
        return this.mediaListeners;
    }

    /**
     * Sets the mediaListeners
     * @param mediaListeners The mediaListeners to set
     */
    public void setMediaListeners(String mediaListeners) {
        this.mediaListeners = mediaListeners;
    }

    /**
     * Gets the maxMediaSize
     * @return Returns a string
     */
    public String getMaxMediaSize() {
        if (this.maxMediaSize == null) {
            EMBStaticHelper.testTrace("maxMediaSize=" + this.rb.getString("maxMediaSize"));
            this.setMaxMediaSize(this.rb.getString("maxMediaSize"));
        }
        return this.maxMediaSize;
    }

    /**
     * Sets the maxMediaSize
     * @param maxMediaSize The maxMediaSize to set
     */
    public void setMaxMediaSize(String maxMediaSize) {
        this.maxMediaSize = maxMediaSize;
    }
}