org.jtheque.core.managers.state
Interface IState

All Known Implementing Classes:
AbstractState, CoreConfiguration, LanguageState, ModuleConfiguration, SchemaConfiguration, UpdatableState, WindowsConfiguration

public interface IState

A state. It's a persistent object manager by the state manager. This object permit to store certain property to recover it after the application has been exited.

Author:
Baptiste Wicht

Method Summary
 void delegateLoad(java.util.List<NodeState> nodes)
          Delegate the load.
 java.util.List<NodeState> delegateSave()
          Delegate the save.
 java.util.List<java.lang.String> getProperties()
          Return all the properties of the state.
 java.lang.String getProperty(java.lang.String key)
          Return the property referenced by a certain key.
 java.lang.String getProperty(java.lang.String key, java.lang.String defaults)
          Return the property referenced by a certain key or a default value if the property doesn't exist.
 boolean isDelegated()
          Indicate if the write and read operations are delegated to the state or are standard managed by the statemanager.
 void setProperty(java.lang.String key, java.lang.String value)
          Set the property.
 

Method Detail

getProperty

java.lang.String getProperty(java.lang.String key)
Return the property referenced by a certain key.

Parameters:
key - The property key.
Returns:
The property.

getProperty

java.lang.String getProperty(java.lang.String key,
                             java.lang.String defaults)
Return the property referenced by a certain key or a default value if the property doesn't exist.

Parameters:
key - The property key.
defaults - The default value if we don't find the property.
Returns:
The property or the default value if the property doesn't exist.

setProperty

void setProperty(java.lang.String key,
                 java.lang.String value)
Set the property.

Parameters:
key - The property key.
value - The property value.

getProperties

java.util.List<java.lang.String> getProperties()
Return all the properties of the state.

Returns:
A List containing all the properties of the state.

isDelegated

boolean isDelegated()
Indicate if the write and read operations are delegated to the state or are standard managed by the statemanager.

Returns:
true if the operations are delegated else false.

delegateSave

java.util.List<NodeState> delegateSave()
Delegate the save.

Returns:
A List of NodeState to write.

delegateLoad

void delegateLoad(java.util.List<NodeState> nodes)
Delegate the load.

Parameters:
nodes - The noads of the state.


Copyright © 2009 JTheque. All Rights Reserved.