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 proxyClassinstances as well as instances contained in reactive types (if reactor is present), collection types, and other container types likeOptionalandSupplierThe defaultAuthorizationAdvisorProxyFactory.TargetVisitorthat 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
Listinstead of the list itselfReturning
nullimplies 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 proxyClassinstances as well as instances contained in reactive types (if reactor is present), collection types, and other container types likeOptionalandSupplier -
defaultsSkipValueTypes
The defaultAuthorizationAdvisorProxyFactory.TargetVisitorthat also skips any value types (for example,String,Integer). This is handy for annotations likeAuthorizeReturnObjectwhen 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
-