biz.c24.io.api.data
Class RedefineManager

java.lang.Object
  extended by biz.c24.io.api.data.RedefineManager

public final class RedefineManager
extends Object

A static utility class used to selectivley enable redefines during component initialization.
To apply a redefine, one or more data models which contain redefine references should be registered with the singleton instance of this class. All type hierarchies instantiated from that point on will check this class for registered redefines.


Method Summary
 void clear()
          Clears all registered models.
static RedefineManager getInstance()
          Returns the singleton instance of this class.
 boolean isEmpty()
          Returns whether any models are currently registered.
 boolean isRegistered(DataModel model)
          Returns whether the specified model is registered.
 DataComponent redefine(DataComponent redefined)
          Attempts to find a redefine for redefined among the registered models.
 DataType redefine(DataType redefined)
          Attempts to find a redefine for redefined among the registered models.
 void register(DataModel[] models)
          Registers the specified set of models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RedefineManager getInstance()
Returns the singleton instance of this class.

Returns:
The singleton instance.

register

public void register(DataModel[] models)
Registers the specified set of models.

Parameters:
models - The models to register.

clear

public void clear()
Clears all registered models.


isRegistered

public boolean isRegistered(DataModel model)
Returns whether the specified model is registered.

Parameters:
model - The model to test for.
Returns:
Whether it is registered.

isEmpty

public boolean isEmpty()
Returns whether any models are currently registered.

Returns:
Whether there are any registered models.

redefine

public DataType redefine(DataType redefined)
Attempts to find a redefine for redefined among the registered models.

Parameters:
redefined - The type to check for.
Returns:
The redefining type or redefined if non could be found.

redefine

public DataComponent redefine(DataComponent redefined)
Attempts to find a redefine for redefined among the registered models.

Parameters:
redefined - The component to check for.
Returns:
The redefining component or redefined if non could be found.


C24 Technologies © 2002-2012: All Rights Reserved.