org.naftulin.configmgr
Interface ConfigurationManagementEntry

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ConfigurationManagementEntryImpl

public interface ConfigurationManagementEntry
extends java.io.Serializable

Configuration management entry associates a key to a configuration, stored as a content. In addition to key and content, it registers the file name from which a configuration was read, whether the configuration is in an error state, and whether or not it was overwritten. The entry is considered to be in error, if it cannot be parsed from the configuration file. In such case, instead of the configuration, an exception would be stored in the configuration entry content. If the configuration in error is requested, the exception is returned. The owervritten stands flag is to show whether a configuration was programmatically ovewrittend (by using add configuration method. Otherwise it is false; it is also reset when reload is called on ConfigurationManagement. It could also be set by user.

Since:
1.0
Author:
Henry Naftulin

Method Summary
 ConfigurationType getConfigurationType()
          Returns the configuration type of this entry.
 java.lang.Object getContent()
          Returns the parsed configuration.
 java.util.Date getCreateDate()
          Returns the date and time when this entry was created.
 java.lang.String getFileName()
          Returns the file name from where the configuration was read.
 java.lang.String getKey()
          Returns configuration the key associated with this record.
 java.util.Date getModifiedDate()
          Returns the date and time when this entry was modified.
 ConfigEntryParser getProcessor()
          Returns the processor that parsed the cofiguration from the configuration file.
 boolean isError()
          Returns true if the record is in error state.
 boolean isOverwritten()
          Returns true if the record was overwritten.
 void setModifiedDate(java.util.Date modifiedDate)
          Sets the date the entry was modified.
 void setOverwritten(boolean overwritten)
          Sets the owerwritten flag.
 java.lang.String toString()
          Returns the string representation of this entry.
 

Method Detail

getKey

java.lang.String getKey()
Returns configuration the key associated with this record.

Returns:
configuration the key associated with this record.

getFileName

java.lang.String getFileName()
Returns the file name from where the configuration was read.

Returns:
the file name from where the configuration was read.

isOverwritten

boolean isOverwritten()
Returns true if the record was overwritten.

Returns:
true if the record was overwritten.

isError

boolean isError()
Returns true if the record is in error state.

Returns:
true if the record is in error state.

getContent

java.lang.Object getContent()
Returns the parsed configuration.

Returns:
the parsed configuration.

toString

java.lang.String toString()
Returns the string representation of this entry.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this entry.

getCreateDate

java.util.Date getCreateDate()
Returns the date and time when this entry was created.

Returns:
the date and time when this entry was created.

getModifiedDate

java.util.Date getModifiedDate()
Returns the date and time when this entry was modified.

Returns:
the date and time when this entry was modified.

setModifiedDate

void setModifiedDate(java.util.Date modifiedDate)
Sets the date the entry was modified.

Parameters:
modifiedDate - modified date

getProcessor

ConfigEntryParser getProcessor()
Returns the processor that parsed the cofiguration from the configuration file.

Returns:
the processor that parsed the cofiguration from the configuration file.

setOverwritten

void setOverwritten(boolean overwritten)
Sets the owerwritten flag.

Parameters:
overwritten - true if the record was overwritten.

getConfigurationType

ConfigurationType getConfigurationType()
Returns the configuration type of this entry.

Returns:
the configuration type of this entry.


Copyright © 2009. All Rights Reserved.