Interface MyAccessIntroduction<T>
- All Known Implementing Classes:
MyAccessIntroductionImpl
public interface MyAccessIntroduction<T>
This is an example AOP Introduction interface that will be added to
a targeted object at runtime. This is an interface and methods that the
target object does not have at compile-time.
Its purpose is to identify which roles the attributed user has for the target object and keep that information with the target object. It is intended to be assigned to a data object.
It is assumed that we are creating this introduction to be marshaled with the target in a JSON document. Therefore, there are some Jackson aspects added that are required to get the proxy marshaled correctly.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static final record
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
Instead of returning a raw target, hide the target from proxy within a wrapper but eliminate the wrapper when marshalling.void
-
Method Details
-
getUserRoles
List<MyAccessIntroduction.Access> getUserRoles() -
setUserRoles
-
getData
T getData() -
getRawTarget
MyAccessIntroduction.TargetWrapper<T> getRawTarget()Instead of returning a raw target, hide the target from proxy within a wrapper but eliminate the wrapper when marshalling. An alternative would have been to clone the data target. This should be much cheaper.
-