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

21 lines
508 B
Java

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);
}