org.abstracthorizon.extend.server.deployment.support
Class DeploymentDirectoryModuleLoader

java.lang.Object
  extended by org.abstracthorizon.extend.server.deployment.support.DeploymentDirectoryModuleLoader
All Implemented Interfaces:
ModuleLoader

public class DeploymentDirectoryModuleLoader
extends Object
implements ModuleLoader

This module loader accepts only directories on the filesystem (file://) and returns DeploymentDirectoryModule. It also uses non singleton definition of DeploymentDirectoryModule from the supplied application context.

Author:
Daniel Sendula

Constructor Summary
DeploymentDirectoryModuleLoader()
          Empty constructor
 
Method Summary
 boolean canLoad(URI uri)
          Returns true if URI represens directory (ends with "/") and doesn't have "." in the name.
 Module load(URI uri)
          Obtains bean named "DirectoryModule" (DeploymentDirectoryModule) from the application context, sets location and name and returns it.
 Module loadAs(URI uri, ModuleId moduleId)
          Obtains bean named "DirectoryModule" (DeploymentDirectoryModule) from the application context, sets location and name and returns it.
 ModuleId toModuleId(URI uri)
          Translates URI to moduleId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentDirectoryModuleLoader

public DeploymentDirectoryModuleLoader()
Empty constructor

Method Detail

canLoad

public boolean canLoad(URI uri)
Returns true if URI represens directory (ends with "/") and doesn't have "." in the name.

Specified by:
canLoad in interface ModuleLoader
Parameters:
uri - URI
Returns:
true if URI represens directory (ends with "/") and doesn't have "." in the name

toModuleId

public ModuleId toModuleId(URI uri)
Translates URI to moduleId

Specified by:
toModuleId in interface ModuleLoader
Parameters:
uri - uri
Returns:
module id or null

load

public Module load(URI uri)
Obtains bean named "DirectoryModule" (DeploymentDirectoryModule) from the application context, sets location and name and returns it.

Specified by:
load in interface ModuleLoader
Parameters:
uri - URI for module to be loaded from
Returns:
initialised DeploymentDirectoryModule

loadAs

public Module loadAs(URI uri,
                     ModuleId moduleId)
Obtains bean named "DirectoryModule" (DeploymentDirectoryModule) from the application context, sets location and name and returns it.

Specified by:
loadAs in interface ModuleLoader
Parameters:
uri - URI for module to be loaded from
moduleId - module id
Returns:
initialised DeploymentDirectoryModule


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.