|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.common.FrameworkResource
com.dtolabs.rundeck.core.common.FrameworkResourceParent
com.dtolabs.rundeck.core.common.Framework
public class Framework
Manages the elements of the Ctl framework. Provides access to the various
kinds of framework resource managers like
FrameworkProjectMgr
, Authorization
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.dtolabs.rundeck.core.common.FrameworkResourceParent |
---|
FrameworkResourceParent.NoSuchResourceException |
Field Summary | |
---|---|
static java.lang.String |
CENTRALDISPATCHER_CLS_DEFAULT
|
static java.lang.String |
CENTRALDISPATCHER_CLS_PROP
|
static java.lang.String |
DEFAULT_LIBEXT_CACHE_DIR_NAME
|
static java.lang.String |
DEFAULT_LIBEXT_DIR_NAME
|
static java.lang.String |
FRAMEWORK_LIBEXT_CACHE_DIR
|
static java.lang.String |
FRAMEWORK_LIBEXT_DIR
|
static java.lang.String |
FRAMEWORK_PLUGINS_ENABLED
|
static org.apache.log4j.Logger |
logger
|
static java.lang.String |
NODES_FILE_AUTOGEN_PROP
|
static java.lang.String |
NODES_RESOURCES_FILE_PROP
|
static java.lang.String |
SYSTEM_PROP_LIBEXT
|
static java.lang.String |
SYSTEM_PROP_LIBEXT_CACHE
|
Fields inherited from class com.dtolabs.rundeck.core.common.FrameworkResource |
---|
VALID_RESOURCE_NAME_REGEX |
Method Summary | |
---|---|
boolean |
childCouldBeLoaded(java.lang.String name)
Default implementation checks whether a subdir under the basedir exists with the specified name. |
NodeEntryImpl |
createFrameworkNode()
Generate a node entry for the framework with default values |
static PropertyRetriever |
createProjectPropertyRetriever(java.io.File baseDir,
java.io.File projectsBaseDir,
java.lang.String projectName)
Create a safe project property retriever given a basedir and project name |
static PropertyLookup |
createPropertyLookupFromBasedir(java.io.File baseDir)
Create a safe framework property retriever given a basedir |
static PropertyRetriever |
createPropertyRetriever(java.io.File baseDir)
Create a safe framework property retriever given a basedir |
INodeSet |
filterAuthorizedNodes(java.lang.String project,
java.util.Set<java.lang.String> actions,
INodeSet unfiltered,
AuthContext authContext)
Return the nodeset consisting only of the input nodes where the specified actions are all authorized |
java.util.Collection<INodeEntry> |
filterNodes(NodesSelector nodeset,
java.lang.String project,
java.io.File nodesFile)
Read the nodes file for a project and return a filtered set of nodes |
INodeSet |
filterNodeSet(NodesSelector nodeset,
java.lang.String project,
java.io.File nodesFile)
Read the nodes file for a project and return a filtered set of nodes |
CentralDispatcher |
getCentralDispatcherMgr()
Return CentralDispatcher implementation. |
java.io.File |
getConfigDir()
Get the config dir |
static java.io.File |
getConfigDir(java.io.File baseDir)
Return the config dir for the framework given a basedir |
ExecutionService |
getExecutionService()
|
FileCopier |
getFileCopierForNodeAndProject(INodeEntry node,
java.lang.String project)
|
FileCopierService |
getFileCopierService()
|
java.lang.String |
getFrameworkNodeHostname()
Gets the value of "framework.server.hostname" property |
java.lang.String |
getFrameworkNodeName()
Gets the value of "framework.server.name" property |
IFrameworkProjectMgr |
getFrameworkProjectMgr()
Gets DepotMgr for this framework instance |
java.io.File |
getFrameworkProjectsBaseDir()
|
static Framework |
getInstance(java.lang.String rdeck_base_dir,
java.lang.String projects_base_dir)
Returns the singleton instance of Framework object. |
static Framework |
getInstanceWithoutProjectsDir(java.lang.String rdeck_base_dir)
Returns an instance of Framework object. |
java.io.File |
getLibextCacheDir()
Return the cache directory used by the plugin system |
java.io.File |
getLibextDir()
Return the directory containing plugins/extensions for the framework. |
INodeDesc |
getNodeDesc()
Gets the INodeDesc value describing the framework node |
NodeDispatcher |
getNodeDispatcherForContext(ExecutionContext context)
|
NodeExecutor |
getNodeExecutorForNodeAndProject(INodeEntry node,
java.lang.String project)
|
NodeExecutorService |
getNodeExecutorService()
|
NodeStepExecutor |
getNodeStepExecutorForItem(NodeStepExecutionItem item)
|
NodeStepExecutionService |
getNodeStepExecutorService()
|
IFrameworkResourceParent |
getParent()
This is the root. |
ServiceProviderLoader |
getPluginManager()
|
java.lang.String |
getProjectProperty(java.lang.String project,
java.lang.String key)
Return the property value for the key from the project or framework properties if it exists, otherwise return null. |
static java.lang.String |
getProjectsBaseDir(java.io.File baseDir)
Get the path for the projects directory from the basedir |
java.lang.String |
getProperty(java.lang.String name)
Return the property value by name |
static java.io.File |
getPropertyFile(java.io.File configDir)
Get the framework property file from the config dir |
IPropertyLookup |
getPropertyLookup()
|
PropertyRetriever |
getPropertyRetriever()
Return a PropertyRetriever interface for framework-scoped properties |
ResourceFormatGeneratorService |
getResourceFormatGeneratorService()
|
ResourceFormatParserService |
getResourceFormatParserService()
|
ResourceModelSourceService |
getResourceModelSourceService()
|
FrameworkSupportService |
getService(java.lang.String name)
Return a service by name |
StepExecutionService |
getStepExecutionService()
|
WorkflowExecutionService |
getWorkflowExecutionService()
|
boolean |
hasProjectProperty(java.lang.String key,
java.lang.String project)
Return true if the property is set for the project or the framework |
boolean |
hasProperty(java.lang.String key)
Return true if the property exists |
void |
initialize()
Initialize children, the various resource management objects |
boolean |
isLocalNode(INodeDesc node)
Return true if the node is the local framework node. |
java.util.Collection |
listChildNames()
Default implementation lists the subdirectory names and adds any existing child names |
IFrameworkResource |
loadChild(java.lang.String name)
Load a specified child by name, returning null if it does not exist |
void |
setCentralDispatcherMgr(CentralDispatcher centralDispatcherMgr)
Set the CentralDispatcherMgr instance |
void |
setService(java.lang.String name,
FrameworkSupportService service)
Set a service by name |
java.lang.String |
toString()
Returns a string with useful information for debugging. |
Methods inherited from class com.dtolabs.rundeck.core.common.FrameworkResourceParent |
---|
createChild, existsChild, existsChildResourceDirectory, getChild, getChildren, listChildren, remove |
Methods inherited from class com.dtolabs.rundeck.core.common.FrameworkResource |
---|
getBaseDir, getLogger, getName, isValid, storeProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.dtolabs.rundeck.core.common.IFrameworkResource |
---|
getBaseDir, getName, isValid |
Field Detail |
---|
public static final org.apache.log4j.Logger logger
public static final java.lang.String CENTRALDISPATCHER_CLS_PROP
public static final java.lang.String NODES_RESOURCES_FILE_PROP
public static final java.lang.String NODES_FILE_AUTOGEN_PROP
public static final java.lang.String CENTRALDISPATCHER_CLS_DEFAULT
public static final java.lang.String FRAMEWORK_LIBEXT_DIR
public static final java.lang.String FRAMEWORK_LIBEXT_CACHE_DIR
public static final java.lang.String DEFAULT_LIBEXT_DIR_NAME
public static final java.lang.String DEFAULT_LIBEXT_CACHE_DIR_NAME
public static final java.lang.String SYSTEM_PROP_LIBEXT
public static final java.lang.String SYSTEM_PROP_LIBEXT_CACHE
public static final java.lang.String FRAMEWORK_PLUGINS_ENABLED
Method Detail |
---|
public IFrameworkResourceParent getParent()
getParent
in interface IFrameworkResource
getParent
in class FrameworkResource
FrameworkResourceException
- Throws an exception if this is calledpublic boolean childCouldBeLoaded(java.lang.String name)
FrameworkResourceParent
FrameworkResourceParent.existsChildResourceDirectory(String)
)
Should be overridden by subtypes if this is not the desired behavior.
childCouldBeLoaded
in interface IFrameworkResourceParent
childCouldBeLoaded
in class FrameworkResourceParent
public IFrameworkResource loadChild(java.lang.String name)
IFrameworkResourceParent
public java.util.Collection listChildNames()
FrameworkResourceParent
listChildNames
in interface IFrameworkResourceParent
listChildNames
in class FrameworkResourceParent
public void initialize()
initialize
in interface IFrameworkResourceParent
initialize
in class FrameworkResourceParent
public CentralDispatcher getCentralDispatcherMgr()
public IFrameworkProjectMgr getFrameworkProjectMgr()
public static java.lang.String getProjectsBaseDir(java.io.File baseDir)
baseDir
-
public static java.io.File getPropertyFile(java.io.File configDir)
configDir
-
public static PropertyRetriever createPropertyRetriever(java.io.File baseDir)
baseDir
-
public static PropertyLookup createPropertyLookupFromBasedir(java.io.File baseDir)
baseDir
-
public static PropertyRetriever createProjectPropertyRetriever(java.io.File baseDir, java.io.File projectsBaseDir, java.lang.String projectName)
baseDir
- framework base directoryprojectsBaseDir
- projects base directoryprojectName
- name of the project
public FrameworkSupportService getService(java.lang.String name)
public void setService(java.lang.String name, FrameworkSupportService service)
public ExecutionService getExecutionService()
public WorkflowExecutionService getWorkflowExecutionService()
public StepExecutionService getStepExecutionService()
public FileCopier getFileCopierForNodeAndProject(INodeEntry node, java.lang.String project) throws ExecutionServiceException
ExecutionServiceException
public FileCopierService getFileCopierService()
public NodeExecutor getNodeExecutorForNodeAndProject(INodeEntry node, java.lang.String project) throws ExecutionServiceException
ExecutionServiceException
public NodeExecutorService getNodeExecutorService() throws ExecutionServiceException
ExecutionServiceException
public NodeStepExecutionService getNodeStepExecutorService() throws ExecutionServiceException
ExecutionServiceException
public NodeStepExecutor getNodeStepExecutorForItem(NodeStepExecutionItem item) throws ExecutionServiceException
ExecutionServiceException
public NodeDispatcher getNodeDispatcherForContext(ExecutionContext context) throws ExecutionServiceException
ExecutionServiceException
public ResourceModelSourceService getResourceModelSourceService()
public ResourceFormatParserService getResourceFormatParserService()
public ResourceFormatGeneratorService getResourceFormatGeneratorService()
public ServiceProviderLoader getPluginManager()
public static Framework getInstanceWithoutProjectsDir(java.lang.String rdeck_base_dir)
rdeck_base_dir
- path name to the rdeck_base
public static Framework getInstance(java.lang.String rdeck_base_dir, java.lang.String projects_base_dir)
Constants
is used.
rdeck_base_dir
- path name to the rdeck_baseprojects_base_dir
- path name to the projects base
public void setCentralDispatcherMgr(CentralDispatcher centralDispatcherMgr)
centralDispatcherMgr
- the instancepublic java.lang.String getProperty(java.lang.String name)
name
- Property key
public PropertyRetriever getPropertyRetriever()
public boolean hasProperty(java.lang.String key)
public boolean hasProjectProperty(java.lang.String key, java.lang.String project)
public java.lang.String getProjectProperty(java.lang.String project, java.lang.String key)
public IPropertyLookup getPropertyLookup()
public java.lang.String toString()
toString
in class FrameworkResource
public java.lang.String getFrameworkNodeHostname()
public java.lang.String getFrameworkNodeName()
public NodeEntryImpl createFrameworkNode()
public java.util.Collection<INodeEntry> filterNodes(NodesSelector nodeset, java.lang.String project, java.io.File nodesFile) throws NodeFileParserException
nodeset
- node filter setproject
- project name
NodeFileParserException
public INodeSet filterNodeSet(NodesSelector nodeset, java.lang.String project, java.io.File nodesFile) throws NodeFileParserException
nodeset
- node filter setproject
- project name
NodeFileParserException
public INodeSet filterAuthorizedNodes(java.lang.String project, java.util.Set<java.lang.String> actions, INodeSet unfiltered, AuthContext authContext)
public java.io.File getConfigDir()
public static java.io.File getConfigDir(java.io.File baseDir)
baseDir
-
public java.io.File getLibextDir()
public java.io.File getLibextCacheDir()
public java.io.File getFrameworkProjectsBaseDir()
public INodeDesc getNodeDesc()
INodeDesc
value describing the framework node
INodeDesc
object for this framework instancepublic boolean isLocalNode(INodeDesc node)
node
- the node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |