Uses of Interface
org.forgerock.util.Function
-
Packages that use Function Package Description org.forgerock.http.protocol Models and manages elements of the Hypertext Transfer Protocol.org.forgerock.json Provides an API for the traversal and manipulation of JSON object model structures in Java.org.forgerock.json.resource Classes and interfaces for core types including connections, request handlers, resources, and their exceptions.org.forgerock.openig.filter.oauth2.client.authentication Collection of heaplets supporting OAuth2 client authentication Filters.org.forgerock.openig.heap Manages collections or "heaps" of associated objects, initialized from declarative configuration artifacts.org.forgerock.openig.secrets Provides the Common Secrets API for accessing secrets of various kinds.org.forgerock.openig.tools.jwt.validation This package contains classes used to perform JWT validation.org.forgerock.openig.util Miscellaneous utility classes.org.forgerock.secrets Provides a unified API for accessing secrets of various kinds.org.forgerock.secrets.keystore Implementations ofSecretStore
for accessing keys stored in Java KeyStores, such as PKCS#11 Hardware Security Modules (HSMs) and PKCS#12 file-based encrypted key stores.org.forgerock.util Provides common interfaces and classes.org.forgerock.util.promise An implementation of thePromise
API in Java. -
-
Uses of Function in org.forgerock.http.protocol
Methods in org.forgerock.http.protocol that return Function Modifier and Type Method Description static <V,E extends Exception>
Function<NeverThrowsException,V,E>Responses. noopExceptionFunction()
Utility method returning an empty function, whose goal is to ease the transformation of aPromise
type.static <E extends Exception>
Function<E,Response,NeverThrowsException>Responses. onExceptionInternalServerError()
Utility function that returns aResponse
whose status isStatus.INTERNAL_SERVER_ERROR
and the exception attached to the response as the cause. -
Uses of Function in org.forgerock.json
Classes in org.forgerock.json that implement Function Modifier and Type Class Description class
JsonValueTraverseFunction
Methods in org.forgerock.json that return Function Modifier and Type Method Description static Function<JsonValue,byte[],JsonValueException>
JsonValueFunctions. base64Binary()
Returns abyte[]
by converting the JsonValue usingJsonValue.asString()
and thenBase64
-decoding the result.static Function<JsonValue,byte[],JsonValueException>
JsonValueFunctions. base64urlBinary()
Returns abyte[]
by converting the JsonValue usingJsonValue.asString()
and thenBase64url
-decoding the result.static Function<JsonValue,Charset,JsonValueException>
JsonValueFunctions. charset()
Returns the JSON string value as a character set used for byte encoding/decoding.static Function<JsonValue,JsonValue,JsonValueException>
JsonValueFunctions. deepTransformBy(Function<JsonValue,?,JsonValueException> function)
Returns the JSON value as the result of a deep JsonValue object-traversal, applying the provided transformfunction
to each element.static Function<JsonValue,Duration,JsonValueException>
JsonValueFunctions. duration()
Returns the JSON string value as aDuration
.static <T extends Enum<T>>
Function<JsonValue,T,JsonValueException>JsonValueFunctions. enumConstant(Class<T> type)
Returns the JSON string value as an enum constant of the specified enum type.static Function<JsonValue,Instant,JsonValueException>
JsonValueFunctions. epochSecondsInstant()
Returns aInstant
by converting the JsonValue into a number and interpreting that as the number of seconds since the UTC epoch as perInstant.ofEpochSecond(long)
.static Function<JsonValue,File,JsonValueException>
JsonValueFunctions. file()
Returns the JSON string value as aFile
object.static Function<JsonValue,JsonValue,JsonValueException>
JsonValueFunctions. identity()
Returns an identity function that will copy the inputJsonValue
.static Function<JsonValue,Instant,JsonValueException>
JsonValueFunctions. instant()
static Function<JsonValue,Integer,NumberFormatException>
JsonValueFunctions. integer()
Returns anInteger
by converting the JsonValue usingJsonValue.asInteger()
, or by parsing the JsonValue string usingInteger.parseInt(String)
.static <V,E extends Exception>
Function<JsonValue,List<V>,E>JsonValueFunctions. listOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aList
containing objects whose type (and value) is specified by a transformation function.static Function<JsonValue,Boolean,NeverThrowsException>
JsonValueFunctions. parseBoolean()
Returns aBoolean
by converting the JsonValue usingJsonValue.asLong()
, or by parsing the JsonValue string usingBoolean.parseBoolean(String)
.static Function<JsonValue,Long,NumberFormatException>
JsonValueFunctions. parseLong()
Returns aLong
by converting the JsonValue usingJsonValue.asLong()
, or by parsing the JsonValue string usingLong.parseLong(String)
.static Function<JsonValue,Pattern,JsonValueException>
JsonValueFunctions. pattern()
Returns the JSON string value as a regular expression pattern.static Function<JsonValue,JsonPointer,JsonValueException>
JsonValueFunctions. pointer()
Returns the JSON string value as a JSON pointer.static <V> Function<JsonValue,Set<V>,JsonValueException>
JsonValueFunctions. setOf(Class<V> type)
Returns the JSON value as aSet
containing objects whose type (and value) is specified by the parametertype
.static <V,E extends Exception>
Function<JsonValue,Set<V>,E>JsonValueFunctions. setOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aSet
containing objects whose type (and value) is specified by a transformation function.static Function<JsonValue,List<String>,JsonValueException>
JsonValueFunctions. stringOrListOfStrings()
Return a list of string values from the given JsonValue.static Function<JsonValue,URI,JsonValueException>
JsonValueFunctions. uri()
Returns the JSON string value as a uniform resource identifier.static Function<JsonValue,URL,JsonValueException>
JsonValueFunctions. url()
Returns the JSON string value as a uniform resource locator.static Function<JsonValue,UUID,JsonValueException>
JsonValueFunctions. uuid()
Returns the JSON string value as a universally unique identifier (UUID).Methods in org.forgerock.json with parameters of type Function Modifier and Type Method Description <V,E extends Exception>
VJsonValue. as(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as an object whose type (and value) is specified by a transformation function.static Function<JsonValue,JsonValue,JsonValueException>
JsonValueFunctions. deepTransformBy(Function<JsonValue,?,JsonValueException> function)
Returns the JSON value as the result of a deep JsonValue object-traversal, applying the provided transformfunction
to each element.static <V,E extends Exception>
Function<JsonValue,List<V>,E>JsonValueFunctions. listOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aList
containing objects whose type (and value) is specified by a transformation function.static <V,E extends Exception>
Function<JsonValue,Set<V>,E>JsonValueFunctions. setOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aSet
containing objects whose type (and value) is specified by a transformation function.Constructors in org.forgerock.json with parameters of type Function Constructor Description JsonValueTraverseFunction(Function<JsonValue,?,JsonValueException> transform)
Construct the traversal function with a transformation function to apply to each array element nested object attribute value element, or primitive element. -
Uses of Function in org.forgerock.json.resource
Methods in org.forgerock.json.resource that return Function Modifier and Type Method Description static Function<JsonValue,QueryFilter<JsonPointer>,JsonValueException>
JsonValueFunctions. queryFilter()
Parses and returns the JSON string value as aQueryFilter
.static Function<JsonValue,ResourcePath,JsonValueException>
JsonValueFunctions. resourcePath()
Returns the JSON string value as aResourcePath
. -
Uses of Function in org.forgerock.openig.filter.oauth2.client.authentication
Methods in org.forgerock.openig.filter.oauth2.client.authentication that return Function Modifier and Type Method Description protected Function<JsonValue,PrivateKeyJwtClientAuthenticationFilter.Builder<?>,HeapException>
EncryptedPrivateKeyJwtClientAuthenticationFilterHeaplet. configuredBuilder(EncryptedPrivateKeyJwtClientAuthenticationFilter.Builder builder)
Supports fulfillment of the suppliedEncryptedPrivateKeyJwtClientAuthenticationFilter.Builder
with configuration.protected Function<JsonValue,PrivateKeyJwtClientAuthenticationFilter.Builder<?>,HeapException>
PrivateKeyJwtClientAuthenticationFilterHeaplet. configuredBuilder(PrivateKeyJwtClientAuthenticationFilter.Builder<?> builder)
Supports fulfillment of the suppliedPrivateKeyJwtClientAuthenticationFilter.Builder
with configuration. -
Uses of Function in org.forgerock.openig.heap
Methods in org.forgerock.openig.heap that return Function Modifier and Type Method Description Function<JsonValue,JsonValue,JsonValueException>
GenericHeaplet. evaluatedWithHeapProperties()
Returns a function that will evaluate the expression hold by aJsonValue
using the properties defined in the heap of this Heaplet.protected <T> Function<JsonValue,Expression<T>,JsonValueException>
GenericHeaplet. expression(Class<T> type)
Returns a function that will create anExpression
from the string by theJsonValue
using the bindings defined in the heap of this Heaplet as initial bindings. -
Uses of Function in org.forgerock.openig.secrets
Methods in org.forgerock.openig.secrets that return Function Modifier and Type Method Description static Function<JsonValue,SecretsProvider,HeapException>
SecretsProviderHeaplet. secretsProvider(Heap heap)
Method supporting other client heaplets that wish to create aSecretsProvider
using alternative compact configuration formats. -
Uses of Function in org.forgerock.openig.tools.jwt.validation
Methods in org.forgerock.openig.tools.jwt.validation with parameters of type Function Modifier and Type Method Description <T,E extends Exception>
JwtValidator.BuilderJwtValidator.Builder. claim(String key, Function<JsonValue,? extends T,E> transformer, JwtClaimConstraint<T> jwtClaimConstraint)
Adds aJwtClaimConstraint
on a claim. -
Uses of Function in org.forgerock.openig.util
Methods in org.forgerock.openig.util that return Function Modifier and Type Method Description static Function<JsonValue,Bindings,JsonValueException>
JsonValues. bindings()
Returns a function that will create some bindings based of a Map-basedJsonValue
.static Function<JsonValue,Bindings,JsonValueException>
JsonValues. bindings(Bindings bindings)
Returns a function that will create some bindings based of a Map-basedJsonValue
.static Function<JsonValue,SecretReference<GenericSecret>,JsonValueException>
JsonValues. constantSecretReference()
Returns aSecretReference.constant(Secret)
from aGenericSecret
attribute value.static Function<JsonValue,EncryptionMethod,JsonValueException>
JsonValues. encryptionMethod()
Returns a function that transforms the JSON value to aEncryptionMethod
object.static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. evaluated()
Returns a function that will evaluate all String nodes.static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. evaluated(Bindings bindings)
Returns a function that will evaluate all String nodes.static <T,E extends Exception>
Function<JsonValue,T,E>JsonValues. expectedType(Class<T> type, Function<JsonValue,T,E> adapter)
Allows to usedefaultTo
in an heaplet configuration to retrieve an object.static <T> Function<JsonValue,Expression<T>,JsonValueException>
JsonValues. expression(Class<T> type)
Returns a function for transforming JsonValues to expressions.static <T> Function<JsonValue,Expression<T>,JsonValueException>
JsonValues. expression(Class<T> type, Bindings bindings)
Returns a function for transforming JsonValues to expressions.static Function<JsonValue,String,JsonValueException>
JsonValues. heapObjectNameOrPointer()
Returns a function that will look for the name of the object.static Function<JsonValue,Instant,JsonValueException>
JsonValues. instant()
static Function<JsonValue,Duration,JsonValueException>
JsonValues. javaDuration()
static <T> Function<JsonValue,LeftValueExpression<T>,JsonValueException>
JsonValues. leftValueExpression(Class<T> type)
Returns a function for transforming JsonValues to left-value expressions.static <T,E extends Exception>
Function<JsonValue,List<T>,E>JsonValues. listOf(Function<JsonValue,T,E> adapter)
Returns a function that transform a JSON node value into a list of adapted instances.static <T> Function<JsonValue,T,HeapException>
JsonValues. lookupOrCreateHeapObject(Heap heap, Class<T> type)
static Function<JsonValue,Optional<JsonValue>,JsonValueException>
JsonValues. optional()
static <T> Function<JsonValue,T,HeapException>
JsonValues. optionalHeapObject(Heap heap, Class<T> type)
static <T> Function<JsonValue,Optional<T>,JsonValueException>
JsonValues. optionalOf(Function<JsonValue,T,JsonValueException> delegate)
Returns a wrapping function returning anOptional
result of the givendelegate
function.static Function<JsonValue,Integer,JsonValueException>
JsonValues. positiveInteger()
static Function<JsonValue,Properties,JsonValueException>
JsonValues. properties()
Returns a function that transforms the JSON value to aProperties
object.static <S extends Secret>
Function<JsonValue,Purpose<S>,JsonValueException>JsonValues. purposeOf(Class<S> type)
static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. required(String message)
Displays a custom message when the required attribute is not present in the configuration.static <T> Function<JsonValue,T,HeapException>
JsonValues. requiredHeapObject(Heap heap, Class<T> type)
static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. resolvedLocation()
Returns a function that will resolve the field $location.static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. resolvedLocation(Bindings bindings)
Returns a function that will resolve the field $location.static Function<JsonValue,SecretPropertyFormat,JsonValueException>
JsonValues. secretPropertyFormat(Heap heap)
Returns aSecretPropertyFormat
object from aJsonValue
.static <S extends Secret>
Function<JsonValue,SecretReference<S>,JsonValueException>JsonValues. secretReferenceOf(Function<JsonValue,Purpose<S>,JsonValueException> purposeTransformer, SecretsProvider secretsProvider)
Returns a function that returns aSecretReference
for thePurpose
represented by the givenString
value label and known to the suppliedSecretsProvider
.static Function<JsonValue,JsonValue,JsonValueException>
JsonValues. slashEnded()
Returns the JsonValue with its value ended by a slash.static <V,E extends Exception>
Function<JsonValue,Stream<V>,E>JsonValues. streamOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aStream
containing objects whose type (and value) is specified by a transformation function.static Function<JsonValue,JsonValue,org.forgerock.config.resolvers.SubstitutionException>
JsonValues. tokenized(org.forgerock.config.resolvers.PropertyResolver propertyResolver)
Returns a function performing deep token substitution and object coercion ($ "functions").Methods in org.forgerock.openig.util with parameters of type Function Modifier and Type Method Description static <T,E extends Exception>
Function<JsonValue,T,E>JsonValues. expectedType(Class<T> type, Function<JsonValue,T,E> adapter)
Allows to usedefaultTo
in an heaplet configuration to retrieve an object.static <T,E extends Exception>
Function<JsonValue,List<T>,E>JsonValues. listOf(Function<JsonValue,T,E> adapter)
Returns a function that transform a JSON node value into a list of adapted instances.static <T> Function<JsonValue,Optional<T>,JsonValueException>
JsonValues. optionalOf(Function<JsonValue,T,JsonValueException> delegate)
Returns a wrapping function returning anOptional
result of the givendelegate
function.static <S extends Secret>
Function<JsonValue,SecretReference<S>,JsonValueException>JsonValues. secretReferenceOf(Function<JsonValue,Purpose<S>,JsonValueException> purposeTransformer, SecretsProvider secretsProvider)
Returns a function that returns aSecretReference
for thePurpose
represented by the givenString
value label and known to the suppliedSecretsProvider
.static <V,E extends Exception>
Function<JsonValue,Stream<V>,E>JsonValues. streamOf(Function<JsonValue,V,E> transformFunction)
Returns the JSON value as aStream
containing objects whose type (and value) is specified by a transformation function. -
Uses of Function in org.forgerock.secrets
Methods in org.forgerock.secrets with parameters of type Function Modifier and Type Method Description <T,E extends Exception>
TGenericSecret. reveal(Function<byte[],T,E> function)
Reveals the secret temporarily, allowing it to be used for its intended purpose.<T,E extends Exception>
TGenericSecret. revealAndDestroy(Function<byte[],T,E> function)
Reveals the secret temporarily and then scrubs the secret material from memory.<T,E extends Exception>
TGenericSecret. revealAsText(Charset charset, Function<char[],T,E> function)
Reveals the secret temporarily as characters in the given character set.<T,E extends Exception>
TGenericSecret. revealAsTextAndDestroy(Charset charset, Function<char[],T,E> function)
Reveals the secret temporarily as characters in the given character set and then scrubs the secret material from memory.<T,E extends Exception>
TGenericSecret. revealAsUtf8(Function<char[],T,E> function)
Reveals the secret temporarily as characters in UTF-8.<T,E extends Exception>
TGenericSecret. revealAsUtf8AndDestroy(Function<char[],T,E> function)
Reveals the secret temporarily as characters in UTF-8 and then scrubs the secret from memory. -
Uses of Function in org.forgerock.secrets.keystore
Classes in org.forgerock.secrets.keystore that implement Function Modifier and Type Class Description class
HsmKeyStoreLoader
A loader for theKeyStoreSecretStore
that knows how to load standard PKCS#11 Hardware Security Module (HSM) providers on our supported platforms.Constructors in org.forgerock.secrets.keystore with parameters of type Function Constructor Description KeyStoreSecretStore(Function<char[],KeyStore,KeyStoreException> keyStoreLoader, SecretReference<GenericSecret> keyStorePassword)
Initialises the keystore using the same password for the keystore and all keys and default configuration options.KeyStoreSecretStore(Function<char[],KeyStore,KeyStoreException> keyStoreLoader, SecretReference<GenericSecret> keyStorePassword, SecretReference<GenericSecret> keyEntryPassword, Options options, KeyStoreSecretStore.StableIdProvider stableIdProvider)
Initialises the key store.KeyStoreSecretStore(Function<char[],KeyStore,KeyStoreException> keyStoreLoader, SecretReference<GenericSecret> keyStorePassword, Options options)
Initialises the keystore using the same password for the keystore and all keys. -
Uses of Function in org.forgerock.util
Classes in org.forgerock.util that implement Function Modifier and Type Class Description class
CloseSilentlyFunction<VIN extends Closeable,VOUT,E extends Exception>
Function
that silently closes an input-parameter after a delegate-function'sapply(Object)
is invoked.Methods in org.forgerock.util that return Function Modifier and Type Method Description static <IN extends Closeable,OUT,EX extends Exception>
Function<IN,OUT,EX>CloseSilentlyFunction. closeSilently(Function<IN,OUT,EX> delegate)
Wraps a delegate function in aCloseSilentlyFunction
.Methods in org.forgerock.util with parameters of type Function Modifier and Type Method Description static <IN extends Closeable,OUT,EX extends Exception>
Function<IN,OUT,EX>CloseSilentlyFunction. closeSilently(Function<IN,OUT,EX> delegate)
Wraps a delegate function in aCloseSilentlyFunction
.static <T,R,E extends Exception>
Function<T,R>LambdaExceptionUtils. rethrowFunction(Function<T,R,E> function)
Constructors in org.forgerock.util with parameters of type Function Constructor Description CloseSilentlyFunction(Function<VIN,VOUT,E> delegate)
Creates a newCloseSilentlyFunction
instance. -
Uses of Function in org.forgerock.util.promise
Methods in org.forgerock.util.promise that return Function Modifier and Type Method Description static <V,E extends Exception>
Function<NeverThrowsException,V,E>NeverThrowsException. neverThrown()
Utility method returning an empty function, whose goal is to ease the transformation of aPromise
type.Methods in org.forgerock.util.promise with parameters of type Function Modifier and Type Method Description <VOUT> Promise<VOUT,E>
Promise. then(Function<? super V,VOUT,E> onResult)
Submits the provided function for execution once thisPromise
has completed with a result, and returns a newPromise
representing the outcome of the function.<VOUT,EOUT extends Exception>
Promise<VOUT,EOUT>Promise. then(Function<? super V,VOUT,EOUT> onResult, Function<? super E,VOUT,EOUT> onException)
Submits the provided functions for execution once thisPromise
has completed (with a result or an exception), and returns a newPromise
representing the outcome of the invoked function.<VOUT,EOUT extends Exception>
Promise<VOUT,EOUT>Promise. then(Function<? super V,VOUT,EOUT> onResult, Function<? super E,VOUT,EOUT> onException, Function<? super RuntimeException,VOUT,EOUT> onRuntimeException)
Submits the provided functions for execution once thisPromise
has completed (with a result or an exception or aRuntimeException
), and returns a newPromise
representing the outcome of the invoked function.<VOUT> Promise<VOUT,E>
PromiseImpl. then(Function<? super V,VOUT,E> onResult)
<VOUT,EOUT extends Exception>
Promise<VOUT,EOUT>PromiseImpl. then(Function<? super V,VOUT,EOUT> onResult, Function<? super E,VOUT,EOUT> onException)
<VOUT,EOUT extends Exception>
Promise<VOUT,EOUT>PromiseImpl. then(Function<? super V,VOUT,EOUT> onResult, Function<? super E,VOUT,EOUT> onException, Function<? super RuntimeException,VOUT,EOUT> onRuntimeException)
<EOUT extends Exception>
Promise<V,EOUT>Promise. thenCatch(Function<? super E,V,EOUT> onException)
Submits the provided function for execution once thisPromise
has not completed with a result (has completed with an exception), and returns a newPromise
representing the outcome of the function.<EOUT extends Exception>
Promise<V,EOUT>PromiseImpl. thenCatch(Function<? super E,V,EOUT> onException)
Promise<V,E>
Promise. thenCatchRuntimeException(Function<? super RuntimeException,V,E> onRuntimeException)
Submits the provided function for execution once thisPromise
has not completed with a result nor with an exception but with aRuntimeException
, and returns a newPromise
representing the outcome of the function.Promise<V,E>
PromiseImpl. thenCatchRuntimeException(Function<? super RuntimeException,V,E> onRuntimeException)
-