Package com.dtolabs.rundeck.core.common
Class FilesystemFramework
- java.lang.Object
-
- com.dtolabs.rundeck.core.common.FilesystemFramework
-
- All Implemented Interfaces:
IFilesystemFramework
public class FilesystemFramework extends java.lang.Object implements IFilesystemFramework
Filesystem based configuration for framework
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LIBEXT_CACHE_DIR_NAMEstatic java.lang.StringDEFAULT_LIBEXT_DIR_NAMEstatic java.lang.StringFRAMEWORK_LIBEXT_CACHE_DIRstatic java.lang.StringFRAMEWORK_LIBEXT_DIRstatic java.lang.StringSYSTEM_PROP_LIBEXTstatic java.lang.StringSYSTEM_PROP_LIBEXT_CACHE
-
Constructor Summary
Constructors Constructor Description FilesystemFramework(java.io.File baseDir, java.io.File projectsDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertyLookupcreatePropertyLookupFromBasedir(java.io.File baseDir)static PropertyRetrievercreatePropertyRetriever(java.io.File baseDir)java.io.FilegetBaseDir()java.io.FilegetConfigDir()static java.io.FilegetConfigDir(java.io.File baseDir)FrameworkgetFramework()java.io.FilegetFrameworkProjectsBaseDir()static FilesystemFrameworkgetInstanceWithoutProjectsDir(java.lang.String rdeck_base_dir)Returns an instance of Framework object.java.io.FilegetLibextCacheDir()java.io.FilegetLibextCacheDir(IFramework fwk)java.io.FilegetLibextDir()java.io.FilegetLibextDir(IFramework fwk)static java.lang.StringgetProjectsBaseDir(java.io.File baseDir)static java.io.FilegetPropertyFile(java.io.File configDir)IPropertyLookupgetPropertyLookup()voidsetBaseDir(java.io.File baseDir)voidsetFramework(Framework framework)
-
-
-
Field Detail
-
FRAMEWORK_LIBEXT_DIR
public static final java.lang.String FRAMEWORK_LIBEXT_DIR
- See Also:
- Constant Field Values
-
FRAMEWORK_LIBEXT_CACHE_DIR
public static final java.lang.String FRAMEWORK_LIBEXT_CACHE_DIR
- See Also:
- Constant Field Values
-
DEFAULT_LIBEXT_DIR_NAME
public static final java.lang.String DEFAULT_LIBEXT_DIR_NAME
- See Also:
- Constant Field Values
-
DEFAULT_LIBEXT_CACHE_DIR_NAME
public static final java.lang.String DEFAULT_LIBEXT_CACHE_DIR_NAME
- See Also:
- Constant Field Values
-
SYSTEM_PROP_LIBEXT
public static final java.lang.String SYSTEM_PROP_LIBEXT
- See Also:
- Constant Field Values
-
SYSTEM_PROP_LIBEXT_CACHE
public static final java.lang.String SYSTEM_PROP_LIBEXT_CACHE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProjectsBaseDir
public static java.lang.String getProjectsBaseDir(java.io.File baseDir)
- Parameters:
baseDir- base dir- Returns:
- the path for the projects directory from the basedir
-
getConfigDir
public java.io.File getConfigDir()
- Specified by:
getConfigDirin interfaceIFilesystemFramework- Returns:
- the config dir
-
getConfigDir
public static java.io.File getConfigDir(java.io.File baseDir)
- Parameters:
baseDir- base dir- Returns:
- the config dir for the framework given a basedir
-
getInstanceWithoutProjectsDir
public static FilesystemFramework getInstanceWithoutProjectsDir(java.lang.String rdeck_base_dir)
Returns an instance of Framework object. Loads the framework.projects.dir property value, or defaults to basedir/projects- Parameters:
rdeck_base_dir- path name to the rdeck_base- Returns:
- a Framework instance
-
getFrameworkProjectsBaseDir
public java.io.File getFrameworkProjectsBaseDir()
- Specified by:
getFrameworkProjectsBaseDirin interfaceIFilesystemFramework
-
getLibextDir
public java.io.File getLibextDir(IFramework fwk)
- Specified by:
getLibextDirin interfaceIFilesystemFramework- Returns:
- the directory containing plugins/extensions for the framework.
-
getLibextDir
public java.io.File getLibextDir()
- Specified by:
getLibextDirin interfaceIFilesystemFramework- Returns:
- the directory containing plugins/extensions for the framework.
-
getLibextCacheDir
public java.io.File getLibextCacheDir()
- Specified by:
getLibextCacheDirin interfaceIFilesystemFramework- Returns:
- the cache directory used by the plugin system
-
getLibextCacheDir
public java.io.File getLibextCacheDir(IFramework fwk)
- Specified by:
getLibextCacheDirin interfaceIFilesystemFramework
-
getPropertyFile
public static java.io.File getPropertyFile(java.io.File configDir)
- Parameters:
configDir- config dir- Returns:
- the framework property file from the config dir
-
createPropertyRetriever
public static PropertyRetriever createPropertyRetriever(java.io.File baseDir)
- Parameters:
baseDir- base dir- Returns:
- Create a safe framework property retriever given a basedir
-
createPropertyLookupFromBasedir
public static PropertyLookup createPropertyLookupFromBasedir(java.io.File baseDir)
- Parameters:
baseDir- base dir- Returns:
- Create a safe framework property retriever given a basedir
-
getPropertyLookup
public IPropertyLookup getPropertyLookup()
- Specified by:
getPropertyLookupin interfaceIFilesystemFramework- Returns:
- a framework property lookup for this basedir
-
getBaseDir
public java.io.File getBaseDir()
- Specified by:
getBaseDirin interfaceIFilesystemFramework
-
setBaseDir
public void setBaseDir(java.io.File baseDir)
-
getFramework
public Framework getFramework()
-
setFramework
public void setFramework(Framework framework)
-
-