3.1.2: 2012-07-31

net.sf.basedb.clients.web.extensions
Class WebClientRegisterExtensionsProcessor

java.lang.Object
  extended by net.sf.basedb.util.extensions.manager.processor.RegisterExtensionsProcessor
      extended by net.sf.basedb.clients.web.extensions.WebClientRegisterExtensionsProcessor
All Implemented Interfaces:
ExtensionsFileProcessor

public class WebClientRegisterExtensionsProcessor
extends RegisterExtensionsProcessor

A subclass to the regular extensions processor that adds information about various paths (eg. home path, servlet path) on the web client as variables in the XmlLoader that is used to process the definition files. This is need so that factory parameters can contain relative URL:s.

Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-04-08 14:50:27 +0200 (Fri, 08 Apr 2011) $

Field Summary
private  PathConverter pathConverter
           
private  String resourcesPath
           
private  String servletsPath
           
private  VariableConverter variableConverter
           
 
Constructor Summary
WebClientRegisterExtensionsProcessor(String rootPath, String resourcesPath, String servletsPath, ProcessResults results)
           
 
Method Summary
 void processFile(ExtensionsManager manager, ExtensionsFile.WriteableExtensionsFile wFile)
          Called by the extensions manager for each extensions file that it manages.
 
Methods inherited from class net.sf.basedb.util.extensions.manager.processor.RegisterExtensionsProcessor
begin, done, done, finalizeRegistration, getNumError, getNumFiles, getNumRegistered, getNumUnregistered, getProcessResults, getXmlLoader, isRegistrationDelayed, setDelayRegistration, setForceUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variableConverter

private final VariableConverter variableConverter

pathConverter

private final PathConverter pathConverter

resourcesPath

private final String resourcesPath

servletsPath

private final String servletsPath
Constructor Detail

WebClientRegisterExtensionsProcessor

public WebClientRegisterExtensionsProcessor(String rootPath,
                                            String resourcesPath,
                                            String servletsPath,
                                            ProcessResults results)
Method Detail

processFile

public void processFile(ExtensionsManager manager,
                        ExtensionsFile.WriteableExtensionsFile wFile)
Description copied from interface: ExtensionsFileProcessor
Called by the extensions manager for each extensions file that it manages. The order of the files is generally not predicatable and may change from one invokation to the next.

If the processor throws an exception the manager will abort processing and call ExtensionsFileProcessor.done(ExtensionsManager, Throwable). Error that are related to a specific file should be catched by the processor and registered by calling .......

If all files was processed without exceptions the manager will call ExtensionsFileProcessor.done(ExtensionsManager).

Note that the file is read-only to begin with. If the processor wants to call any write-operation the file must be opened by calling ExtensionsFile.WriteableExtensionsFile.open(). It is recommended that the processor calls ExtensionsFile.WriteableExtensionsFile.close() once it is done writing.

Specified by:
processFile in interface ExtensionsFileProcessor
Overrides:
processFile in class RegisterExtensionsProcessor
Parameters:
manager - The manager that is executing the action
wFile - The file to be processed

3.1.2: 2012-07-31