org.PingOO.DLAI.lib.util
Class HelpManager

java.lang.Object
  |
  +--org.PingOO.DLAI.lib.util.Manager
        |
        +--org.PingOO.DLAI.lib.util.HelpManager

public class HelpManager
extends Manager

Manages the localized help files for the DLAI

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)

Field Summary
private static java.lang.String[] HELP_EXTENSION
          By default all help files are ".html" files, we will try to deal with ".htm" files later.
 
Fields inherited from class org.PingOO.DLAI.lib.util.Manager
classLoader
 
Constructor Summary
private HelpManager()
          Hides the constructor from the outside.
 
Method Summary
private static java.net.URL findHelpPage(java.lang.String baseDirectory, java.lang.String module, java.lang.String fileName, java.lang.String extension)
          Tries to find the correct help file depending on the current locale.
static java.net.URL getHelpPage(java.lang.String identifier)
          Returns The URL of the desired help page.
static java.net.URL getHelpPage(java.lang.String module, java.lang.String identifier)
          Returns The URL of the desired help page.
protected static java.net.URL loadHelpPage(java.lang.String baseDirectory, java.lang.String module, java.lang.String fileName)
          Tries to find and load the correct help file depending on the current locale.
 
Methods inherited from class org.PingOO.DLAI.lib.util.Manager
findFile, findFile, findFile, findFile, initialize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

HELP_EXTENSION

private static final java.lang.String[] HELP_EXTENSION
By default all help files are ".html" files, we will try to deal with ".htm" files later.
Constructor Detail

HelpManager

private HelpManager()
Hides the constructor from the outside.
Method Detail

getHelpPage

public static java.net.URL getHelpPage(java.lang.String identifier)
Returns The URL of the desired help page.
Parameters:
identifier -  

getHelpPage

public static java.net.URL getHelpPage(java.lang.String module,
                                       java.lang.String identifier)
Returns The URL of the desired help page.
Parameters:
module - The appli's name.
identifier -  

loadHelpPage

protected static final java.net.URL loadHelpPage(java.lang.String baseDirectory,
                                                 java.lang.String module,
                                                 java.lang.String fileName)
Tries to find and load the correct help file depending on the current locale.
Parameters:
baseDirectory - The help directory..
module - The appli's name.
fileName - The name of the help's file.
Returns:
The correct URL, or null if the file was not fount.

findHelpPage

private static final java.net.URL findHelpPage(java.lang.String baseDirectory,
                                               java.lang.String module,
                                               java.lang.String fileName,
                                               java.lang.String extension)
Tries to find the correct help file depending on the current locale.
Parameters:
baseDirectory - The path where to find the help file.
module - The appli's name.
fileName - The name of the help's file.
extension - One of the existing extension for this file.
Returns:
The correct help file URL, or null if the file was not found.