org.mbari.siam.configt
Class ConfigItem

java.lang.Object
  extended by org.mbari.siam.configt.ConfigItem

public class ConfigItem
extends java.lang.Object


Field Summary
protected  ConfigFile _configFile
           
protected  HTMLControl _control
           
protected  boolean _defaultOnUnset
           
protected  java.lang.String _exportRegexp
           
protected  java.lang.String _importRegexp
           
protected  java.lang.String _itemRef
           
protected static org.apache.log4j.Logger _logger
           
protected  java.lang.String _name
           
protected  java.lang.String _pageID
           
protected  boolean _replaceInComments
           
protected  java.lang.String _validateRegexp
           
protected  java.lang.String _valueRef
           
protected  boolean _writeFlag
           
 
Constructor Summary
ConfigItem()
           
ConfigItem(ConfigItem configItem, java.lang.String value)
           
ConfigItem(java.lang.String name, ConfigFile configFile, java.lang.String pageID, HTMLControl control, java.lang.String importRegexp, java.lang.String exportRegexp, java.lang.String itemRef, java.lang.String valueRef)
           
ConfigItem(java.lang.String name, ConfigFile configFile, java.lang.String pageID, HTMLControl control, java.lang.String importRegexp, java.lang.String exportRegexp, java.lang.String itemRef, java.lang.String valueRef, boolean replaceInComments)
           
ConfigItem(java.lang.String name, ConfigFile configFile, java.lang.String pageID, java.lang.String importRegexp, java.lang.String itemRef)
           
ConfigItem(java.lang.String name, java.lang.String[] values, boolean strictValues)
           
ConfigItem(java.lang.String name, java.lang.String value, boolean strict)
           
 
Method Summary
 boolean defaultOnUnset()
           
 ConfigFile getConfigFile()
           
 HTMLControl getControl()
           
 java.lang.String getExportRegexp()
           
 java.lang.String getHTML()
           
 java.lang.String getImportRegexp()
           
 java.lang.String getItemRef()
           
 java.lang.String getName()
           
 java.lang.String getPageID()
           
 int getType()
           
 java.lang.String getValidateRegexp()
           
 java.lang.String getValue()
           
 java.lang.String getValue(boolean getDisplayValue)
          Get current value of configuration item If getDisplayValue=true, returns value displayed to user otherwise, it will attempt to return the defined mapped output value, if it exists.
 java.lang.String getValueRef()
           
 boolean getWriteFlag()
           
 boolean isStrict()
           
 boolean replaceInComments()
           
 void setDefaultOnUnset(boolean value)
           
 void setItemRef(java.lang.String itemRef)
           
 void setValue(java.lang.String value)
           
 void setValue(java.lang.String value, java.lang.String dflt)
           
 void setValueRef(java.lang.String valueRef)
           
 void setWriteFlag(boolean value)
           
 java.lang.String show()
           
 java.lang.String toString()
           
 boolean validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_logger

protected static org.apache.log4j.Logger _logger

_name

protected java.lang.String _name

_configFile

protected ConfigFile _configFile

_pageID

protected java.lang.String _pageID

_control

protected HTMLControl _control

_importRegexp

protected java.lang.String _importRegexp

_exportRegexp

protected java.lang.String _exportRegexp

_validateRegexp

protected java.lang.String _validateRegexp

_itemRef

protected java.lang.String _itemRef

_valueRef

protected java.lang.String _valueRef

_replaceInComments

protected boolean _replaceInComments

_writeFlag

protected boolean _writeFlag

_defaultOnUnset

protected boolean _defaultOnUnset
Constructor Detail

ConfigItem

public ConfigItem()

ConfigItem

public ConfigItem(java.lang.String name,
                  ConfigFile configFile,
                  java.lang.String pageID,
                  HTMLControl control,
                  java.lang.String importRegexp,
                  java.lang.String exportRegexp,
                  java.lang.String itemRef,
                  java.lang.String valueRef,
                  boolean replaceInComments)

ConfigItem

public ConfigItem(java.lang.String name,
                  ConfigFile configFile,
                  java.lang.String pageID,
                  HTMLControl control,
                  java.lang.String importRegexp,
                  java.lang.String exportRegexp,
                  java.lang.String itemRef,
                  java.lang.String valueRef)

ConfigItem

public ConfigItem(java.lang.String name,
                  ConfigFile configFile,
                  java.lang.String pageID,
                  java.lang.String importRegexp,
                  java.lang.String itemRef)

ConfigItem

public ConfigItem(ConfigItem configItem,
                  java.lang.String value)

ConfigItem

public ConfigItem(java.lang.String name,
                  java.lang.String value,
                  boolean strict)

ConfigItem

public ConfigItem(java.lang.String name,
                  java.lang.String[] values,
                  boolean strictValues)
Method Detail

getName

public java.lang.String getName()

getPageID

public java.lang.String getPageID()

getConfigFile

public ConfigFile getConfigFile()

getType

public int getType()

getControl

public HTMLControl getControl()

getImportRegexp

public java.lang.String getImportRegexp()

getExportRegexp

public java.lang.String getExportRegexp()

getValidateRegexp

public java.lang.String getValidateRegexp()

getHTML

public java.lang.String getHTML()

getValue

public java.lang.String getValue()

isStrict

public boolean isStrict()

getValue

public java.lang.String getValue(boolean getDisplayValue)
Get current value of configuration item If getDisplayValue=true, returns value displayed to user otherwise, it will attempt to return the defined mapped output value, if it exists. If there is no output mapping defined, the display value will be returned.


setValue

public void setValue(java.lang.String value)
              throws java.lang.Exception
Throws:
java.lang.Exception

setValue

public void setValue(java.lang.String value,
                     java.lang.String dflt)
              throws java.lang.Exception
Throws:
java.lang.Exception

getItemRef

public java.lang.String getItemRef()

setItemRef

public void setItemRef(java.lang.String itemRef)

getValueRef

public java.lang.String getValueRef()

setValueRef

public void setValueRef(java.lang.String valueRef)

setWriteFlag

public void setWriteFlag(boolean value)

getWriteFlag

public boolean getWriteFlag()

replaceInComments

public boolean replaceInComments()

validate

public boolean validate()

setDefaultOnUnset

public void setDefaultOnUnset(boolean value)

defaultOnUnset

public boolean defaultOnUnset()

toString

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

show

public java.lang.String show()


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.