|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jtheque.core.managers.properties.PropertiesManager
public final class PropertiesManager
A properties manager implementation.
Constructor Summary | |
---|---|
PropertiesManager()
|
Method Summary | ||
---|---|---|
void |
close()
Close the manager. |
|
|
createMemento(T bean)
Create a memento for the bean. |
|
java.util.List<Property> |
getProperties(java.lang.Object bean)
Return all the properties of a bean. |
|
java.lang.Object |
getProperty(java.lang.Object bean,
Property property)
Return the value of a property. |
|
java.lang.Object |
getProperty(java.lang.Object bean,
java.lang.String property)
Return the value of a property. |
|
int |
hashCode(java.lang.Object bean)
Generate a hashcode for the bean. |
|
void |
init()
Init the manager. |
|
boolean |
isEnabled()
Indicate if the manager is enabled or not. |
|
void |
preInit()
Pre-init the manager. |
|
void |
restoreMemento(java.lang.Object bean,
java.lang.Object memento)
Restore the state of the memento. |
|
void |
setEnabled(boolean enabled)
Enable or disable the manager. |
|
java.lang.String |
toString(java.lang.Object bean)
Generate a toString() String based on all the properties of the bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesManager()
Method Detail |
---|
public void preInit()
IManager
preInit
in interface IManager
public void init() throws ManagerException
IManager
init
in interface IManager
ManagerException
- If an error occurs during the init process.public void close() throws ManagerException
IManager
close
in interface IManager
ManagerException
- If an error occurs during the close process.public boolean isEnabled()
ActivableManager
isEnabled
in interface ActivableManager
public void setEnabled(boolean enabled)
ActivableManager
setEnabled
in interface ActivableManager
enabled
- true if we want enable the manager else false.public java.util.List<Property> getProperties(java.lang.Object bean) throws PropertyException
IPropertiesManager
getProperties
in interface IPropertiesManager
bean
- The bean to extract the properties from.
PropertyException
- If an errors occurs during the recuperation of the properties.public java.lang.Object getProperty(java.lang.Object bean, Property property)
IPropertiesManager
getProperty
in interface IPropertiesManager
bean
- The bean to get the property value from.property
- The property.
public java.lang.Object getProperty(java.lang.Object bean, java.lang.String property)
IPropertiesManager
getProperty
in interface IPropertiesManager
bean
- The bean to get the property value from.property
- The property.
public <T> T createMemento(T bean)
IPropertiesManager
createMemento
in interface IPropertiesManager
T
- The class of the bean.bean
- The bean to create the memento from.
public void restoreMemento(java.lang.Object bean, java.lang.Object memento)
IPropertiesManager
restoreMemento
in interface IPropertiesManager
bean
- The bean.memento
- The memento.public java.lang.String toString(java.lang.Object bean)
IPropertiesManager
toString
in interface IPropertiesManager
bean
- The bean.
public int hashCode(java.lang.Object bean)
IPropertiesManager
hashCode
in interface IPropertiesManager
bean
- The bean.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |