Uses of Interface
org.forgerock.util.Function
Packages that use Function
Package
Description
Models and manages elements of the Hypertext Transfer Protocol.
Provides an API for the traversal and manipulation of JSON object model structures in Java.
Classes and interfaces for core types including connections, request
handlers, resources, and their exceptions.
This package contains the OAuth2 Token validation filter that acts as an OAuth 2 Resource Server.
Collection of heaplets supporting OAuth2 client authentication Filters.
Manages collections or "heaps" of associated objects, initialized from
declarative configuration artifacts.
Provides the Common Secrets API for accessing secrets of various kinds.
This package contains classes used to perform JWT validation.
Miscellaneous utility classes.
Provides a unified API for accessing secrets of various kinds.
Implementations of
SecretStore for accessing keys stored in Java KeyStores, such as
PKCS#11 Hardware Security Modules (HSMs) and PKCS#12 file-based encrypted key stores.Provides common interfaces and classes.
An implementation of the
Promise API in Java.-
Uses of Function in org.forgerock.http.protocol
Methods in org.forgerock.http.protocol that return FunctionModifier and TypeMethodDescriptionstatic <V,E extends Exception>
Function<NeverThrowsException,V, E> Responses.noopExceptionFunction()Utility method returning an empty function, whose goal is to ease the transformation of aPromisetype.static <E extends Exception>
Function<E,Response, NeverThrowsException> Responses.onExceptionInternalServerError()Utility function that returns aResponsewhose status isStatus.INTERNAL_SERVER_ERRORand the exception attached to the response as the cause. -
Uses of Function in org.forgerock.json
Classes in org.forgerock.json that implement FunctionModifier and TypeClassDescriptionclassMethods in org.forgerock.json that return FunctionModifier and TypeMethodDescriptionstatic 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 transformfunctionto 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 aInstantby 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 aFileobject.static Function<JsonValue,JsonValue, JsonValueException> JsonValueFunctions.identity()Deprecated.static Function<JsonValue,Instant, JsonValueException> JsonValueFunctions.instant()JsonValueFunctions.integer()Returns anIntegerby converting the JsonValue usingJsonValue.asInteger(), or by parsing the JsonValue string usingInteger.parseInt(String).Returns the JSON value as aListcontaining objects whose type (and value) is specified by a transformation function.static Function<JsonValue,Number, JsonValueException> JsonValueFunctions.numberInInclusiveRange(Number lower, Number upper) Returns a function that returns a number in the inclusive range oflowerandupper(ornull) from aJsonValue.static Function<JsonValue,Optional<JsonValue>, JsonValueException> JsonValueFunctions.optional()Return anOptionalif the given JsonValue has a value, orOptional.empty()if the JsonValue contains a null value.static <T> Function<JsonValue,Optional<T>, JsonValueException> JsonValueFunctions.optionalOf(Function<JsonValue, T, JsonValueException> mappingFunction) Return anOptionalof a new type if the given JsonValue has a value, orOptional.empty()if the JsonValue contains a null value.static Function<JsonValue,Boolean, NeverThrowsException> JsonValueFunctions.parseBoolean()Returns aBooleanby converting the JsonValue usingJsonValue.asLong(), or by parsing the JsonValue string usingBoolean.parseBoolean(String).static Function<JsonValue,Long, NumberFormatException> JsonValueFunctions.parseLong()Returns aLongby 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.JsonValueFunctions.pointer()Returns the JSON string value as a JSON pointer.static Function<JsonValue,Double, JsonValueException> JsonValueFunctions.positiveDouble()static Function<JsonValue,Integer, JsonValueException> JsonValueFunctions.positiveInteger()static <V> Function<JsonValue,Set<V>, JsonValueException> Returns the JSON value as aSetcontaining objects whose type (and value) is specified by the parametertype.Returns the JSON value as aSetcontaining 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 FunctionModifier and TypeMethodDescription<V,E extends Exception>
VReturns 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 transformfunctionto each element.Returns the JSON value as aListcontaining objects whose type (and value) is specified by a transformation function.static <T> Function<JsonValue,Optional<T>, JsonValueException> JsonValueFunctions.optionalOf(Function<JsonValue, T, JsonValueException> mappingFunction) Return anOptionalof a new type if the given JsonValue has a value, orOptional.empty()if the JsonValue contains a null value.Returns the JSON value as aSetcontaining objects whose type (and value) is specified by a transformation function.Constructors in org.forgerock.json with parameters of type FunctionModifierConstructorDescriptionJsonValueTraverseFunction(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 FunctionModifier and TypeMethodDescriptionJsonValueFunctions.queryFilter()Parses and returns the JSON string value as aQueryFilter.JsonValueFunctions.resourcePath()Returns the JSON string value as aResourcePath. -
Uses of Function in org.forgerock.openig.filter.oauth2
Methods in org.forgerock.openig.filter.oauth2 that return FunctionModifier and TypeMethodDescriptionstatic Function<JsonValue,ResourceAccess, HeapException> ResourceAccessConfigSupport.resourceAccess(Heap heap) JsonValuefunction capable of configuring an instance of aResourceAccesssubtype from suppliedscopesconfiguration. -
Uses of Function in org.forgerock.openig.filter.oauth2.client.authentication
Methods in org.forgerock.openig.filter.oauth2.client.authentication that return FunctionModifier and TypeMethodDescriptionEncryptedPrivateKeyJwtClientAuthenticationFilterHeaplet.configuredBuilder(EncryptedPrivateKeyJwtClientAuthenticationFilter.Builder builder) Supports fulfillment of the suppliedEncryptedPrivateKeyJwtClientAuthenticationFilter.Builderwith configuration.PrivateKeyJwtClientAuthenticationFilterHeaplet.configuredBuilder(PrivateKeyJwtClientAuthenticationFilter.Builder<?> builder) Supports fulfillment of the suppliedPrivateKeyJwtClientAuthenticationFilter.Builderwith configuration. -
Uses of Function in org.forgerock.openig.heap
Methods in org.forgerock.openig.heap that return FunctionModifier and TypeMethodDescriptionGenericHeaplet.evaluatedWithHeapProperties()Returns a function that will evaluate the expression hold by aJsonValueusing the properties defined in the heap of this Heaplet.protected <T> Function<JsonValue,org.forgerock.openig.el.Expression<T>, JsonValueException> GenericHeaplet.expression(Class<T> type) Returns a function that will create anExpressionfrom the string by theJsonValueusing 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 FunctionModifier and TypeMethodDescriptionSecretsProviderHeaplet.secretsProvider(Heap heap) Method supporting other client heaplets that wish to create aSecretsProviderusing 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 FunctionModifier and TypeMethodDescription<T,E extends Exception>
JwtValidator.BuilderJwtValidator.Builder.claim(String key, Function<JsonValue, ? extends T, E> transformer, JwtClaimConstraint<T> jwtClaimConstraint) Adds aJwtClaimConstrainton a claim.<T,E extends Exception>
JwtValidator.BuilderJwtValidator.Builder.optionalClaim(String key, Function<JsonValue, ? extends T, E> transformer, JwtClaimConstraint<T> jwtClaimConstraint) Adds aJwtClaimConstrainton an optional claim. -
Uses of Function in org.forgerock.openig.util
Methods in org.forgerock.openig.util that return FunctionModifier and TypeMethodDescriptionstatic Function<JsonValue,org.forgerock.openig.el.Bindings, JsonValueException> JsonValues.bindings()Returns a function that will create some bindings based of a Map-basedJsonValue.static Function<JsonValue,org.forgerock.openig.el.Bindings, JsonValueException> JsonValues.bindings(org.forgerock.openig.el.Bindings bindings) Returns a function that will create some bindings based of a Map-basedJsonValue.JsonValues.constantSecretReference()Returns aSecretReference.constant(Secret)from aGenericSecretattribute value.JsonValues.encryptionMethod()Returns a function that transforms the JSON value to aEncryptionMethodobject.static Function<JsonValue,JsonValue, JsonValueException> JsonValues.evaluated()Returns a function that will evaluate all String nodes.static Function<JsonValue,JsonValue, JsonValueException> JsonValues.evaluated(org.forgerock.openig.el.Bindings bindings) Returns a function that will evaluate all String nodes.JsonValues.expectedType(Class<T> type, Function<JsonValue, T, E> adapter) Allows to usedefaultToin an heaplet configuration to retrieve an object.static <T> Function<JsonValue,org.forgerock.openig.el.Expression<T>, JsonValueException> JsonValues.expression(Class<T> type) Returns a function for transforming JsonValues to expressions.static <T> Function<JsonValue,org.forgerock.openig.el.Expression<T>, JsonValueException> JsonValues.expression(Class<T> type, org.forgerock.openig.el.Bindings bindings) Returns a function for transforming JsonValues to expressions.static Function<JsonValue,Instant, JsonValueException> JsonValues.instant()static Function<JsonValue,Duration, JsonValueException> JsonValues.javaDuration()static Function<JsonValue,JwtFactory, HeapException> JwtFactoryConfigUtils.jwtFactory(Heap heap, SecretsProvider secretsProvider) Function supporting transformation of JSON configuration to aJwtFactoryinstance registered in the heap.static <T> Function<JsonValue,org.forgerock.openig.el.LeftValueExpression<T>, JsonValueException> JsonValues.leftValueExpression(Class<T> type) Returns a function for transforming JsonValues to left-value expressions.static Function<JsonValue,Duration, JsonValueException> JsonValues.limitedDuration(Duration defaultDuration) Transform duration configuration to aDuration, ensuring its value is limited.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) Returns the JSON value as aMapcontaining values whose type is specified by a transformation function.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 anOptionalresult of the givendelegatefunction.static Function<JsonValue,Duration, JsonValueException> JsonValues.positiveLimitedDuration(Duration defaultDuration) Transform duration configuration to aDuration, ensuring its value is positive and limited.JsonValues.properties()Returns a function that transforms the JSON value to aPropertiesobject.static <S extends Secret>
Function<JsonValue,Purpose<S>, JsonValueException> static Function<JsonValue,JsonValue, JsonValueException> 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(org.forgerock.openig.el.Bindings bindings) Returns a function that will resolve the field $location.JsonValues.secretPropertyFormat(Heap heap) Returns aSecretPropertyFormatobject 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 aSecretReferencefor thePurposerepresented by the givenStringvalue label and known to the suppliedSecretsProvider.Returns a function that transform a JSON node value into a Set of adapted instances.static Function<JsonValue,JwtFactory, HeapException> JwtFactoryConfigUtils.signedJwtFactory(Heap heap, SecretsProvider secretsProvider) Function supporting transformation of JSON configuration to aJwtFactoryinstance registered in the heap.static Function<JsonValue,JsonValue, JsonValueException> JsonValues.slashEnded()Returns the JsonValue with its value ended by a slash.Returns the JSON value as aStreamcontaining objects whose type (and value) is specified by a transformation function.JsonValues.tokenized(org.forgerock.config.resolvers.PropertyResolver propertyResolver) Returns a function performing deep token substitution and object coercion ($ "functions").static Function<JsonValue,JsonValue, JsonValueException> JsonValues.trailingSlashRemoved()Returns the JsonValue with any trailing slash removed from the value.Methods in org.forgerock.openig.util with parameters of type FunctionModifier and TypeMethodDescription<R,E extends Exception>
RApply a function to the chosen value.JsonValues.expectedType(Class<T> type, Function<JsonValue, T, E> adapter) Allows to usedefaultToin an heaplet configuration to retrieve an object.Returns a function that transform a JSON node value into a list of adapted instances.Returns the JSON value as aMapcontaining values whose type is specified by a transformation function.static <T> Function<JsonValue,Optional<T>, JsonValueException> JsonValues.optionalOf(Function<JsonValue, T, JsonValueException> delegate) Returns a wrapping function returning anOptionalresult of the givendelegatefunction.static <S extends Secret>
Function<JsonValue,SecretReference<S>, JsonValueException> JsonValues.secretReferenceOf(Function<JsonValue, Purpose<S>, JsonValueException> purposeTransformer, SecretsProvider secretsProvider) Returns a function that returns aSecretReferencefor thePurposerepresented by the givenStringvalue label and known to the suppliedSecretsProvider.Returns a function that transform a JSON node value into a Set of adapted instances.Returns the JSON value as aStreamcontaining 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 FunctionModifier and TypeMethodDescription<T,E extends Exception>
TReveals the secret temporarily, allowing it to be used for its intended purpose.<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.revealAsUtf8(Function<char[], T, E> function) Reveals the secret temporarily as characters in UTF-8. -
Uses of Function in org.forgerock.secrets.keystore
Classes in org.forgerock.secrets.keystore that implement FunctionModifier and TypeClassDescriptionfinal classA loader for theKeyStoreSecretStorethat 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 FunctionModifierConstructorDescriptionKeyStoreSecretStore(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 FunctionModifier and TypeClassDescriptionclassCloseSilentlyFunction<VIN extends Closeable,VOUT, E extends Exception> Functionthat silently closes an input-parameter after a delegate-function'sapply(Object)is invoked.Methods in org.forgerock.util that return FunctionModifier and TypeMethodDescriptionReturns a composed function that first applies this function to its input, and then applies theafterfunction to the result.CloseSilentlyFunction.closeSilently(Function<IN, OUT, EX> delegate) Wraps a delegate function in aCloseSilentlyFunction.Returns a composed function that first applies thebeforefunction to its input, and then applies this function to the result.Function.identity()Returns an identity function that returns the input as output.Methods in org.forgerock.util with parameters of type FunctionModifier and TypeMethodDescriptionReturns a composed function that first applies this function to its input, and then applies theafterfunction to the result.CloseSilentlyFunction.closeSilently(Function<IN, OUT, EX> delegate) Wraps a delegate function in aCloseSilentlyFunction.Returns a composed function that first applies thebeforefunction to its input, and then applies this function to the result.LambdaExceptionUtils.rethrowFunction(Function<T, R, E> function) Constructors in org.forgerock.util with parameters of type FunctionModifierConstructorDescriptionCloseSilentlyFunction(Function<VIN, VOUT, E> delegate) Creates a newCloseSilentlyFunctioninstance. -
Uses of Function in org.forgerock.util.promise
Methods in org.forgerock.util.promise that return FunctionModifier and TypeMethodDescriptionstatic <V,E extends Exception>
Function<NeverThrowsException,V, E> NeverThrowsException.neverThrown()Utility method returning an empty function, whose goal is to ease the transformation of aPromisetype.Methods in org.forgerock.util.promise with parameters of type FunctionModifier and TypeMethodDescriptionSubmits the provided function for execution once thisPromisehas completed with a result, and returns a newPromiserepresenting the outcome of the function.Submits the provided functions for execution once thisPromisehas completed (with a result or an exception), and returns a newPromiserepresenting the outcome of the invoked function.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 thisPromisehas completed (with a result or an exception or aRuntimeException), and returns a newPromiserepresenting the outcome of the invoked function.PromiseImpl.then(Function<? super V, VOUT, EOUT> onResult, Function<? super E, VOUT, EOUT> onException, Function<? super RuntimeException, VOUT, EOUT> onRuntimeException) Submits the provided function for execution once thisPromisehas not completed with a result (has completed with an exception), and returns a newPromiserepresenting the outcome of the function.Promise.thenCatchRuntimeException(Function<? super RuntimeException, V, E> onRuntimeException) Submits the provided function for execution once thisPromisehas not completed with a result nor with an exception but with aRuntimeException, and returns a newPromiserepresenting the outcome of the function.PromiseImpl.thenCatchRuntimeException(Function<? super RuntimeException, V, E> onRuntimeException)
JsonValue::copydirectly instead