Class RecipientPageModelProvider
java.lang.Object
ch.tocco.nice2.optional.newsletter.impl.content.RecipientPageModelProvider
- All Implemented Interfaces:
PageModelProvider<Entity>
@Component
public class RecipientPageModelProvider
extends Object
implements PageModelProvider<Entity>
This model provider returns the receiver entity for newsletter pages.
To find the receiver, an URL parameter called
RECEIVER_PARAMETER_NAME
is fetched.
The value of this parameter should contain the UID of the Newsletter_receiver entity.
If no parameter is set or no correpsonding Newsletter_receiver could be found
a session-only Dummy_newsletter_receiver entity is returned.
ID of the model: recipient (auto-added freemarker variable for the receiver in a mail template
is also named "recipient")-
Field Summary
-
Constructor Summary
ConstructorDescriptionRecipientPageModelProvider
(RequestService requestService, NewsletterReceiverService newsletterReceiverService, DummyNewsletterReceiverFactory dummyNewsletterReceiverFactory) -
Method Summary
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
RecipientPageModelProvider
public RecipientPageModelProvider(RequestService requestService, NewsletterReceiverService newsletterReceiverService, DummyNewsletterReceiverFactory dummyNewsletterReceiverFactory)
-
-
Method Details
-
getId
- Specified by:
getId
in interfacePageModelProvider<Entity>
-
getModel
- Specified by:
getModel
in interfacePageModelProvider<Entity>
-