org.jclouds.util
Class Utils

java.lang.Object
  extended by org.jclouds.util.Utils

Deprecated.

@Deprecated
public class Utils
extends Object

General utilities used in jclouds code.

note

Please look for locations of new utility methods

Author:
Adrian Cole

Constructor Summary
Utils()
          Deprecated.  
 
Method Summary
static void checkNotEmpty(String nullableString)
          Deprecated. 
static void checkNotEmpty(String nullableString, String message)
          Deprecated. 
static byte[] encodeString(String str)
          Deprecated. 
static byte[] encodeString(String str, String charsetName)
          Deprecated. 
static boolean eventuallyTrue(com.google.common.base.Supplier<Boolean> assertion, long inconsistencyMillis)
          Deprecated. 
static
<T extends Throwable>
T
getFirstThrowableOfType(com.google.inject.ProvisionException e, Class<T> clazz)
          Deprecated. 
static
<T extends Throwable>
T
getFirstThrowableOfType(Throwable from, Class<T> clazz)
          Deprecated. 
static Iterable<String> getSupportedProviders()
          Deprecated. 
static Iterable<String> getSupportedProvidersOfType(Class<? extends RestContextBuilder> type)
          Deprecated. 
static Iterable<String> getSupportedProvidersOfTypeInProperties(Class<? extends RestContextBuilder<?,?>> type, Properties properties)
          Deprecated. 
static
<S,A> RestContextBuilder<S,A>
initContextBuilder(Class<RestContextBuilder<S,A>> contextBuilderClass, Class<S> sync, Class<A> async, Properties properties)
          Deprecated. 
static boolean isPrivateKeyCredential(Credentials credentials)
          Deprecated. 
static Iterable<com.google.inject.Module> modulesForProviderInProperties(String providerName, Properties props)
          Deprecated. 
static Iterable<com.google.inject.Module> modulesFromCommaDelimitedString(String moduleClasses)
          Deprecated. 
static Iterable<com.google.inject.Module> modulesFromProperty(Properties props, String property)
          Deprecated. 
static
<T,E extends T>
List<E>
multiMax(Comparator<T> ordering, Iterable<E> iterable)
          Deprecated. 
static com.google.common.io.OutputSupplier<OutputStream> newOutputStreamSupplier(OutputStream output)
          Deprecated. 
static Credentials overrideCredentialsIfSupplied(Credentials defaultCredentials, Credentials overridingCredentials)
          Deprecated. 
static
<T> T
propagateAuthorizationOrOriginalException(Exception e)
          Deprecated. 
static
<T> T
propagateOrNull(Exception from)
          Deprecated. 
static String replaceAll(String input, char ifMatch, Pattern pattern, String replacement)
          Deprecated. 
static String replaceAll(String input, char match, String replacement)
          Deprecated. 
static String replaceAll(String returnVal, Pattern pattern, String replace)
          Deprecated. 
static String replaceTokens(String value, Iterable<Map.Entry<String,String>> tokenValues)
          Deprecated. 
static String replaceTokens(String input, Map<String,String> replacements)
          Deprecated. 
static
<S,A> Class<RestContextBuilder<S,A>>
resolveContextBuilderClass(String provider, Properties properties)
          Deprecated. 
static Class<PropertiesBuilder> resolvePropertiesBuilderClass(String providerName, Properties props)
          Deprecated. 
static InputStream toInputStream(String in)
          Deprecated. 
static String toStringAndClose(InputStream input)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Deprecated. 
Method Detail

propagateAuthorizationOrOriginalException

@Deprecated
public static <T> T propagateAuthorizationOrOriginalException(Exception e)
Deprecated. 

See Also:
Throwables2.propagateAuthorizationOrOriginalException

multiMax

@Deprecated
public static <T,E extends T> List<E> multiMax(Comparator<T> ordering,
                                                          Iterable<E> iterable)
Deprecated. 

See Also:
Lists2.multiMax(java.util.Comparator, java.lang.Iterable)

propagateOrNull

@Deprecated
public static <T> T propagateOrNull(Exception from)
Deprecated. 

See Also:
Throwables2.propagateOrNull(java.lang.Exception)

getFirstThrowableOfType

@Deprecated
public static <T extends Throwable> T getFirstThrowableOfType(Throwable from,
                                                                         Class<T> clazz)
Deprecated. 

See Also:
Throwables2.getFirstThrowableOfType(Throwable, Class)

getFirstThrowableOfType

@Deprecated
public static <T extends Throwable> T getFirstThrowableOfType(com.google.inject.ProvisionException e,
                                                                         Class<T> clazz)
Deprecated. 

See Also:
Throwables2.getFirstThrowableOfType(ProvisionException, Class)

replaceTokens

@Deprecated
public static String replaceTokens(String value,
                                              Iterable<Map.Entry<String,String>> tokenValues)
Deprecated. 

See Also:
Strings2.replaceTokens(java.lang.String, java.lang.Iterable>)

replaceAll

@Deprecated
public static String replaceAll(String returnVal,
                                           Pattern pattern,
                                           String replace)
Deprecated. 

See Also:
Strings2.replaceAll(String,Pattern, String)

replaceAll

@Deprecated
public static String replaceAll(String input,
                                           char ifMatch,
                                           Pattern pattern,
                                           String replacement)
Deprecated. 

See Also:
Strings2.replaceAll(String,char,Pattern, String)

replaceAll

@Deprecated
public static String replaceAll(String input,
                                           char match,
                                           String replacement)
Deprecated. 

See Also:
Strings2.replaceAll(String,char, String)

newOutputStreamSupplier

@Deprecated
public static com.google.common.io.OutputSupplier<OutputStream> newOutputStreamSupplier(OutputStream output)
Deprecated. 

