play.mvc.Call Java Examples

The following examples show how to use play.mvc.Call. 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: RecoverPasswordEmailContentFactoryTest.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    final Call callToResetPasswordUrl = mock(Call.class);
    when(callToResetPasswordUrl.absoluteURL(any())).thenReturn(RESET_PASSWORD_URL);
    when(fakeRecoverPasswordReverseRouter.resetPasswordPageCall(TOKEN_VALUE)).thenReturn(callToResetPasswordUrl);
    when(fakeResetPasswordToken.getValue()).thenReturn(TOKEN_VALUE);
    Http.Context.current.set(mock(Http.Context.class));
}
 
Example #2
Source File: DefaultProductReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * It uses as product identifier the product slug for the current locale and as variant identifier the SKU.
 */
@Override
public Optional<Call> productDetailPageCall(final io.sphere.sdk.shoppinglists.LineItem lineItem) {
    return Optional.ofNullable(lineItem.getProductSlug())
            .flatMap(slugs -> slugs.find(locale())
                    .map(slug -> productDetailPageCall(slug, lineItem.getVariant().getSku())));
}
 
Example #3
Source File: AbstractBreadcrumbViewModelFactory.java    From commercetools-sunrise-java with Apache License 2.0 5 votes vote down vote up
private BreadcrumbLinkViewModel createCategoryLinkData(final Category category) {
    final BreadcrumbLinkViewModel linkViewModel = new BreadcrumbLinkViewModel();
    linkViewModel.setText(category.getName());
    linkViewModel.setUrl(productReverseRouter
            .productOverviewPageCall(category)
            .map(Call::url)
            .orElse(""));
    return linkViewModel;
}
 
Example #4
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutConfirmationProcessCall(final String languageTag) {
    return delegate.checkoutConfirmationProcessCall(languageTag);
}
 
Example #5
Source File: ChangePasswordReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call changePasswordProcessCall() {
    return changePasswordProcessCall(locale().toLanguageTag());
}
 
Example #6
Source File: DefaultAuthenticationReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call logInProcessCall(final String languageTag) {
    return delegate.logInProcessCall(languageTag);
}
 
Example #7
Source File: AuthenticationReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call logOutProcessCall() {
    return logOutProcessCall(locale().toLanguageTag());
}
 
Example #8
Source File: WishlistReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call removeFromWishlistProcess() {
    return removeFromWishlistProcessCall(locale().toLanguageTag());
}
 
Example #9
Source File: WishlistReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call clearWishlistProcess() {
    return clearWishlistProcessCall(locale().toLanguageTag());
}
 
Example #10
Source File: GSNUsernamePasswordAuthProvider.java    From gsn with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected Call userUnverified(final UsernamePasswordAuthUser authUser) {
	return controllers.gsn.auth.routes.Signup.unverified();
}
 
Example #11
Source File: MyPersonalDetailsReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call myPersonalDetailsPageCall() {
    return myPersonalDetailsPageCall(locale().toLanguageTag());
}
 
Example #12
Source File: AuthenticationReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call signUpProcessCall() {
    return signUpProcessCall(locale().toLanguageTag());
}
 
Example #13
Source File: SimpleMyPersonalDetailsReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call myPersonalDetailsPageCall(final String languageTag) {
    return myPersonalDetailsPageCaller.call(languageTag);
}
 
Example #14
Source File: SimpleWishlistReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call removeFromWishlistProcessCall(final String languageTag) {
    return removeFromWishlistCaller.call(languageTag);
}
 
Example #15
Source File: DefaultMyOrdersReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call myOrderDetailPageCall(final String languageTag, final String orderIdentifier) {
    return delegate.myOrderDetailPageCall(languageTag, orderIdentifier);
}
 
Example #16
Source File: SimpleMyOrdersReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call myOrderDetailPageCall(final String languageTag, final String orderIdentifier) {
    return myOrderDetailPageCaller.call(languageTag, orderIdentifier);
}
 
Example #17
Source File: CheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call checkoutShippingPageCall() {
    return checkoutShippingPageCall(locale().toLanguageTag());
}
 
Example #18
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutConfirmationPageCall(final String languageTag) {
    return delegate.checkoutConfirmationPageCall(languageTag);
}
 
Example #19
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutPaymentProcessCall(final String languageTag) {
    return delegate.checkoutPaymentProcessCall(languageTag);
}
 
Example #20
Source File: DefaultAddressBookReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call addAddressPageCall(final String languageTag) {
    return delegate.addAddressPageCall(languageTag);
}
 
Example #21
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutShippingProcessCall(final String languageTag) {
    return delegate.checkoutShippingProcessCall(languageTag);
}
 
Example #22
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutShippingPageCall(final String languageTag) {
    return delegate.checkoutShippingPageCall(languageTag);
}
 
Example #23
Source File: DefaultCheckoutReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutAddressPageCall(final String languageTag) {
    return delegate.checkoutAddressPageCall(languageTag);
}
 
Example #24
Source File: SimpleMyPersonalDetailsReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call myPersonalDetailsProcessCall(final String languageTag) {
    return myPersonalDetailsProcessCaller.call(languageTag);
}
 
Example #25
Source File: AuthenticationReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
default Call logInProcessCall() {
    return logInProcessCall(locale().toLanguageTag());
}
 
Example #26
Source File: SimpleAddressBookReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call addAddressPageCall(final String languageTag) {
    return addAddressPageCaller.call(languageTag);
}
 
Example #27
Source File: DefaultProductReverseRouter.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call productDetailPageCall(final String languageTag, final String productIdentifier, final String productVariantIdentifier) {
    return delegate.productDetailPageCall(languageTag, productIdentifier, productVariantIdentifier);
}
 
Example #28
Source File: SimpleAuthenticationReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call logInPageCall(final String languageTag) {
    return logInPageCaller.call(languageTag);
}
 
Example #29
Source File: SimpleCheckoutReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call checkoutConfirmationProcessCall(final String languageTag) {
    return checkoutConfirmationProcessCaller.call(languageTag);
}
 
Example #30
Source File: SimpleAddressBookReverseRouterByReflection.java    From commercetools-sunrise-java with Apache License 2.0 4 votes vote down vote up
@Override
public Call changeAddressPageCall(final String languageTag, final String addressIdentifier) {
    return changeAddressPageCaller.call(languageTag, addressIdentifier);
}