org.naftulin.configmgr.content
Class JndiRecordImpl

java.lang.Object
  extended by org.naftulin.configmgr.content.AbstractRecordImpl
      extended by org.naftulin.configmgr.content.JndiRecordImpl

public class JndiRecordImpl
extends AbstractRecordImpl

Represents a jndi entry, with it's key, name-value pairs and parser class. Intended to mirror master configuration rules for external configuration. The external configuraton xml is:

        <jndi key="the key"
                initialContextFactory="optional contenxt factory" 
                jndiName="jdni name"            
 
 >
                <param name="key1" value="value1" />
                .....
                <param name="keyn" value="valuen" />
        </jndi>
 

Since:
1.3
Author:
Henry Henry

Constructor Summary
JndiRecordImpl()
           
 
Method Summary
 void addNameValuePair(NameValuePairImpl nv)
          Adds a name-value pair as it is read from the master configuration.
 java.lang.String getFileName()
          Returns the file name associated with the record.
 java.lang.String getInitialContextFactory()
           
 java.lang.String getJndiName()
           
 java.util.List<NameValuePairImpl> getNameValuePairs()
           
 ConfigEntryParser getParser()
          Returns the parser that can parse the file to extract the configuration.
 boolean isGetUrlForFile()
          Since it is not a file-based cofiguration, we need to overwrite the method.
 void setInitialContextFactory(java.lang.String initialContextFactory)
           
 void setJndiName(java.lang.String jndiName)
           
 
Methods inherited from class org.naftulin.configmgr.content.AbstractRecordImpl
getKey, setFileName, setKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JndiRecordImpl

public JndiRecordImpl()
Method Detail

getNameValuePairs

public java.util.List<NameValuePairImpl> getNameValuePairs()

addNameValuePair

public void addNameValuePair(NameValuePairImpl nv)
Adds a name-value pair as it is read from the master configuration.

Parameters:
nv - the name value pair.

getInitialContextFactory

public java.lang.String getInitialContextFactory()

setInitialContextFactory

public void setInitialContextFactory(java.lang.String initialContextFactory)

getJndiName

public java.lang.String getJndiName()

setJndiName

public void setJndiName(java.lang.String jndiName)

getParser

public ConfigEntryParser getParser()
                            throws ConfigurationManagerException
Description copied from class: AbstractRecordImpl
Returns the parser that can parse the file to extract the configuration.

Specified by:
getParser in class AbstractRecordImpl
Returns:
the parser that can parse the file to extract the configuration.
Throws:
ConfigurationManagerException - if an error occured while instantiating the parser.

isGetUrlForFile

public boolean isGetUrlForFile()
Since it is not a file-based cofiguration, we need to overwrite the method.

Overrides:
isGetUrlForFile in class AbstractRecordImpl
Returns:
false

getFileName

public java.lang.String getFileName()
Description copied from class: AbstractRecordImpl
Returns the file name associated with the record.

Overrides:
getFileName in class AbstractRecordImpl
Returns:
the file name associated with the record.


Copyright © 2009. All Rights Reserved.