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(Collection<NodeState> nodes)
          Delegate the load.
 Collection<NodeState> delegateSave()
          Delegate the save.
 Collection<String> getProperties()
          Return all the properties of the state.
 String getProperty(String key)
          Return the property referenced by a certain key.
 String getProperty(String key, 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 state manager.
 void setProperty(String key, String value)
          Set the property.
 

Method Detail

getProperty

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

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

getProperty

String getProperty(String key,
                   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(String key,
                 String value)
Set the property.

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

getProperties

Collection<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 state manager.

Returns:
true if the operations are delegated else false.

delegateSave

Collection<NodeState> delegateSave()
Delegate the save.

Returns:
A List of NodeState to write.

delegateLoad

void delegateLoad(Collection<NodeState> nodes)
Delegate the load.

Parameters:
nodes - The nodes of the state.


Copyright © 2010 JTheque. All Rights Reserved.