Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Access Management Mobile and Social


oracle.security.idaas.rest.jaxrs.client.sdk
Class Util

java.lang.Object
  extended by oracle.security.idaas.rest.jaxrs.client.sdk.Util


public class Util
extends java.lang.Object

Utility methods used by clientsdk. Not part of public API or javadocs.


Constructor Summary
Util()
           

 

Method Summary
static OICClientException buildOICClientException(com.sun.jersey.api.client.ClientResponse response)
          Process 4xx/5xx response error messages set in JSON object within response body.
static void debugCurlCommand(java.lang.String className, java.lang.String methodName, java.lang.String op, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> queryParameters, org.codehaus.jettison.json.JSONObject jo, Headers headers)
          Helper utility for logging the CURL command
static void debugCurlCommand(java.lang.String className, java.lang.String methodName, java.lang.String op, java.lang.String uri, java.util.Map<java.lang.String,java.lang.String> queryParameters, java.lang.String payload, Headers headers)
          Helper utility for logging the CURL command
static void logAndThrowException(java.lang.String className, java.lang.String methodName, java.lang.String msgKey)
          Helper utility for logging the error and constructing OICClientException
static void logAndThrowException(java.lang.String className, java.lang.String methodName, java.lang.String msgKey, java.lang.Throwable je)
          Helper utility for logging the error and constructing OICClientException
static java.lang.String urlEncode(java.lang.String s)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Util

public Util()

Method Detail

buildOICClientException

public static OICClientException buildOICClientException(com.sun.jersey.api.client.ClientResponse response)
Process 4xx/5xx response error messages set in JSON object within response body. Convert into OICClientException with fields set properly. Used by underlying JAX-RS/Jersey client helper classes to set exception fields to values supplied by the server in the response JSON error message.

urlEncode

public static java.lang.String urlEncode(java.lang.String s)
                                  throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

logAndThrowException

public static void logAndThrowException(java.lang.String className,
                                        java.lang.String methodName,
                                        java.lang.String msgKey)
                                 throws OICClientException
Helper utility for logging the error and constructing OICClientException
Parameters:
className, - calling java class
methodName, - calling java method
msgKey, - key in the LoggingMessageKeys
Throws:
OICClientException

logAndThrowException

public static void logAndThrowException(java.lang.String className,
                                        java.lang.String methodName,
                                        java.lang.String msgKey,
                                        java.lang.Throwable je)
                                 throws OICClientException
Helper utility for logging the error and constructing OICClientException
Parameters:
className, - calling java class.
methodName, - calling java method.
msgKey, - key in the LoggingMessageKeys
je, - exception being caught
Throws:
OICClientException

debugCurlCommand

public static void debugCurlCommand(java.lang.String className,
                                    java.lang.String methodName,
                                    java.lang.String op,
                                    java.lang.String uri,
                                    java.util.Map<java.lang.String,java.lang.String> queryParameters,
                                    org.codehaus.jettison.json.JSONObject jo,
                                    Headers headers)
Helper utility for logging the CURL command
Parameters:
className, - calling java class.
methodName, - calling java method.
op, - HTTP protocol action, which can be POST, GET, PUT, DELETE.
uri, - the service endpoint.
queryParameters, - the query parameters.
jo, - payload of the http operation.
headers, - query headers

debugCurlCommand

public static void debugCurlCommand(java.lang.String className,
                                    java.lang.String methodName,
                                    java.lang.String op,
                                    java.lang.String uri,
                                    java.util.Map<java.lang.String,java.lang.String> queryParameters,
                                    java.lang.String payload,
                                    Headers headers)
Helper utility for logging the CURL command
Parameters:
className, - calling java class.
methodName, - calling java method.
op, - HTTP protocol action, which can be POST, GET, PUT, DELETE.
uri, - the service endpoint.
queryParameters, - the query parameters.
payload, - payload of the http operation.
headers, - query headers

Skip navigation links

Copyright (c) 2012,
Oracle All Rights Reserved.
Built 06/05/2012 17:18:07 PDT