public class SafeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <S,T> T |
callNotNull(S source,
Function<S,T> getter) |
static void |
generateNewCredentialsIfOlderThan(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider,
Role role,
int time,
TimeUnit timeUnit) |
static <E extends Enum<E>> |
getName(E type) |
static <S,T> List<T> |
mapNotNull(List<S> source,
S3Connection connection,
Class<T> type) |
static <S,T> List<T> |
mapNotNull(List<S> source,
S3Connection connection,
Supplier<software.amazon.awssdk.utils.builder.SdkBuilder<?,T>> builderSupplier)
safely map a list of items.
|
static <S,T> T |
mapNotNull(S source,
S3Connection connection,
Class<T> type) |
static <S,T> T |
mapNotNull(S source,
S3Connection connection,
software.amazon.awssdk.utils.builder.SdkBuilder<?,T> builder)
Safely mapp a single Source to Target class using Connection
|
static Instant |
toInstant(LocalDateTime localDateTime) |
static TemporalUnit |
toTemporalUnit(TimeUnit timeUnit) |
public static <S,T> T callNotNull(S source,
Function<S,T> getter)
public static <S,T> T mapNotNull(S source,
S3Connection connection,
software.amazon.awssdk.utils.builder.SdkBuilder<?,T> builder)
S - SourceT - Targetsource - Source objectconnection - S3 Connection to use for .map accessbuilder - builder object to use while mappingpublic static <S,T> T mapNotNull(S source,
S3Connection connection,
Class<T> type)
public static <S,T> List<T> mapNotNull(List<S> source, S3Connection connection, Supplier<software.amazon.awssdk.utils.builder.SdkBuilder<?,T>> builderSupplier)
S - SourceT - Targetsource - Source list of itemsconnection - S3 Connection to use for .map accessbuilderSupplier - Supplier of SdkBuilderspublic static <S,T> List<T> mapNotNull(List<S> source, S3Connection connection, Class<T> type)
public static Instant toInstant(LocalDateTime localDateTime)
public static void generateNewCredentialsIfOlderThan(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider,
Role role,
int time,
TimeUnit timeUnit)
public static TemporalUnit toTemporalUnit(TimeUnit timeUnit)
Copyright © 2025 MuleSoft, Inc.. All rights reserved.