play.data.FormFactory Java Examples

The following examples show how to use play.data.FormFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PostController.java    From htwplus with MIT License 6 votes vote down vote up
@Inject
public PostController(GroupManager groupManager,
                      PostManager postManager,
        PostBookmarkManager postBookmarkManager,
                      AccountManager accountManager,
                      Configuration configuration,
                      FormFactory formFactory,
                      NotificationService notificationService,
                      MessagesApi messagesApi) {
    this.groupManager = groupManager;
    this.postManager = postManager;
    this.postBookmarkManager = postBookmarkManager;
    this.accountManager = accountManager;
    this.configuration = configuration;
    this.formFactory = formFactory;
    this.notificationService = notificationService;
    this.messagesApi = messagesApi;

    this.postForm = formFactory.form(Post.class);
}
 
Example #2
Source File: Application.java    From htwplus with MIT License 6 votes vote down vote up
@Inject
public Application(ElasticsearchService elasticsearchService,
                   ElasticsearchResponse elasticsearchResponse,
                   GroupManager groupManager,
                   PostManager postManager,
                   AccountManager accountManager,
                   Configuration configuration,
                   FormFactory formFactory,
                   MessagesApi messagesApi) {
    this.elasticsearchService = elasticsearchService;
    this.elasticsearchResponse = elasticsearchResponse;
    this.groupManager = groupManager;
    this. postManager = postManager;
    this.accountManager = accountManager;
    this.configuration = configuration;
    this.messagesApi = messagesApi;
    this.formFactory = formFactory;
    this.postForm = formFactory.form(Post.class);
    this.limit = configuration.getInt("htwplus.post.limit");
}
 
Example #3
Source File: AdminController.java    From htwplus with MIT License 6 votes vote down vote up
@Inject
public AdminController(ElasticsearchService elasticsearchService,
                       MediaManager mediaManager,
                       GroupManager groupManager,
                       PostManager postManager,
                       AccountManager accountManager,
                       FolderManager folderManager,
                       FormFactory formFactory,
                       MessagesApi messagesApi) {
    this.elasticsearchService = elasticsearchService;
    this.mediaManager = mediaManager;
    this.groupManager = groupManager;
    this.postManager = postManager;
    this.accountManager = accountManager;
    this.folderManager = folderManager;
    this.messagesApi = messagesApi;
    this.formFactory = formFactory;
    this.accountForm = formFactory.form(Account.class);
    this.postForm =  formFactory.form(Post.class);
}
 
Example #4
Source File: SignUpController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public SignUpController(final ContentRenderer contentRenderer,
                        final FormFactory formFactory,
                        final SignUpFormData formData,
                        final SignUpControllerAction controllerAction,
                        final SignUpPageContentFactory pageContentFactory,
                        final MyPersonalDetailsReverseRouter myPersonalDetailsReverseRouter) {
    super(contentRenderer, formFactory, formData, controllerAction, pageContentFactory);
    this.myPersonalDetailsReverseRouter = myPersonalDetailsReverseRouter;
}
 
Example #5
Source File: SunriseAddDiscountCodeController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseAddDiscountCodeController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                           final AddDiscountCodeFormData formData, final CartFinder cartFinder,
                                           final CartPageContentFactory pageContentFactory,
                                           final AddDiscountCodeControllerAction controllerAction) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.pageContentFactory = pageContentFactory;
    this.controllerAction = controllerAction;
}
 
Example #6
Source File: LogInController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public LogInController(final ContentRenderer contentRenderer,
                       final FormFactory formFactory,
                       final LogInFormData formData,
                       final LogInControllerAction controllerAction,
                       final LogInPageContentFactory pageContentFactory,
                       final MyPersonalDetailsReverseRouter myPersonalDetailsReverseRouter) {
    super(contentRenderer, formFactory, formData, controllerAction, pageContentFactory);
    this.myPersonalDetailsReverseRouter = myPersonalDetailsReverseRouter;
}
 
Example #7
Source File: MyPersonalDetailsController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public MyPersonalDetailsController(final ContentRenderer contentRenderer,
                                   final FormFactory formFactory,
                                   final MyPersonalDetailsFormData formData,
                                   final CustomerFinder customerFinder,
                                   final MyPersonalDetailsControllerAction controllerAction,
                                   final MyPersonalDetailsPageContentFactory pageContentFactory,
                                   final MyPersonalDetailsReverseRouter myPersonalDetailsReverseRouter,
                                   final AuthenticationReverseRouter authenticationReverseRouter) {
    super(contentRenderer, formFactory, formData, customerFinder, controllerAction, pageContentFactory);
    this.myPersonalDetailsReverseRouter = myPersonalDetailsReverseRouter;
    this.authenticationReverseRouter = authenticationReverseRouter;
}
 
