com.arsdigita.ui.login
Class UserInfo

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.SimpleContainer
                      extended bycom.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

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.BlockStylable
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
UserInfo()
           
 
Method Summary
protected  User getUser(PageState state)
           
protected  boolean isLoggedIn(PageState state)
           
 void register(Page p)
          Adds a request listener to the page to ensure that the user is logged in.
 
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.BlockStylable
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment
 
Methods inherited from class com.arsdigita.bebop.TextStylable
setBackgroundColor, setColor
 
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 class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.bebop.Component
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

UserInfo

public UserInfo()
Method Detail

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 20 2004:2337 UTC