See Also:
Suppliers2.newOutputStreamSupplier(java.io.OutputStream)

eventuallyTrue

@Deprecated
public static boolean eventuallyTrue(com.google.common.base.Supplier<Boolean> assertion,
                                                long inconsistencyMillis)
                              throws InterruptedException
Deprecated. 

Throws:
InterruptedException
See Also:
Assertions.eventuallyTrue(com.google.common.base.Supplier, long)

toStringAndClose

@Deprecated
public static String toStringAndClose(InputStream input)
                               throws IOException
Deprecated. 

Throws:
IOException
See Also:
Strings2.toStringAndClose(java.io.InputStream)

toInputStream

@Deprecated
public static InputStream toInputStream(String in)
Deprecated. 

See Also:
Strings2.toInputStream(java.lang.String)

encodeString

@Deprecated
public static byte[] encodeString(String str,
                                             String charsetName)
Deprecated. 

See Also:
Strings2.encodeString(String, String)

encodeString

@Deprecated
public static byte[] encodeString(String str)
Deprecated. 

See Also:
Strings2.encodeString(String)

replaceTokens

@Deprecated
public static String replaceTokens(String input,
                                              Map<String,String> replacements)
Deprecated. 

See Also:
Strings2.replaceTokens(String,Map)

checkNotEmpty

@Deprecated
public static void checkNotEmpty(String nullableString)
Deprecated. 

See Also:
Preconditions2.checkNotEmpty(String)

checkNotEmpty

@Deprecated
public static void checkNotEmpty(String nullableString,
                                            String message)
Deprecated. 

See Also:
Preconditions2.checkNotEmpty(String,String)

getSupportedProviders

@Deprecated
public static Iterable<String> getSupportedProviders()
Deprecated. 

See Also:
Providers.getSupportedProviders()

getSupportedProvidersOfType

@Deprecated
public static Iterable<String> getSupportedProvidersOfType(Class<? extends RestContextBuilder> type)
Deprecated. 

See Also:
Providers.getSupportedProvidersOfType(java.lang.Class)

getSupportedProvidersOfTypeInProperties

@Deprecated
public static Iterable<String> getSupportedProvidersOfTypeInProperties(Class<? extends RestContextBuilder<?,?>> type,
                                                                                  Properties properties)
Deprecated. 

See Also:
Providers.getSupportedProvidersOfTypeInProperties(java.lang.Class, java.util.Properties)

resolveContextBuilderClass

@Deprecated
public static <S,A> Class<RestContextBuilder<S,A>> resolveContextBuilderClass(String provider,
                                                                                         Properties properties)
                                                                 throws ClassNotFoundException,
                                                                        IllegalArgumentException,
                                                                        SecurityException,
                                                                        InstantiationException,
                                                                        IllegalAccessException,
                                                                        InvocationTargetException,
                                                                        NoSuchMethodException
Deprecated. 

Throws:
ClassNotFoundException
IllegalArgumentException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
See Also:
Providers.resolveContextBuilderClass(java.lang.String, java.util.Properties)

initContextBuilder

@Deprecated
public static <S,A> RestContextBuilder<S,A> initContextBuilder(Class<RestContextBuilder<S,A>> contextBuilderClass,
                                                                          @Nullable
                                                                          Class<S> sync,
                                                                          @Nullable
                                                                          Class<A> async,
                                                                          Properties properties)
                                                  throws ClassNotFoundException,
                                                         IllegalArgumentException,
                                                         SecurityException,
                                                         InstantiationException,
                                                         IllegalAccessException,
                                                         InvocationTargetException,
                                                         NoSuchMethodException
Deprecated. 

Throws:
ClassNotFoundException
IllegalArgumentException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
See Also:
Providers.initContextBuilder(java.lang.Class>, java.lang.Class, java.lang.Class, java.util.Properties)

resolvePropertiesBuilderClass

@Deprecated
public static Class<PropertiesBuilder> resolvePropertiesBuilderClass(String providerName,
                                                                                Properties props)
                                                              throws ClassNotFoundException,
                                                                     InstantiationException,
                                                                     IllegalAccessException,
                                                                     InvocationTargetException,
                                                                     NoSuchMethodException
Deprecated. 

Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
See Also:
Providers.resolvePropertiesBuilderClass(java.lang.String, java.util.Properties)

modulesForProviderInProperties

@Deprecated
public static Iterable<com.google.inject.Module> modulesForProviderInProperties(String providerName,
                                                                                           Properties props)
Deprecated. 

See Also:
Modules#modulesForProviderInProperties

modulesFromProperty

@Deprecated
public static Iterable<com.google.inject.Module> modulesFromProperty(Properties props,
                                                                                String property)
Deprecated. 

See Also:
Modules#modulesFromProperty

modulesFromCommaDelimitedString

@Deprecated
public static Iterable<com.google.inject.Module> modulesFromCommaDelimitedString(String moduleClasses)
Deprecated. 

See Also:
Modules#modulesFromCommaDelimitedString

isPrivateKeyCredential

@Deprecated
public static boolean isPrivateKeyCredential(Credentials credentials)
Deprecated. 

See Also:
CredentialUtils.isPrivateKeyCredential(org.jclouds.domain.Credentials)

overrideCredentialsIfSupplied

@Deprecated
public static Credentials overrideCredentialsIfSupplied(Credentials defaultCredentials,
                                                                   @Nullable
                                                                   Credentials overridingCredentials)
Deprecated. 

See Also:
CredentialUtils.overrideCredentialsIfSupplied(org.jclouds.domain.Credentials, org.jclouds.domain.Credentials)


Copyright © 2009-2011 jclouds. All Rights Reserved.