All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.commercetools.sunrise.common.reverserouter.ReflectionRecoverPasswordReverseRouter Maven / Gradle / Ivy

There is a newer version: 1.0.0-M10
Show newest version
package com.commercetools.sunrise.common.reverserouter;

import com.commercetools.sunrise.common.pages.ParsedRoutes;
import play.mvc.Call;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
final class ReflectionRecoverPasswordReverseRouter extends ReflectionReverseRouterBase implements RecoverPasswordReverseRouter {
    private final ReverseCaller resetPasswordPageCaller;
    private final ReverseCaller resetPasswordProcessCaller;
    private final ReverseCaller requestRecoveryEmailPageCaller;
    private final ReverseCaller requestRecoveryEmailProcessCaller;

    @Inject
    private ReflectionRecoverPasswordReverseRouter(final ParsedRoutes parsedRoutes) {
        resetPasswordPageCaller = getCallerForRoute(parsedRoutes, "showResetPasswordForm");
        resetPasswordProcessCaller = getCallerForRoute(parsedRoutes, "processResetPasswordForm");
        requestRecoveryEmailPageCaller = getCallerForRoute(parsedRoutes, "showRecoveryPasswordForm");
        requestRecoveryEmailProcessCaller = getCallerForRoute(parsedRoutes, "processRecoveryPasswordForm");
    }

    @Override
    public Call showResetPasswordForm(final String languageTag, final String resetToken) {
        return resetPasswordPageCaller.call(languageTag, resetToken);
    }

    @Override
    public Call processResetPasswordForm(final String languageTag, final String resetToken) {
        return resetPasswordProcessCaller.call(languageTag, resetToken);
    }

    @Override
    public Call showRequestRecoveryEmailForm(final String languageTag) {
        return requestRecoveryEmailPageCaller.call(languageTag);
    }

    @Override
    public Call processRequestRecoverEmailForm(final String languageTag) {
        return requestRecoveryEmailProcessCaller.call(languageTag);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy