|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.naftulin.configmgr.ConfigurationManagementEntryImpl
public class ConfigurationManagementEntryImpl
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.
| Constructor Summary | |
|---|---|
ConfigurationManagementEntryImpl(java.lang.String key,
java.lang.String fileName,
java.lang.Object content,
ConfigEntryParser processor,
ConfigurationType configurationType)
Creates a configuration management entry. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Returns true if the object equals to this record. |
ConfigurationType |
getConfigurationType()
Returns the configuration type of this entry. |
java.lang.Object |
getContent()
Returns the content of the entry |
java.util.Date |
getCreateDate()
Returns the create date for this entry |
java.lang.String |
getFileName()
Returns file name associated with the entry |
java.lang.String |
getKey()
Returns key for the entry |
java.util.Date |
getModifiedDate()
Returns the date and time when this entry was modified. |
ConfigEntryParser |
getProcessor()
Returns the processor for this entry |
int |
hashCode()
Returns hashcode of this record. |
boolean |
isError()
Returns true if the configuration does not have a key, or file name is not associated with the entry or there is no processor associated with the entry. |
boolean |
isOverwritten()
Returns true if this entry overwrote another entry with the same key. |
void |
setModifiedDate(java.util.Date modifiedDate)
Sets the date the entry was modified. |
void |
setOverwritten(boolean overwritten)
Sets overwritten flag. |
java.lang.String |
toString()
Returns the string representation of this entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationManagementEntryImpl(java.lang.String key,
java.lang.String fileName,
java.lang.Object content,
ConfigEntryParser processor,
ConfigurationType configurationType)
key - the key entry is stored underfileName - file that is associated with the entry. Usually file that the entry is read from.content - the content of the entry. For example properties object.processor - the processor that can process entry| Method Detail |
|---|
public java.lang.String getKey()
getKey in interface ConfigurationManagementEntrypublic java.lang.String getFileName()
getFileName in interface ConfigurationManagementEntrypublic void setOverwritten(boolean overwritten)
setOverwritten in interface ConfigurationManagementEntryoverwritten - public boolean isOverwritten()
isOverwritten in interface ConfigurationManagementEntrypublic boolean isError()
isError in interface ConfigurationManagementEntrypublic java.lang.Object getContent()
getContent in interface ConfigurationManagementEntrypublic java.util.Date getCreateDate()
getCreateDate in interface ConfigurationManagementEntrypublic ConfigEntryParser getProcessor()
getProcessor in interface ConfigurationManagementEntrypublic java.lang.String toString()
toString in interface ConfigurationManagementEntrytoString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.Date getModifiedDate()
getModifiedDate in interface ConfigurationManagementEntrypublic ConfigurationType getConfigurationType()
getConfigurationType in interface ConfigurationManagementEntrypublic void setModifiedDate(java.util.Date modifiedDate)
ConfigurationManagementEntry
setModifiedDate in interface ConfigurationManagementEntrymodifiedDate - modified date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||