Package org.puremvc.java.interfaces
Interface IModel
- All Known Implementing Classes:
Model
public interface IModel
The interface definition for a PureMVC Model.
In PureMVC, IModel implementors provide
access to IProxy objects by named lookup.
An IModel assumes these responsibilities:
- Maintain a cache of
IProxyinstances - Provide methods for registering, retrieving, and removing
IProxyinstances
-
Method Summary
Modifier and Type Method Description booleanhasProxy(java.lang.String proxyName)Check if a Proxy is registeredvoidregisterProxy(IProxy proxy)Register anIProxyinstance with theModel.IProxyremoveProxy(java.lang.String proxyName)Remove anIProxyinstance from the Model.IProxyretrieveProxy(java.lang.String proxyName)Retrieve anIProxyinstance from the Model.
-
Method Details
-
registerProxy
Register an
IProxyinstance with theModel.- Parameters:
proxy- an object reference to be held by theModel.
-
retrieveProxy
Retrieve an
IProxyinstance from the Model.- Parameters:
proxyName- proxy name- Returns:
- the
IProxyinstance previously registered with the givenproxyName.
-
removeProxy
Remove an
IProxyinstance from the Model.- Parameters:
proxyName- name of theIProxyinstance to be removed.- Returns:
- the
IProxythat was removed from theModel
-
hasProxy
boolean hasProxy(java.lang.String proxyName)Check if a Proxy is registered
- Parameters:
proxyName- proxy name- Returns:
- whether a Proxy is currently registered with the given
proxyName.
-