// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.apache.oltu.oauth2.common.message; import java.util.HashMap; import java.util.Map; import org.apache.oltu.oauth2.common.exception.OAuthSystemException; import org.apache.oltu.oauth2.common.parameters.BodyURLEncodedParametersApplier; import org.apache.oltu.oauth2.common.parameters.FragmentParametersApplier; import org.apache.oltu.oauth2.common.parameters.JSONBodyParametersApplier; import org.apache.oltu.oauth2.common.parameters.OAuthParametersApplier; import org.apache.oltu.oauth2.common.parameters.QueryParameterApplier; import org.apache.oltu.oauth2.common.parameters.WWWAuthHeaderParametersApplier; // Referenced classes of package org.apache.oltu.oauth2.common.message: // OAuthResponse public static class responseCode { protected OAuthParametersApplier applier; protected String location; protected Map parameters; protected int responseCode; public OAuthResponse buildBodyMessage() throws OAuthSystemException { OAuthResponse oauthresponse = new OAuthResponse(location, responseCode); applier = new BodyURLEncodedParametersApplier(); return (OAuthResponse)applier.applyOAuthParameters(oauthresponse, parameters); } public OAuthResponse buildHeaderMessage() throws OAuthSystemException { OAuthResponse oauthresponse = new OAuthResponse(location, responseCode); applier = new WWWAuthHeaderParametersApplier(); return (OAuthResponse)applier.applyOAuthParameters(oauthresponse, parameters); } public OAuthResponse buildJSONMessage() throws OAuthSystemException { OAuthResponse oauthresponse = new OAuthResponse(location, responseCode); applier = new JSONBodyParametersApplier(); return (OAuthResponse)applier.applyOAuthParameters(oauthresponse, parameters); } public OAuthResponse buildQueryMessage() throws OAuthSystemException { OAuthResponse oauthresponse = new OAuthResponse(location, responseCode); applier = new QueryParameterApplier(); if (parameters.containsKey("access_token")) { applier = new FragmentParametersApplier(); } else { applier = new QueryParameterApplier(); } return (OAuthResponse)applier.applyOAuthParameters(oauthresponse, parameters); } public parameters location(String s) { location = s; return this; } public location setParam(String s, String s1) { parameters.put(s, s1); return this; } public parameters setScope(String s) { parameters.put("scope", s); return this; } public (int i) { parameters = new HashMap(); responseCode = i; } }