Package org.forgerock.openig.config.env
Class EnvironmentDelegate
- java.lang.Object
-
- org.forgerock.openig.config.env.EnvironmentDelegate
-
- All Implemented Interfaces:
Environment
- Direct Known Subclasses:
GatewayEnvironment,PlatformEnvironment,UnixEnvironment,WindowsEnvironment
public abstract class EnvironmentDelegate extends Object implements Environment
Environment delegate, particularly useful to share a default implementation.- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description EnvironmentDelegate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Environmentdelegate()Returns the environment delegatee.FilegetBaseDirectory()Returns the base directory of the OpenIG file system.FilegetConfigDirectory()Returns the directory that contains the configuration files.FilegetScriptDirectory(String type)Returns the directory that contains the files of the given type.FilegetTempDirectory()Returns the temporary directory of OpenIG (where we have read+write permissions).
-
-
-
Method Detail
-
delegate
protected abstract Environment delegate()
Returns the environment delegatee.- Returns:
- the environment delegatee.
-
getBaseDirectory
public File getBaseDirectory()
Description copied from interface:EnvironmentReturns the base directory of the OpenIG file system. It can be used to access resources that are not part of the standard layout.- Specified by:
getBaseDirectoryin interfaceEnvironment- Returns:
- the base directory of the OpenIG file system.
-
getTempDirectory
public File getTempDirectory()
Description copied from interface:EnvironmentReturns the temporary directory of OpenIG (where we have read+write permissions). It usually points to the tmp/ directory.- Specified by:
getTempDirectoryin interfaceEnvironment- Returns:
- the working directory.
-
getScriptDirectory
public File getScriptDirectory(String type)
Description copied from interface:EnvironmentReturns the directory that contains the files of the given type. It usually points to the scripts/<type>/ directory.- Specified by:
getScriptDirectoryin interfaceEnvironment- Parameters:
type- script's type (could be groovy or js)- Returns:
- the scripting directory.
-
getConfigDirectory
public File getConfigDirectory()
Description copied from interface:EnvironmentReturns the directory that contains the configuration files. It usually points to the config/ directory.- Specified by:
getConfigDirectoryin interfaceEnvironment- Returns:
- the configuration directory.
-
-