public class InvocationContext extends Object
invocation of an operation
.Constructor and Description |
---|
InvocationContext(ApiVersion apiVersion,
SecurityContext securityContext,
Map<String,Object> arguments)
Deprecated.
since 2.5.0 for removal in 2.7.0 in favor of
InvocationContext(SecurityContext, Map, OperationArgumentResolver[]) |
InvocationContext(SecurityContext securityContext,
Map<String,Object> arguments)
Creates a new context for an operation being invoked by the given
securityContext with the given available arguments . |
InvocationContext(SecurityContext securityContext,
Map<String,Object> arguments,
OperationArgumentResolver... argumentResolvers)
Creates a new context for an operation being invoked by the given
securityContext with the given available arguments . |
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve(Class<?> type)
Returns whether or not the context is capable of resolving an argument of the given
type . |
ApiVersion |
getApiVersion()
Deprecated.
since 2.5.0 for removal in 2.7.0 in favor of
resolveArgument(Class) using
ApiVersion |
Map<String,Object> |
getArguments()
Return the invocation arguments.
|
SecurityContext |
getSecurityContext()
Deprecated.
since 2.5.0 for removal in 2.7.0 in favor of
resolveArgument(Class) |
<T> T |
resolveArgument(Class<T> argumentType)
Resolves an argument with the given
argumentType . |
public InvocationContext(SecurityContext securityContext, Map<String,Object> arguments)
securityContext
with the given available arguments
.securityContext
- the current security context. Never null
arguments
- the arguments available to the operation. Never null
@Deprecated public InvocationContext(ApiVersion apiVersion, SecurityContext securityContext, Map<String,Object> arguments)
InvocationContext(SecurityContext, Map, OperationArgumentResolver[])
securityContext
with the given available arguments
.apiVersion
- the API version or null
to use the latestsecurityContext
- the current security context. Never null
arguments
- the arguments available to the operation. Never null
public InvocationContext(SecurityContext securityContext, Map<String,Object> arguments, OperationArgumentResolver... argumentResolvers)
securityContext
with the given available arguments
.securityContext
- the current security context. Never null
arguments
- the arguments available to the operation. Never null
argumentResolvers
- resolvers for additional arguments should be available to
the operation.@Deprecated public ApiVersion getApiVersion()
resolveArgument(Class)
using
ApiVersion
@Deprecated public SecurityContext getSecurityContext()
resolveArgument(Class)
public Map<String,Object> getArguments()
public <T> T resolveArgument(Class<T> argumentType)
argumentType
.T
- type of the argumentargumentType
- type of the argumentnull
canResolve(Class)
public boolean canResolve(Class<?> type)
type
. Note that, even when true
is returned,
argument resolution
will return null
if no
argument of the required type is available.type
- argument typetrue
if resolution of arguments of the given type is possible,
otherwise false
.resolveArgument(Class)