Package com.jk.webstack.controllers
Class JKWebAppBaseController
java.lang.Object
com.jk.web.faces.controllers.JKWebController
com.jk.webstack.controllers.JKWebAppBaseController
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 JKWebControllerWithSqlDataAccess
This class is a base controller for web applications that provides utility
 methods for managing user information, logging actions, and accessing
 services related to user actions and email communication.
- See Also:
 
- 
Field Summary
Fields inherited from class com.jk.web.faces.controllers.JKWebController
logger - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected StringThis method gets the name to use for action logging.protected ActionLogsServiceThis method gets the action log service.getEmail()This method gets the email address of the currently logged-in user from the ID token.protected EmailServiceThis method gets the email service.This method gets the family name (last name) of the currently logged-in user from the ID token.This method gets the first name of the currently logged-in user from the ID token.org.keycloak.representations.IDTokenThis method retrieves the ID token of the currently logged-in user.This method gets the user name of the currently logged-in user from the ID token.booleanThis method checks if a user is currently logged in.voidThis method logs an action to a specific user.Methods inherited from class com.jk.web.faces.controllers.JKWebController
context, error, error, executeAsyc, getContextParam, getContextPath, getFromAppliaction, getFromRequest, getFromSession, getParam, getParamterFromRequest, getRoles, getTenantId, getViewScopedManagedBean, handleException, init, isDebug, isDevelopmentMode, postConstruct, redirect, request, session, showErrorDialogMessage, showInfoDialogMessage, showWarningDialogMessage, success, success, suggestName, updateUi, warning 
- 
Constructor Details
- 
JKWebAppBaseController
public JKWebAppBaseController() 
 - 
 - 
Method Details
- 
getUserName
This method gets the user name of the currently logged-in user from the ID token.- Overrides:
 getUserNamein classJKWebController- Returns:
 - the user name of the user.
 
 - 
getFirstName
This method gets the first name of the currently logged-in user from the ID token.- Returns:
 - the first name of the user.
 
 - 
getFamilyName
This method gets the family name (last name) of the currently logged-in user from the ID token.- Returns:
 - the family name of the user.
 
 - 
getEmail
This method gets the email address of the currently logged-in user from the ID token.- Returns:
 - the email address of the user.
 
 - 
getIdToken
public org.keycloak.representations.IDToken getIdToken()This method retrieves the ID token of the currently logged-in user.- Returns:
 - the ID token of the user.
 
 - 
isUserLoggedIn
public boolean isUserLoggedIn()This method checks if a user is currently logged in.- Returns:
 - true, if a user is logged in, false otherwise.
 
 - 
logAction
This method logs an action to a specific user.- Overrides:
 logActionin classJKWebController- Parameters:
 logType- Specifies the type of the action to log.
 - 
getActionLogName
This method gets the name to use for action logging.- Returns:
 - the name to use for action logging.
 
 - 
getActionLogService
This method gets the action log service.- Returns:
 - the instance of the action log service.
 
 - 
getEmailService
This method gets the email service.- Returns:
 - the instance of the email service.
 
 
 -