templates.model
Interface TemplateModelPublisher

All Known Subinterfaces:
TemplateModel
All Known Implementing Classes:
TemplateDesign

public interface TemplateModelPublisher

Interface for publishers of notifications about changes in TemplateModels.

Author:
Lenko Grigorov

Method Summary
 void addSubscriber(TemplateModelSubscriber subscriber)
          Attaches the given subscriber to this publisher.
 void fireTemplateModelStructureChanged(TemplateModelMessage message)
          Triggers a notification to all subscribers that the structure of the TemplateModel has changed.
 TemplateModelSubscriber[] getTemplateModelSubscribers()
          Returns all current subscribers to this publisher.
 void removeSubscriber(TemplateModelSubscriber subscriber)
          Removes the given subscriber from this publisher.
 

Method Detail

addSubscriber

void addSubscriber(TemplateModelSubscriber subscriber)
Attaches the given subscriber to this publisher. The given subscriber will receive notifications of changes from this publisher.

Parameters:
subscriber - the subscriber to be added

removeSubscriber

void removeSubscriber(TemplateModelSubscriber subscriber)
Removes the given subscriber from this publisher. The given subscriber will no longer receive notifications of changes from this publisher.

Parameters:
subscriber - the subscriber to be removed

getTemplateModelSubscribers

TemplateModelSubscriber[] getTemplateModelSubscribers()
Returns all current subscribers to this publisher.

Returns:
all current subscribers to this publisher

fireTemplateModelStructureChanged

void fireTemplateModelStructureChanged(TemplateModelMessage message)
Triggers a notification to all subscribers that the structure of the TemplateModel has changed.

Parameters:
message - message with additional info about the change