@FunctionalInterface public interface ExpressionResolver
ModelType.EXPRESSION expressions in a ModelNode.| Modifier and Type | Interface and Description |
|---|---|
static class |
ExpressionResolver.ExpressionResolutionServerException
Runtime exception used to indicate a failure in some
resolver extension execution
not due to problems with user input like the expression string being resolved or the configuration
of resources backing the resolver extension. |
static class |
ExpressionResolver.ExpressionResolutionUserException
Runtime exception used to indicate some user-driven problem that prevented expression
resolution, for example:
A flaw in a user provided expression string that results in a
ExpressionResolverExtension
not being able to resolve the expression. |
static interface |
ExpressionResolver.ResolverExtensionRegistry
Registry for
extensions to a server or host controller's ExpressionResolver. |
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
EXPRESSION_PATTERN
A
Pattern that can be used to identify strings that include expression syntax |
static ExpressionResolver |
REJECTING
An expression resolver that throws an
OperationFailedException if any expressions are found. |
static ExpressionResolver |
SIMPLE
An
ExpressionResolver that can only resolve from system properties
and environment variables. |
static ExpressionResolver |
SIMPLE_LENIENT
An expression resolver that will not throw an
OperationFailedException when it encounters an
unresolvable expression, instead simply returning that expression. |
static ExpressionResolver |
TEST_RESOLVER
An
ExpressionResolver suitable for test cases that can only resolve from system properties
and environment variables. |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.dmr.ModelNode |
resolveExpressions(org.jboss.dmr.ModelNode node)
Resolves any expressions in the passed in ModelNode.
|
default org.jboss.dmr.ModelNode |
resolveExpressions(org.jboss.dmr.ModelNode node,
OperationContext context)
Resolves any expressions in the passed in ModelNode.
|
static final Pattern EXPRESSION_PATTERN
Pattern that can be used to identify strings that include expression syntaxstatic final ExpressionResolver SIMPLE
ExpressionResolver that can only resolve from system properties
and environment variables. Should not be used for most product resolution use cases as it does
not support resolution from a security vault.static final ExpressionResolver TEST_RESOLVER
ExpressionResolver suitable for test cases that can only resolve from system properties
and environment variables.
Should not be used for production code as it does not support resolution from a security vault.static final ExpressionResolver SIMPLE_LENIENT
OperationFailedException when it encounters an
unresolvable expression, instead simply returning that expression. Should not be used for most product
resolution use cases as it does not support resolution from a security vault.static final ExpressionResolver REJECTING
OperationFailedException if any expressions are found.
Intended for use with APIs where an ExpressionResolver is required but the caller requires
that all expression have already been resolved.org.jboss.dmr.ModelNode resolveExpressions(org.jboss.dmr.ModelNode node)
throws OperationFailedException
ExpressionResolverExtension registered using the ExpressionResolver.ResolverExtensionRegistry.node - the ModelNode containing expressions.ExpressionResolver.ExpressionResolutionUserException - if expression is a form understood by the resolver but in some
way is unacceptable. This should only be thrown due to flaws in the
provided expression or the configuration of resources used by
a resolver extension, which are 'user' problems. It should not
be used for internal problems in the resolver or any extension. If a
if a security manager exists and its
checkPermission method doesn't
allow access to a relevant system property or environment variable,
an ExpressionResolutionUserException should be thrown.OperationFailedException - if an ExpressionResolverExtension throws one from its
ExpressionResolverExtension.initialize(OperationContext) method.ExpressionResolver.ExpressionResolutionServerException - if some other internal expression resolution failure occurs.default org.jboss.dmr.ModelNode resolveExpressions(org.jboss.dmr.ModelNode node,
OperationContext context)
throws OperationFailedException
ExpressionResolverExtension registered using the ExpressionResolver.ResolverExtensionRegistry.
For vaulted data the format is ${VAULT::vault_block::attribute_name::sharedKey}node - the ModelNode containing expressions.context - the current OperationContext to provide additional contextual information.ExpressionResolver.ExpressionResolutionUserException - if expression is a form understood by the resolver but in some
way is unacceptable. This should only be thrown due to flaws in the
provided expression or the configuration of resources used by
the resolver extension, which are 'user' problems>. It should not
be used for internal problems in the resolver extension. If a
if a security manager exists and its
checkPermission method doesn't
allow access to a relevant system property or environment variable,
an ExpressionResolutionUserException should be thrownOperationFailedException - if an ExpressionResolverExtension throws one from its
ExpressionResolverExtension.initialize(OperationContext) method.ExpressionResolver.ExpressionResolutionServerException - if some other internal expression resolution failure occurs.Copyright © 2022 JBoss by Red Hat. All rights reserved.