user.tex 1.8 KB

12345678910111213141516171819202122232425262728
  1. \section{User}
  2. \label{sec:user}
  3. To manage system accounts, \salespoint{} has a notion of a user in the form of the \code{User} interface.
  4. Users are managed by the \code{UserManager}, who is also an interface.
  5. The implementing classes handling the persistence aspects are \code{PersistentUser} and \code{PersistentUserManager}, respectively.
  6. Every user is uniquely identified by a \code{UserIdentifier}, which also serves as primary key attribute for the database in the peristent implementation.
  7. The UML model is depicted in Figure \ref{user_overview}.\\
  8. \begin{figure}
  9. \centering
  10. \includegraphics[width=1.0\textwidth]{images/User_Overview.eps}
  11. \label{user_overview}
  12. \caption{User - Class Overview}
  13. \end{figure}
  14. \subsection*{UserCapabilities}
  15. Capabilities in conjunction with a \code{HasCapabilityTag} (Section \ref{spring}) can be used to change the appearance of a View, depending on a users status.
  16. For example, a View for a user having an ``administrator'' capability may display different content, for example delete buttons, than for a user not having that capability.
  17. Thus, capabilities allow for flexibility and assist in code reuse, when designing the View.
  18. %Extensibility is achieved by using capabilities in conjunction with the \code{Has, which are aggregated by \code{User}s.
  19. \subsection*{Login}
  20. To reduce code repetition, \salespoint{} contains code to automate user log in.
  21. Using a JSP template, a special login form is generated, which is handled by an interceptor.\footnote{An interceptor is a Spring concept.}
  22. The interceptor verifies the user password and associates the current session with the user using \code{login} and \code{logoff}.
  23. The session is required, because multiple users can be logged on at the same time.\\
  24. To modify the content of the View, depending on whether a user is logged in or not, the \code{LoggedInTag} can be used.