Example #8
Source File: RemoveAddressController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public RemoveAddressController(final ContentRenderer contentRenderer,
                               final FormFactory formFactory,
                               final RemoveAddressFormData formData,
                               final CustomerFinder customerFinder,
                               final AddressFinder addressFinder,
                               final RemoveAddressControllerAction controllerAction,
                               final AddressBookPageContentFactory pageContentFactory,
                               final AuthenticationReverseRouter authenticationReverseRouter,
                               final AddressBookReverseRouter addressBookReverseRouter) {
    super(contentRenderer, formFactory, formData, customerFinder, addressFinder, controllerAction, pageContentFactory);
    this.authenticationReverseRouter = authenticationReverseRouter;
    this.addressBookReverseRouter = addressBookReverseRouter;
}
 
Example #9
Source File: AddAddressController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public AddAddressController(final ContentRenderer contentRenderer,
                            final FormFactory formFactory,
                            final AddressFormData formData,
                            final CustomerFinder customerFinder,
                            final AddAddressControllerAction controllerAction,
                            final AddAddressPageContentFactory pageContentFactory,
                            final CountryCode country,
                            final AuthenticationReverseRouter authenticationReverseRouter,
                            final AddressBookReverseRouter addressBookReverseRouter) {
    super(contentRenderer, formFactory, formData, customerFinder, controllerAction, pageContentFactory, country);
    this.authenticationReverseRouter = authenticationReverseRouter;
    this.addressBookReverseRouter = addressBookReverseRouter;
}
 
Example #10
Source File: PortfolioController.java    From reactive-stock-trader with Apache License 2.0 5 votes vote down vote up
@Inject
private PortfolioController(PortfolioService portfolioService,
                            QuoteService quoteService,
                            BrokerService brokerService,
                            FormFactory formFactory) {
    this.portfolioService = portfolioService;
    this.quoteService = quoteService;
    this.brokerService = brokerService;
    this.placeOrderForm = formFactory.form(PlaceOrderForm.class);
    this.openPortfolioForm = formFactory.form(OpenPortfolioForm.class);
}
 
Example #11
Source File: ChangeAddressController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public ChangeAddressController(final ContentRenderer contentRenderer,
                               final FormFactory formFactory,
                               final AddressFormData formData,
                               final CustomerFinder customerFinder,
                               final AddressFinder addressFinder,
                               final ChangeAddressControllerAction controllerAction,
                               final ChangeAddressPageContentFactory pageContentFactory,
                               final AuthenticationReverseRouter authenticationReverseRouter,
                               final AddressBookReverseRouter addressBookReverseRouter) {
    super(contentRenderer, formFactory, formData, customerFinder, addressFinder, controllerAction, pageContentFactory);
    this.authenticationReverseRouter = authenticationReverseRouter;
    this.addressBookReverseRouter = addressBookReverseRouter;
}
 
Example #12
Source File: RecoverPasswordController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
RecoverPasswordController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                          final RecoverPasswordPageContentFactory pageContentFactory,
                          final RecoverPasswordFormData formData,
                          final RecoverPasswordControllerAction controllerAction,
                          final RecoverPasswordReverseRouter recoverPasswordReverseRouter) {
    super(contentRenderer, formFactory, pageContentFactory, formData, controllerAction);
    this.recoverPasswordReverseRouter = recoverPasswordReverseRouter;
}
 
Example #13
Source File: ResetPasswordController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
ResetPasswordController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                               final ResetPasswordFormData formData,
                               final ResetPasswordControllerAction controllerAction,
                               final ResetPasswordPageContentFactory pageContentFactory,
                               final AuthenticationReverseRouter authenticationReverseRouter) {
    super(contentRenderer, formFactory, formData, controllerAction, pageContentFactory);
    this.authenticationReverseRouter = authenticationReverseRouter;
}
 
Example #14
Source File: ChangePasswordController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public ChangePasswordController(final ContentRenderer contentRenderer,
                                final FormFactory formFactory,
                                final ChangePasswordFormData formData,
                                final CustomerFinder customerFinder,
                                final ChangePasswordControllerAction controllerAction,
                                final ChangePasswordPageContentFactory pageContentFactory,
                                final AuthenticationReverseRouter authenticationReverseRouter,
                                final MyPersonalDetailsReverseRouter myPersonalDetailsReverseRouter) {
    super(contentRenderer, formFactory, formData, customerFinder, controllerAction, pageContentFactory);
    this.authenticationReverseRouter = authenticationReverseRouter;
    this.myPersonalDetailsReverseRouter = myPersonalDetailsReverseRouter;
}
 
