Interface AuthorizationAdvisorProxyFactory.TargetVisitor
- Enclosing class:
- AuthorizationAdvisorProxyFactory
public static interface AuthorizationAdvisorProxyFactory.TargetVisitor
An interface to handle how the
AuthorizationAdvisorProxyFactory
should step
through the target's object hierarchy.-
Method Summary
Modifier and TypeMethodDescriptiondefaults()
The defaultAuthorizationAdvisorProxyFactory.TargetVisitor
, which will proxyClass
instances as well as instances contained in reactive types (if reactor is present), collection types, and other container types likeOptional
andSupplier
The defaultAuthorizationAdvisorProxyFactory.TargetVisitor
that also skips any value types (for example,String
,Integer
).of
(AuthorizationAdvisorProxyFactory.TargetVisitor... visitors) Compose a set of visitors.visit
(AuthorizationAdvisorProxyFactory proxyFactory, Object target) Visit and possibly proxy this object.
-
Method Details
-
visit
Visit and possibly proxy this object.Visiting may take the form of walking down this object's hierarchy and proxying sub-objects.
An example is a visitor that proxies the elements of a
List
instead of the list itselfReturning
null
implies that this visitor does not want to proxy this object- Parameters:
proxyFactory
- the proxy factory to delegate proxying to for any sub-objectstarget
- the object to proxy- Returns:
- the visited (and possibly proxied) object
-
defaults
The defaultAuthorizationAdvisorProxyFactory.TargetVisitor
, which will proxyClass
instances as well as instances contained in reactive types (if reactor is present), collection types, and other container types likeOptional
andSupplier
-
defaultsSkipValueTypes
The defaultAuthorizationAdvisorProxyFactory.TargetVisitor
that also skips any value types (for example,String
,Integer
). This is handy for annotations likeAuthorizeReturnObject
when used at the class level -
of
static AuthorizationAdvisorProxyFactory.TargetVisitor of(AuthorizationAdvisorProxyFactory.TargetVisitor... visitors) Compose a set of visitors. This is helpful when you are customizing for a given type and still want the defaults applied for the remaining types.The resulting visitor will execute the first visitor that returns a non-null value.
- Parameters:
visitors
- the set of visitors- Returns:
- a composite that executes the first visitor that returns a non-null value
-