org.olat.core.dispatcher.mapper
Class GlobalMapperRegistry

java.lang.Object
  extended by org.olat.core.dispatcher.mapper.GlobalMapperRegistry
All Implemented Interfaces:
Dispatcher

public class GlobalMapperRegistry
extends java.lang.Object
implements Dispatcher

Description:
Allows to register so called mappers. Here you can create urls which are valid for all users and will be dispatched to the given mapper. If you need urls that are only accessible for one user, use MapperRegistry.java

Initial Date: 10.06.2005

Author:
Felix Jost

Method Summary
 void deregister(Mapper mapper)
          remove a registered mapper if it is no longer needed.
 void execute(javax.servlet.http.HttpServletRequest hreq, javax.servlet.http.HttpServletResponse hres, java.lang.String pathInfo)
           
static GlobalMapperRegistry getInstance()
           
 java.lang.String register(java.lang.Class globalNameClass, Mapper mapper)
          Register a named global mapper.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalMapperRegistry getInstance()
Returns:
MapperRegistry

register

public java.lang.String register(java.lang.Class globalNameClass,
                                 Mapper mapper)
Register a named global mapper. This mapper is registered at /g/globalname/

Parameters:
globalNameClass - class for the name of the mapper. the name of the mapper is the name of the class (including the package)
mapper -
Returns:
the path under which this mapper will be called, without / at the end, e.g. /olat/g/521org.olat.demo.tabledemo.MyController (the 521 here is the versionId to guarantee the uniqueness across releases to trick out buggy css browser caches)

execute

public void execute(javax.servlet.http.HttpServletRequest hreq,
                    javax.servlet.http.HttpServletResponse hres,
                    java.lang.String pathInfo)
Specified by:
execute in interface Dispatcher
Parameters:
hreq -
hres -

deregister

public void deregister(Mapper mapper)
remove a registered mapper if it is no longer needed.

Parameters:
mapper -