Example #15
Source File: ChangeCountryController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public ChangeCountryController(final FormFactory formFactory,
                               final ChangeCountryFormData formData,
                               final ChangeCountryControllerAction controllerAction,
                               final HomeReverseRouter homeReverseRouter) {
    super(formFactory, formData, controllerAction);
    this.homeReverseRouter = homeReverseRouter;
}
 
Example #16
Source File: SunriseChangeAddressController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseChangeAddressController(final ContentRenderer contentRenderer,
                                         final FormFactory formFactory, final AddressFormData formData,
                                         final CustomerFinder customerFinder, final AddressFinder addressFinder,
                                         final ChangeAddressControllerAction controllerAction,
                                         final ChangeAddressPageContentFactory pageContentFactory) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.customerFinder = customerFinder;
    this.addressFinder = addressFinder;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
}
 
Example #17
Source File: RemoveFromWishlistController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
public RemoveFromWishlistController(final ContentRenderer contentRenderer,
                                    final FormFactory formFactory,
                                    final WishlistPageContentFactory wishlistPageContentFactory,
                                    final RemoveFromWishlistFormData formData,
                                    final WishlistFinder wishlistFinder,
                                    final RemoveFromWishlistControllerAction controllerAction,
                                    final WishlistReverseRouter reverseRouter) {
    super(contentRenderer, formFactory, wishlistPageContentFactory, formData, wishlistFinder, controllerAction);
    this.reverseRouter = reverseRouter;
}
 
Example #18
Source File: SunriseRemoveDiscountCodeController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseRemoveDiscountCodeController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                              final RemoveDiscountCodeFormData formData, final CartFinder cartFinder,
                                              final CartPageContentFactory pageContentFactory,
                                              final RemoveDiscountCodeControllerAction controllerAction) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.pageContentFactory = pageContentFactory;
    this.controllerAction = controllerAction;
}
 
Example #19
Source File: SunriseAddToCartController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseAddToCartController(final ContentRenderer contentRenderer,
                                     final FormFactory formFactory, final AddToCartFormData formData,
                                     final CartFinder cartFinder, final CartCreator cartCreator,
                                     final AddToCartControllerAction controllerAction,
                                     final CartPageContentFactory pageContentFactory) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.cartCreator = cartCreator;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
}
 
Example #20
Source File: SunriseChangeQuantityInCartController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseChangeQuantityInCartController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                                final ChangeQuantityInCartFormData formData, final CartFinder cartFinder,
                                                final CartPageContentFactory pageContentFactory,
                                                final ChangeQuantityInCartControllerAction controllerAction) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.pageContentFactory = pageContentFactory;
    this.controllerAction = controllerAction;
}
 
Example #21
Source File: SunriseCheckoutShippingController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseCheckoutShippingController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                            final CheckoutShippingFormData formData, final CartFinder cartFinder,
                                            final CheckoutShippingControllerAction controllerAction,
                                            final CheckoutShippingPageContentFactory pageContentFactory,
                                            final ShippingSettings shippingSettings) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
    this.shippingSettings = shippingSettings;
}
 
Example #22
Source File: SunriseCheckoutPaymentController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseCheckoutPaymentController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                           final CheckoutPaymentFormData formData, final CartFinder cartFinder,
                                           final CheckoutPaymentControllerAction controllerAction,
                                           final CheckoutPaymentPageContentFactory pageContentFactory,
                                           final PaymentSettings paymentSettings) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
    this.paymentSettings = paymentSettings;
}
 
Example #23
Source File: SunriseCheckoutAddressController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseCheckoutAddressController(final ContentRenderer contentRenderer,
                                           final FormFactory formFactory, final CheckoutAddressFormData formData,
                                           final CartFinder cartFinder,
                                           final CheckoutAddressControllerAction controllerAction,
                                           final CheckoutAddressPageContentFactory pageContentFactory) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
}
 
Example #24
Source File: SunriseCheckoutConfirmationController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseCheckoutConfirmationController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                                final CheckoutConfirmationFormData formData, final CartFinder cartFinder,
                                                final CheckoutConfirmationControllerAction controllerAction,
                                                final CheckoutConfirmationPageContentFactory pageContentFactory) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.controllerAction = controllerAction;
    this.pageContentFactory = pageContentFactory;
}
 
