com.arsdigita.ui.login
Class UserInfo
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.SimpleContainer
com.arsdigita.ui.login.UserInfo
- All Implemented Interfaces:
- Cloneable, Component, Container, Lockable
- public class UserInfo
- extends SimpleContainer
A reusable Bebop component to display the primary attributes of the
currently logged in user. Users can extend this class to provide
information about another user by overriding the register(Page)
and getUser(PageState)
methods.
- Since:
- 2001-06-01
- Version:
- 1.0
- Author:
- Michael Bryzek, Roger Hsueh, Sameer Ajmani
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Methods inherited from class com.arsdigita.bebop.SimpleContainer |
add, add, children, contains, generateChildrenXML, generateParent, generateXML, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
versionId
public static final String versionId
- See Also:
- Constant Field Values
UserInfo
public UserInfo()
register
public void register(Page p)
- Adds a request listener to the page to ensure that the user is logged
in. Subclasses should override this method if they do not require
users to be logged in. This method may be changed as we find more
examples of how people are using this class.
- Specified by:
register
in interface Component
- Overrides:
register
in class SimpleComponent
isLoggedIn
protected boolean isLoggedIn(PageState state)
- Returns:
- true if the user is logged in
getUser
protected User getUser(PageState state)
- Returns:
- the User object for which we are generating information
- Throws:
IllegalStateException
- if user is not logged in. Call
isLoggedIn(state) to check for this case.
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC