Package com.jbstrap.ui
Class BaseLoginPage
java.lang.Object
com.jbstrap.core.messagebus.MessageBus
com.jbstrap.ui.Component<Container>
com.jbstrap.ui.components.layout.Container
com.jbstrap.ui.BasePage
com.jbstrap.ui.BaseLoginPage
- All Implemented Interfaces:
Animatable<Container>
,CanDrop<Container>
,Clickable<Container>
,Draggable<Container>
,HandleMouseEvents<Container>
,Scrollable<Container>
,Touchable<Container>
Base Login Page class
The application login page ancestor class. If the application contains user login functionality, the login page must extend this class. This class contains the methods necessary for the login. These methods can be called anytime in the implementation of the login page. These methods are:
checkUser(String, String)
- The method checks the user's name and password, and builds the user object, that represents the user. The password checking and user object build happens according to the implementation of theAuthenticationInterface
, that can be specified in theJBStrapParamType.AUTHENTICATION
parameter.loginUser(CurrentUser)
- Logs the user into the application
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final CurrentUser
Checks (authenticates) the specified user's dataprotected void
loginUser
(CurrentUser user) Logs the user in.Methods inherited from class com.jbstrap.ui.BasePage
addResizeHandler, addUrlParameter, equals, getPageId, getParameters, getTitle, getUrlParameter, removeUrlParameter, setTitle, writeHTML
Methods inherited from class com.jbstrap.ui.components.layout.Container
getType, setAlignItems, setType
Methods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, init, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHide, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEnabled, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimation
Methods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandler
Methods inherited from interface com.jbstrap.ui.Clickable
addClickHandler, addDoubleClickHandler
Methods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggable
Methods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler
Methods inherited from interface com.jbstrap.ui.Scrollable
addScrollHandler
Methods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Constructor Details
-
BaseLoginPage
Creates the ancestor login page- Parameters:
ui
- The UI instance, where the page will be displayed.params
- The page parameters
-
-
Method Details
-
checkUser
Checks (authenticates) the specified user's data- Parameters:
username
- The usernamepassword
- The password- Returns:
- If the specified username is correct, it will return the User object, otherwise
null
- Throws:
NullPointerException
- IF the user authentication operation is not specified. It can be specified by theJBStrapParamType.AUTHENTICATION
JBStrap parameter- See Also:
-
loginUser
Logs the user in.- Parameters:
user
- The built user object, representing the user who is to be logged in.- Throws:
IllegalArgumentException
- Occurs if the user is specified asnull
-