Example #25
Source File: SunriseRemoveFromCartController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
protected SunriseRemoveFromCartController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                          final RemoveFromCartFormData formData, final CartFinder cartFinder,
                                          final RemoveFromCartControllerAction removeFromCartControllerAction,
                                          final CartPageContentFactory cartPageContentFactory) {
    super(contentRenderer, formFactory);
    this.formData = formData;
    this.cartFinder = cartFinder;
    this.removeFromCartControllerAction = removeFromCartControllerAction;
    this.cartPageContentFactory = cartPageContentFactory;
}
 
Example #26
Source File: ProfileController.java    From htwplus with MIT License 5 votes vote down vote up
@Inject
public ProfileController(AccountManager accountManager,
        GroupAccountManager groupAccountManager,
        PostManager postManager,
        AccountController accountController,
        StudycourseManager studycourseManager,
        AvatarManager avatarManager,
        MediaManager mediaManager, FriendshipManager friendshipManager,
        Configuration configuration,FormFactory formFactory, MessagesApi messagesApi) {
    this.accountManager = accountManager;
    this.groupAccountManager = groupAccountManager;
    this.postManager = postManager;
    this.accountController = accountController;
    this.studycourseManager = studycourseManager;
    this.avatarManager = avatarManager;
    this.mediaManager = mediaManager;
    this.friendshipManager = friendshipManager;
    this.configuration = configuration;
    this.formFactory = formFactory;
    this.messagesApi = messagesApi;

    this.accountForm = formFactory.form(Account.class);
    this.postForm = formFactory.form(Post.class);
    this.loginForm = formFactory.form(Login.class);
    this.LIMIT = configuration.getInt("htwplus.post.limit");

}
 
Example #27
Source File: GroupController.java    From htwplus with MIT License 5 votes vote down vote up
@Inject
public GroupController(GroupManager groupManager,
                       GroupAccountManager groupAccountManager,
                       MediaManager mediaManager,
                       FriendshipManager friendshipManager,
                       PostManager postManager,
                       AccountManager accountManager,
                       FolderManager folderManager,
                       AvatarManager avatarManager,
                       NotificationService notificationService,
                       Configuration configuration,
                       FormFactory formFactory,
                       MessagesApi messagesApi) {
    this.groupManager = groupManager;
    this.groupAccountManager = groupAccountManager;
    this.mediaManager = mediaManager;
    this.friendshipManager = friendshipManager;
    this.postManager = postManager;
    this.accountManager = accountManager;
    this.folderManager = folderManager;
    this.avatarManager = avatarManager;
    this.notificationService = notificationService;
    this.configuration = configuration;
    this.formFactory = formFactory;
    this.messagesApi = messagesApi;

    this.groupForm = formFactory.form(Group.class);
    this.folderForm = formFactory.form(Folder.class);
    this.postForm = formFactory.form(Post.class);
    this.limit = configuration.getInt("htwplus.post.limit");
}
 
Example #28
Source File: SunriseAddToWishlistController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
protected SunriseAddToWishlistController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                         final WishlistPageContentFactory wishlistPageContentFactory,
                                         final AddToWishlistFormData formData,
                                         final WishlistCreator wishlistCreator,
                                         final WishlistFinder wishlistFinder,
                                         final AddToWishlistControllerAction controllerAction) {
    super(contentRenderer, formFactory);
    this.wishlistPageContentFactory = wishlistPageContentFactory;
    this.formData = formData;
    this.wishlistCreator = wishlistCreator;
    this.wishlistFinder = wishlistFinder;
    this.controllerAction = controllerAction;
}
 
Example #29
Source File: SunriseRemoveFromWishlistController.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Inject
protected SunriseRemoveFromWishlistController(final ContentRenderer contentRenderer, final FormFactory formFactory,
                                              final WishlistPageContentFactory wishlistPageContentFactory,
                                              final RemoveFromWishlistFormData formData,
                                              final WishlistFinder wishlistFinder,
                                              final RemoveFromWishlistControllerAction controllerAction) {
    super(contentRenderer, formFactory);
    this.wishlistPageContentFactory = wishlistPageContentFactory;
    this.formData = formData;
    this.wishlistFinder = wishlistFinder;
    this.controllerAction = controllerAction;
}
 
Example #30
Source File: AccountController.java    From htwplus with MIT License 5 votes vote down vote up
@Inject
public AccountController(AccountManager accountManager, FormFactory formFactory, LdapService ldapService, MessagesApi messagesApi) {
    this.accountManager = accountManager;
    this.formFactory = formFactory;
    this.ldapService = ldapService;
    this.messagesApi = messagesApi;
}