|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.puremvc.java.core.Model
public class Model
A Singleton IModel implementation.
In PureMVC, the Model class provides
access to model objects (Proxies) by named lookup.
The Model assumes these responsibilities:
IProxy instances.IProxy instances.
Your application must register IProxy instances
with the Model. Typically, you use an
ICommand to create and register IProxy
instances once the Facade has initialized the Core
actors.
Proxy,
IProxy| Field Summary | |
|---|---|
protected static Model |
instance
Singleton instance |
protected java.util.Map<java.lang.String,IProxy> |
proxyMap
Mapping of proxyNames to IProxy instances |
| Constructor Summary | |
|---|---|
protected |
Model()
Constructor. |
| Method Summary | |
|---|---|
static Model |
getInstance()
Model Multiton Factory method. |
boolean |
hasProxy(java.lang.String proxyName)
Check if a Proxy is registered |
protected void |
initializeModel()
Initialize the Singleton Model instance. |
void |
registerProxy(IProxy proxy)
Register an Proxy with the Model. |
IProxy |
removeProxy(java.lang.String proxyName)
Remove an Proxy from the Model. |
IProxy |
retrieveProxy(java.lang.String proxy)
Retrieve an Proxy from the Model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Model instance
protected java.util.Map<java.lang.String,IProxy> proxyMap
| Constructor Detail |
|---|
protected Model()
This IModel implementation is a Multiton,
so you should not call the constructor
directly, but instead call the static Multiton
Factory method Model.getInstance( multitonKey )
java.lang.Error - Error if instance for this Multiton key instance has already been constructed| Method Detail |
|---|
protected void initializeModel()
Model instance.
Called automatically by the constructor, this is your opportunity to initialize the Singleton instance in your subclass without overriding the constructor.
public static Model getInstance()
Model Multiton Factory method.
public void registerProxy(IProxy proxy)
Proxy with the Model.
registerProxy in interface IModelproxy - an Proxy to be held by the Model.public IProxy removeProxy(java.lang.String proxyName)
Proxy from the Model.
removeProxy in interface IModelproxyName - Name of the Proxy instance to be removed.
IProxy that was removed from the Modelpublic IProxy retrieveProxy(java.lang.String proxy)
Proxy from the Model.
retrieveProxy in interface IModelproxy -
Proxy instance previously registered with the
given proxyName.public boolean hasProxy(java.lang.String proxyName)
hasProxy in interface IModelproxyName - Name of the Proxy object to check for existance.
proxyName.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||