ISE-ComProg-After-Midterm/screwdriver-3.5.6/box/snippets/java/UserContext.java

21 lines
508 B
Java
Raw Normal View History

2020-10-29 09:38:56 +00:00
package +zoccolo+.web.authentication;
import +beanposition+.+bean+;
public interface UserContext {
/**
* Gets the currently logged in {@link +bean+} or null if there is no authenticated user.
*
* @return
*/
+bean+ getCurrentUser();
/**
* Sets the currently logged in {@link +bean+}.
* @param user the logged in {@link +bean+}. Cannot be null.
* @throws IllegalArgumentException if the {@link +bean+} is null.
*/
void setCurrentUser(+bean+ user);
}