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

org.glassfish.jersey.client.oauth2.internal.LocalizationMessages Maven / Gradle / Ivy

There is a newer version: 2.22.2
Show newest version

package org.glassfish.jersey.client.oauth2.internal;

import org.glassfish.jersey.internal.l10n.Localizable;
import org.glassfish.jersey.internal.l10n.LocalizableMessageFactory;
import org.glassfish.jersey.internal.l10n.Localizer;


/**
 * Defines string formatting method for each constant in the resource file
 * 
 */
public final class LocalizationMessages {

    private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("org.glassfish.jersey.client.oauth2.internal.localization");
    private final static Localizer localizer = new Localizer();

    public static Localizable localizableERROR_FLOW_REQUEST_REFRESH_TOKEN(Object arg0) {
        return messageFactory.getMessage("error.flow.request.refreshToken", arg0);
    }

    /**
     * Error refreshing an access token. Response status: {0}.
     * 
     */
    public static String ERROR_FLOW_REQUEST_REFRESH_TOKEN(Object arg0) {
        return localizer.localize(localizableERROR_FLOW_REQUEST_REFRESH_TOKEN(arg0));
    }

    public static Localizable localizableERROR_FLOW_REQUEST_ACCESS_TOKEN(Object arg0) {
        return messageFactory.getMessage("error.flow.request.accessToken", arg0);
    }

    /**
     * Error requesting access token. Response status {0}.
     * 
     */
    public static String ERROR_FLOW_REQUEST_ACCESS_TOKEN(Object arg0) {
        return localizer.localize(localizableERROR_FLOW_REQUEST_ACCESS_TOKEN(arg0));
    }

    public static Localizable localizableERROR_FLOW_NOT_FINISHED() {
        return messageFactory.getMessage("error.flow.not.finished");
    }

    /**
     * Authorization is not finished and access token was not received. Call start() and then finish() to perform the authorization.
     * 
     */
    public static String ERROR_FLOW_NOT_FINISHED() {
        return localizer.localize(localizableERROR_FLOW_NOT_FINISHED());
    }

    public static Localizable localizableERROR_FLOW_WRONG_STATE() {
        return messageFactory.getMessage("error.flow.wrong.state");
    }

    /**
     * Invalid 'state' parameter. 'state' used in the authorization request does not match to the 'state' from the authorization response.
     * 
     */
    public static String ERROR_FLOW_WRONG_STATE() {
        return localizer.localize(localizableERROR_FLOW_WRONG_STATE());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy