Dart DocumentationpuremvcIView

IView Interface

The interface definition for a PureMVC MultiCore View.

In PureMVC, IView implementors assume these responsibilities:

See IMediator, IObserver, INotification

Implemented by

View

Methods

Code bool hasMediator(String mediatorName) #

Check if an IMediator is registered with the IView.

  • Param mediatorName - the name of the IMediator you're looking for.
  • Returns bool - whether an IMediator is registered in this core with the given mediatorName.
bool hasMediator( String mediatorName );

Code String get multitonKey() #

String get multitonKey();

Code void set multitonKey(String key) #

This IView's Multiton key

void set multitonKey( String key );

Code void notifyObservers(INotification note) #

Notify the IObservers for a particular INotification.

All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.

void notifyObservers( INotification note );

Code void registerMediator(IMediator mediator) #

Register an IMediator instance with the IView.

Registers the IMediator so that it can be retrieved by name, and interrogates the IMediator for its INotification interests.

If the IMediator returns a list of INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an IObserver for all INotifications the IMediator is interested in.

  • Param mediator - a reference to the IMediator instance.
void registerMediator( IMediator mediator );

Code void registerObserver(String noteName, IObserver observer) #

Register an IObserver to be notified of INotifications with a given name.

void registerObserver( String noteName, IObserver observer);

Code IMediator removeMediator(String mediatorName) #

Remove an IMediator from the IView.

IMediator removeMediator( String mediatorName );

Code void removeObserver(String noteName, Object notifyContext) #

Remove an IObserver from the list for a given INotification name.

  • Param noteName - which IObserver list to remove from.
  • Param notifyContext - remove IObservers with this object as the notifyContext.
void removeObserver( String noteName, Object notifyContext );

Code IMediator retrieveMediator(String mediatorName) #

Retrieve an IMediator from the IView.

  • Param mediatorName - the name of the IMediator instance to retrieve.
  • Returns IMediator - the IMediator instance previously registered in this core with the given mediatorName.
IMediator retrieveMediator( String mediatorName );