Protected
Optional
controllerReference to Controller
Protected
Optional
modelReference to Model
Protected
Optional
viewReference to View
Protected
Static
instanceSingleton instance
Protected
Static
SINGLETON_Message Constants
Protected
initializeInitialize the Controller
.
Called by the initializeFacade
method.
Override this method in your subclass of Facade
if one or both of the following are true:
Controller
.Commands
to register with the Controller
at startup.`.If you don't want to initialize a different Controller
,
call super.initializeController()
at the beginning of your
method, then register Command
s.
Protected
initializeProtected
initializeInitialize the Model
.
Called by the initializeFacade
method.
Override this method in your subclass of Facade
if one or both of the following are true:
Model
.Proxy
s to register with the Model that do not
retrieve a reference to the Facade at construction time.`If you don't want to initialize a different Model
,
call super.initializeModel()
at the beginning of your
method, then register Proxy
s.
Note: This method is rarely overridden; in practice you are more
likely to use a Command
to create and register Proxy
s
with the Model
, since Proxy
s with mutable data will likely
need to send Notification
s and thus will likely want to fetch a reference to
the Facade
during their construction.
Protected
initializeInitialize the View
.
Called by the initializeFacade
method.
Override this method in your subclass of Facade
if one or both of the following are true:
View
.Observers
to register with the View
If you don't want to initialize a different View
,
call super.initializeView()
at the beginning of your
method, then register Mediator
instances.
Note: This method is rarely overridden; in practice you are more
likely to use a Command
to create and register Mediator
s
with the View
, since Mediator
instances will need to send
Notification
s and thus will likely want to fetch a reference
to the Facade
during their construction.
Notify Observer
s.
This method is left public mostly for backward compatibility, and to allow you to send custom notification classes using the facade.
Usually you should just call sendNotification
and pass the parameters, never having to
construct the notification yourself.
The notification to be sent to observers.
Register a Mediator
with the View
.
The mediator instance to be registered.
Register a Proxy
with the Model
by name.
The proxy instance to be registered.
Create and send an Notification
.
Keeps us from having to construct new notification instances in our implementation code.
The name of the notification to be sent.
Optional
body: anyOptional data to be included with the notification.
Optional
type: stringOptional type of the notification.
Static
get
A base Singleton
Facade
implementation.See
Facade