DESY ACOP Beans Home

com.cosylab.application.state.impl
Class TextStateStorage

java.lang.Object
  extended by com.cosylab.application.state.impl.DefaultStateStorage
      extended by com.cosylab.application.state.impl.TextStateStorage
All Implemented Interfaces:
StateStorage

public class TextStateStorage
extends DefaultStateStorage

This class is an implementation of the StateStorage that uses simple text file to store the array of the State objects. Stored file is the plain java.util.Properties file format with the few 'weird' properties added which are used for fast hierarchy resolving.

Author:
dvitas

Field Summary
protected static java.lang.String childDelimiter
           
protected static java.lang.String stateEnd
           
protected static java.lang.String stateStart
           
 
Fields inherited from class com.cosylab.application.state.impl.DefaultStateStorage
delegate, states
 
Constructor Summary
TextStateStorage()
           
TextStateStorage(StateStorage ss)
          Creates a new TextStateStorage object.
 
Method Summary
 void load(java.io.InputStream is)
          DOCUMENT ME!
 void load(java.lang.String filePath, java.lang.String applicationName)
          DOCUMENT ME! TODO: Add load(InputStream, String) to support loading from non-file sources!
 void store(java.io.OutputStream os)
          DOCUMENT ME!
 void store(java.lang.String filePath, java.lang.String applicationName)
          DOCUMENT ME!
 
Methods inherited from class com.cosylab.application.state.impl.DefaultStateStorage
add, addAll, contains, getInputStream, getOutputStream, getStates, iterator, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stateStart

protected static final java.lang.String stateStart
See Also:
Constant Field Values

stateEnd

protected static final java.lang.String stateEnd
See Also:
Constant Field Values

childDelimiter

protected static final java.lang.String childDelimiter
See Also:
Constant Field Values
Constructor Detail

TextStateStorage

public TextStateStorage()

TextStateStorage

public TextStateStorage(StateStorage ss)
Creates a new TextStateStorage object.

Parameters:
ss - DOCUMENT ME!
Method Detail

load

public void load(java.lang.String filePath,
                 java.lang.String applicationName)
          throws java.io.IOException
Description copied from interface: StateStorage
DOCUMENT ME! TODO: Add load(InputStream, String) to support loading from non-file sources!

Specified by:
load in interface StateStorage
Specified by:
load in class DefaultStateStorage
Parameters:
filePath - DOCUMENT ME!
applicationName - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!

load

public void load(java.io.InputStream is)
          throws java.io.IOException
Description copied from interface: StateStorage
DOCUMENT ME!

Parameters:
is - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!

store

public void store(java.lang.String filePath,
                  java.lang.String applicationName)
           throws java.io.IOException
Description copied from class: DefaultStateStorage
DOCUMENT ME!

Specified by:
store in interface StateStorage
Specified by:
store in class DefaultStateStorage
Parameters:
filePath - DOCUMENT ME!
applicationName - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!

store

public void store(java.io.OutputStream os)
           throws java.io.IOException
Description copied from interface: StateStorage
DOCUMENT ME!

Throws:
java.io.IOException - DOCUMENT ME!


Copyright © 2010. All Rights Reserved.