org.deduced
Interface ModelFactory

All Known Subinterfaces:
TypeBasedModelFactory
All Known Implementing Classes:
DefaultModelFactory, DynamicModelFactory, FlyWheelTypeBasedControllerFactory

public interface ModelFactory

A Model Factory is used to create models in a layer of a deduced application.

Author:
Steve McDuff

Method Summary
 PropertyCollection<?,?> createModel(PropertyCollection<?,?> type)
          Create Model.
 PropertyCollection<?,?> createModel(PropertyCollection<?,?> type, boolean activated)
          allows the creation of property collections that are activated or not.
 

Method Detail

createModel

PropertyCollection<?,?> createModel(PropertyCollection<?,?> type)
                                    throws ModelCreationFailedException
Create Model. The method will throw ModelCreationFailedException if the creation fails.

Parameters:
type - the type of model to create
Returns:
the created model
Throws:
ModelCreationFailedException - if the creation fails.

createModel

PropertyCollection<?,?> createModel(PropertyCollection<?,?> type,
                                    boolean activated)
                                    throws ModelCreationFailedException
allows the creation of property collections that are activated or not. Not activated collections will not create and execute deduction rules. It is the responsibility of the caller to activate the collection at a later point. The method will throw ModelCreationFailedException if the creation fails.

Parameters:
type - type of collection to create
activated - is activated or not
Returns:
the created collection.
Throws:
ModelCreationFailedException - if the creation fails.