public class FrameworkProjectMgr extends FrameworkResourceParent implements IFrameworkProjectMgr
FrameworkResourceParent.NoSuchResourceException
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log |
VALID_RESOURCE_NAME_CHARSET_REGEX, VALID_RESOURCE_NAME_REGEX
Modifier and Type | Method and Description |
---|---|
boolean |
childCouldBeLoaded(java.lang.String name)
Default implementation checks whether a subdir under the basedir exists with the specified name.
|
IFrameworkResource |
createChild(java.lang.String projectName)
create a new child resource
|
IRundeckProject |
createFrameworkProject(java.lang.String projectName)
Create a new project.
|
IRundeckProject |
createFrameworkProject(java.lang.String projectName,
java.util.Properties properties) |
IRundeckProject |
createFrameworkProjectStrict(java.lang.String projectName,
java.util.Properties properties)
Create a new project if it doesn't, otherwise throw exception
|
FrameworkProject |
createFSFrameworkProject(java.lang.String projectName)
Create a new project.
|
boolean |
existsFrameworkProject(java.lang.String project)
Checks if project by that name exists
|
FilesystemFramework |
getFilesystemFramework() |
FrameworkProject |
getFrameworkProject(java.lang.String name)
Get the specified existing project
|
java.util.Properties |
getProperties() |
java.util.Collection<IRundeckProject> |
listFrameworkProjects()
List all current
FrameworkProject objects |
IFrameworkResource |
loadChild(java.lang.String name) |
void |
removeFrameworkProject(java.lang.String projectName)
Remove a project definition
|
java.lang.String |
toString() |
existsChild, existsChildResourceDirectory, getChild, getChildren, initialize, listChildNames, listChildren, remove
getBaseDir, getLogger, getName, getParent, isValid, storeProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBaseDir, getName, getParent, isValid
public IRundeckProject createFrameworkProject(java.lang.String projectName)
ProjectManager
createFrameworkProject
in interface ProjectManager
projectName
- Name of the projectFrameworkProject
public FrameworkProject createFSFrameworkProject(java.lang.String projectName)
IFrameworkProjectMgr
createFSFrameworkProject
in interface IFrameworkProjectMgr
projectName
- Name of the projectFrameworkProject
public FilesystemFramework getFilesystemFramework()
public IRundeckProject createFrameworkProject(java.lang.String projectName, java.util.Properties properties)
createFrameworkProject
in interface ProjectManager
projectName
- Name of the projectproperties
- additional properties to include in the project's properties filepublic IRundeckProject createFrameworkProjectStrict(java.lang.String projectName, java.util.Properties properties)
createFrameworkProjectStrict
in interface ProjectManager
projectName
- name of projectproperties
- config propertiesjava.lang.IllegalArgumentException
- if the project already existspublic void removeFrameworkProject(java.lang.String projectName)
removeFrameworkProject
in interface ProjectManager
projectName
- name of the projectpublic java.util.Collection<IRundeckProject> listFrameworkProjects()
ProjectManager
FrameworkProject
objectslistFrameworkProjects
in interface ProjectManager
public FrameworkProject getFrameworkProject(java.lang.String name)
ProjectManager
getFrameworkProject
in interface ProjectManager
name
- The name of the projectpublic boolean existsFrameworkProject(java.lang.String project)
ProjectManager
existsFrameworkProject
in interface ProjectManager
project
- The name of the projectpublic 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
name
- child namepublic java.lang.String toString()
toString
in class FrameworkResource
public java.util.Properties getProperties()
public IFrameworkResource createChild(java.lang.String projectName)
FrameworkResourceParent
createChild
in interface IFrameworkResourceParent
createChild
in class FrameworkResourceParent
projectName
- name of childpublic IFrameworkResource loadChild(java.lang.String name)
loadChild
in interface IFrameworkResourceParent
name
- child name