DESY ACOP Beans Home

com.cosylab.application.state
Class StateFactory

java.lang.Object
  extended by com.cosylab.application.state.StateFactory

public final class StateFactory
extends java.lang.Object

This class is used as the factory for the state exchange objects mainly the State implementation and the StateStorage implementation.

Author:
dvitas

Field Summary
static java.lang.String defaultstateStorage
          DOCUMENT ME!
static java.util.HashMap stateStorages
          DOCUMENT ME!
static java.lang.String STORAGE_BIN
          DOCUMENT ME!
static java.lang.String STORAGE_CDB
          DOCUMENT ME!
static java.lang.String STORAGE_DAT
          DOCUMENT ME!
static java.lang.String STORAGE_TXT
          DOCUMENT ME!
static java.lang.String STORAGE_XML
          DOCUMENT ME!
 
Constructor Summary
StateFactory()
           
 
Method Summary
static State createState()
          Creates new storage with default ID.
static StateStorage createStateStorage()
          DOCUMENT ME!
static StateStorage createStateStorage(java.lang.String type)
          DOCUMENT ME!
static StateStorage createStateStorage(java.lang.String filePath, java.lang.String appName)
          DOCUMENT ME!
static void registerStateStorage(java.lang.String type, java.lang.String className)
          DOCUMENT ME!
static void setDefaultStateStorage(java.lang.String type)
          DOCUMENT ME!
protected static boolean typeExists(java.io.File[] files, java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STORAGE_BIN

public static final java.lang.String STORAGE_BIN
DOCUMENT ME!

See Also:
Constant Field Values

STORAGE_TXT

public static final java.lang.String STORAGE_TXT
DOCUMENT ME!

See Also:
Constant Field Values

STORAGE_XML

public static final java.lang.String STORAGE_XML
DOCUMENT ME!

See Also:
Constant Field Values

STORAGE_CDB

public static final java.lang.String STORAGE_CDB
DOCUMENT ME!

See Also:
Constant Field Values

STORAGE_DAT

public static final java.lang.String STORAGE_DAT
DOCUMENT ME!

See Also:
Constant Field Values

stateStorages

public static java.util.HashMap stateStorages
DOCUMENT ME!


defaultstateStorage

public static java.lang.String defaultstateStorage
DOCUMENT ME!

Constructor Detail

StateFactory

public StateFactory()
Method Detail

registerStateStorage

public static void registerStateStorage(java.lang.String type,
                                        java.lang.String className)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
className - DOCUMENT ME!

setDefaultStateStorage

public static void setDefaultStateStorage(java.lang.String type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!

typeExists

protected static boolean typeExists(java.io.File[] files,
                                    java.lang.String type)

createStateStorage

public static StateStorage createStateStorage(java.lang.String filePath,
                                              java.lang.String appName)
DOCUMENT ME!

Parameters:
filePath - DOCUMENT ME!
appName - DOCUMENT ME!
Returns:
DOCUMENT ME!

createStateStorage

public static StateStorage createStateStorage()
DOCUMENT ME!

Returns:
DOCUMENT ME!

createStateStorage

public static StateStorage createStateStorage(java.lang.String type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

createState

public static State createState()
Creates new storage with default ID.

Returns:
no-name storage


Copyright © 2010. All Rights Reserved.