Class Module

Object
  |
  +--Module
Direct Known Subclasses:
GuestLoginModule, TableLoginModule

public class Module
extends Object


Field Summary
 varchar db
           
 varchar index
           
 boolean isIndex
           
 boolean loggedIn
           
 varchar name
           
 PBEObject[] objects
           
protected  varchar status
           
 varchar title
           
 
Constructor Summary
Module(varchar name, varchar title, varchar index_page)
           
Module(varchar name, varchar title, varchar index_page, varchar db)
           
 
Method Summary
 void addObject(varchar name)
           
 void disable()
          Disable the module using the default page.
 void disable(varchar page)
           
 void enable()
           
 void enableGuest()
          Enable PBE attributes and methods that publicly accessable.
 varchar getError()
           
 void init()
          Initialize all objects in the module.
 void loaded()
          After loading all forms are disable and control re-directed to the root 'timeout.htd' page.
 void login(boolean guest, varchar user)
          On login, all forms in the module are enabled by default.
 void loginFailed(boolean guest, varchar user)
          Failure to login disables all forms and redirects to a root page called 'noaccess.htd' unless the a guest login was attempted.
 boolean mayLogin(boolean guest, varchar user, varchar password)
          By default this function returns $null, which means access is not checked.
 boolean openDatabase()
           
 boolean openDatabase(varchar db)
           
 void setDatabase(varchar db)
           
 void setError(varchar err)
           
 void setIndex(varchar page)
          A '*' at the start of the index page indicates that this is the index module.
 boolean validUser(boolean guest, varchar user)
          By default this function returns $null, which means access is not checked.
 

Field Detail

name

public varchar name

title

public varchar title

index

public varchar index

isIndex

public boolean isIndex

status

protected varchar status

loggedIn

public boolean loggedIn

objects

public PBEObject[] objects

db

public varchar db
Constructor Detail

Module

public Module(varchar name,
              varchar title,
              varchar index_page)

Module

public Module(varchar name,
              varchar title,
              varchar index_page,
              varchar db)
Method Detail

setIndex

public void setIndex(varchar page)
A '*' at the start of the index page indicates that this is the index module. The index page of the index module is used as the main index page for the application.

addObject

public void addObject(varchar name)

setError

public void setError(varchar err)

getError

public varchar getError()

setDatabase

public void setDatabase(varchar db)

openDatabase

public boolean openDatabase(varchar db)

openDatabase

public boolean openDatabase()

disable

public void disable(varchar page)

enable

public void enable()

init

public void init()
Initialize all objects in the module. If an error occurs, then set the index page of the module to the root page 'initerr.exec'.

loaded

public void loaded()
After loading all forms are disable and control re-directed to the root 'timeout.htd' page.

disable

public void disable()
Disable the module using the default page.

validUser

public boolean validUser(boolean guest,
                         varchar user)
By default this function returns $null, which means access is not checked.

mayLogin

public boolean mayLogin(boolean guest,
                        varchar user,
                        varchar password)
By default this function returns $null, which means access is not checked.

enableGuest

public void enableGuest()
Enable PBE attributes and methods that publicly accessable. This method function is called by the loginFailed() below.

login

public void login(boolean guest,
                  varchar user)
On login, all forms in the module are enabled by default.

loginFailed

public void loginFailed(boolean guest,
                        varchar user)
Failure to login disables all forms and redirects to a root page called 'noaccess.htd' unless the a guest login was attempted. A failed guest login by default does nothing.