| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.weborganic.bastille.security.GetUser
public class GetUser
Returns the XML for the user currently logged in.
The actual user implementation depends on the authentication mechanism.
A user is considered to be logged in if a User instance can be found in the
 current session; this happens when the user logs in.
 
There is no configuration associated with this generator; however the login and logout
 servlets must be configured in the Web descriptor (/WEB-INF/web.xml).
 
There is no parameter.
This generator only returns the user data if the user is logged in.
Here is a sample XML of a PageSeeder user.
<user type="pageseeder">
   <id>123</id>
   <username>jsmith</username>
   <firstname>John</firstname>
   <surname>Smith</surname>
   <email>No Email</email>
 </user>(All elements are mandatory)
When the user is not logged in, this generator simply returns:
<no-user/>To use this generator in Berlioz (in /WEB-INF/config/services.xml):
 
<generator class="org.weborganic.bastille.security.GetUser"
                         name="[name]" target="[target]"/>
| Constructor Summary | |
|---|---|
| GetUser() | |
| Method Summary | |
|---|---|
|  void | process(ContentRequest req,
        XMLWriter xml)Retrieves the user from the session. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GetUser()
| Method Detail | 
|---|
public final void process(ContentRequest req,
                          XMLWriter xml)
                   throws BerliozException,
                          IOException
process in interface ContentGeneratorBerliozException
IOException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||