olr.presentation
Class ExtendedHttpPresentation

java.lang.Object
  extended byolr.presentation.ExtendedHttpPresentation
All Implemented Interfaces:
com.lutris.appserver.server.httpPresentation.HttpPresentation
Direct Known Subclasses:
ContentAuthorROM, Header, Locked, LoggedOut, Login, Relations, Sciecom, SciecomHeader, SecureHttpPresentation, SequenceWizard, StructureHeader, UnsavedChanges, Welcome1

public abstract class ExtendedHttpPresentation
extends java.lang.Object
implements com.lutris.appserver.server.httpPresentation.HttpPresentation

Version:
$Id: ExtendedHttpPresentation.java,v 1.6 2004/08/03 08:33:53 roku Exp $

Constructor Summary
ExtendedHttpPresentation()
          Creates an instance.
 
Method Summary
protected  void checkForUserLogin()
          Checks if the user is already logged in.
 void clearSession()
          Clears the current users session.
 Olr getApplication()
           
 com.lutris.appserver.server.httpPresentation.HttpPresentationComms getComms()
           
 java.lang.String getPageContentForEvent(java.lang.String event)
           Call a method to produce page content depending on the event.
 SessionData getSessionData()
           
 RdfUser getUser()
           
abstract  java.lang.String handleDefault()
          Called upon page request.
 void handleEvent(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
           
protected  void initSessionData(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
          Initializes session data based on comms
protected abstract  boolean loggedInUserRequired()
          Called on subclass to determine if this Presenentation needs a valid logged in user to display.
 void run(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
           
 void setUser(RdfUser user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedHttpPresentation

public ExtendedHttpPresentation()
Creates an instance.

Method Detail

handleDefault

public abstract java.lang.String handleDefault()
                                        throws com.lutris.appserver.server.httpPresentation.HttpPresentationException
Called upon page request.

Returns:
Should return a string of (X)HTML
Throws:
com.lutris.appserver.server.httpPresentation.HttpPresentationException

loggedInUserRequired

protected abstract boolean loggedInUserRequired()
Called on subclass to determine if this Presenentation needs a valid logged in user to display.

Returns:

getComms

public com.lutris.appserver.server.httpPresentation.HttpPresentationComms getComms()
Returns:
The comms object.

getSessionData

public SessionData getSessionData()
Returns:
This users SessionData

setUser

public void setUser(RdfUser user)
             throws com.lutris.appserver.server.httpPresentation.HttpPresentationException
Parameters:
user - The current logged in user
Throws:
com.lutris.appserver.server.httpPresentation.HttpPresentationException

getUser

public RdfUser getUser()
Returns:
The current logged in user

clearSession

public void clearSession()
Clears the current users session.

See Also:
SessionData

run

public void run(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
         throws java.lang.Exception
Specified by:
run in interface com.lutris.appserver.server.httpPresentation.HttpPresentation
Throws:
java.lang.Exception
See Also:
HttpPresentation.run(com.lutris.appserver.server.httpPresentation.HttpPresentationComms)

initSessionData

protected void initSessionData(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
                        throws com.lutris.appserver.server.httpPresentation.HttpPresentationException
Initializes session data based on comms

Parameters:
comms - Parameter object
Throws:
com.lutris.appserver.server.httpPresentation.HttpPresentationException

checkForUserLogin

protected void checkForUserLogin()
                          throws com.lutris.appserver.server.httpPresentation.HttpPresentationException,
                                 com.lutris.appserver.server.httpPresentation.ClientPageRedirectException
Checks if the user is already logged in.

Throws:
com.lutris.appserver.server.httpPresentation.HttpPresentationException
com.lutris.appserver.server.httpPresentation.ClientPageRedirectException - If

handleEvent

public void handleEvent(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
                 throws java.lang.Exception
Parameters:
comms -
Throws:
java.lang.Exception

getPageContentForEvent

public java.lang.String getPageContentForEvent(java.lang.String event)
                                        throws java.lang.Exception

Call a method to produce page content depending on the event. The method called is perfomed using java reflection. The name of the called method is handel<event>() where the first letter of the event> is made uppercase.

Example: event=login results in a method call handleLogin()

Parameters:
event -
Returns:
Normally a (X)HTML string should be returned
Throws:
java.lang.Exception
See Also:
#toMethodName(String)

getApplication

public Olr getApplication()
Returns:
The Enhydra Application object


Copyright © 2001-2004 University of Hannover. All Rights Reserved.