com.basistech.util
Class BasisRootBean

java.lang.Object
  extended by com.basistech.util.BasisRootBean

public class BasisRootBean
extends Object

This class is provided to initialize the Basis product root directory in the Spring IoC container. Applications should create bean of this type with scope='singleton' and use it to configure other Basis classes. In some cases, the application will need to cite this bean in a dependsOn attribute. In all cases, this class must be configured with

 init-method='initialize'
 
For example, a bean might be:
 <bean id='bt-root' class='com.basistech.spring.BasisRootBean' init-method='initialize'>
 <property name='rootDirectory' value='/pathname/to/my/basis-product-root'>
 </bean>
 
Note that the rootDirectory property is optional. If you don't set it, the Pathnames class will read the bt.root System property.

See Also:
Pathnames

Constructor Summary
BasisRootBean()
          Create a placeholder; root directory is null.
 
Method Summary
 Pathnames getPathnames()
          Get the Pathnames object, which can be used to get the bt.root System property.
 String getRootDirectory()
          Get the Basis root directory.
 void initialize()
          Initialize with the root directory.
 void setRootDirectory(String rootDirectory)
          Set the Basis root directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasisRootBean

public BasisRootBean()
Create a placeholder; root directory is null.

Method Detail

initialize

public void initialize()
Initialize with the root directory.


getRootDirectory

public String getRootDirectory()
Get the Basis root directory.

Returns:
the root directory.

setRootDirectory

public void setRootDirectory(String rootDirectory)
Set the Basis root directory.

Parameters:
rootDirectory - the root directory.

getPathnames

public Pathnames getPathnames()
Get the Pathnames object, which can be used to get the bt.root System property.

Returns:
Pathnames.


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.