In these exercises, we will use AspectJ and annotations to protect the access to a number of methods in the figure editor application.
You can reuse the AspectJ project with the figure editor application you have created during the previous track. If you haven't got such a project yet, consult the Invariants: Intro page.
Have a look at the annotation defined as Authenticated
inside the package figures.annotations
. It is used to mark methods and constructors to which we want to restrict access. The Role
enumeration is used to mark different roles with an increasing clearance level: user, supervisor and administrator.
You can find out where this annotation is being used by right-clicking it and selecting References → Project. Note that we have already employed this annotation to mark the following access restrictions:
In this track, we will use aspects to enforce the access restriction specified by these annotations.
Start the track at Exercise 1.