|
|||||||||
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
public abstract class FrameworkResourceParent
Provides capability of managing child FrameworkResource
instances.
Nested Class Summary | |
---|---|
static class |
FrameworkResourceParent.NoSuchResourceException
|
Field Summary |
---|
Fields inherited from class com.dtolabs.rundeck.core.common.FrameworkResource |
---|
VALID_RESOURCE_NAME_REGEX |
Constructor Summary | |
---|---|
FrameworkResourceParent(java.lang.String name,
java.io.File dir,
IFrameworkResourceParent parent)
Constructor |
Method Summary | |
---|---|
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 name)
create a new child resource |
boolean |
existsChild(java.lang.String name)
Checks if there is a child FrameworkResource with specified name. |
boolean |
existsChildResourceDirectory(java.lang.String name)
Given a child resource name, checks if a subdirectory by that name exists |
IFrameworkResource |
getChild(java.lang.String name)
Gets requested child FrameworkResource. |
protected java.util.Map |
getChildren()
|
void |
initialize()
Initializes state from any loaded children. |
java.util.Collection |
listChildNames()
Default implementation lists the subdirectory names and adds any existing child names |
java.util.Collection |
listChildren()
Returns a collection of FrameworkResource child resources. |
void |
remove(java.lang.String name)
Remove the FrameworkResourceInstance by its name. |
Methods inherited from class com.dtolabs.rundeck.core.common.FrameworkResource |
---|
getBaseDir, getLogger, getName, getParent, isValid, storeProperties, toString |
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.IFrameworkResourceParent |
---|
loadChild |
Methods inherited from interface com.dtolabs.rundeck.core.common.IFrameworkResource |
---|
getBaseDir, getName, getParent, isValid |
Constructor Detail |
---|
public FrameworkResourceParent(java.lang.String name, java.io.File dir, IFrameworkResourceParent parent)
name
- Name of resourcedir
- Base directory of resourceMethod Detail |
---|
public IFrameworkResource createChild(java.lang.String name)
createChild
in interface IFrameworkResourceParent
name
- name of child
public IFrameworkResource getChild(java.lang.String name)
FrameworkResourceException
if not found.
getChild
in interface IFrameworkResourceParent
name
-
protected java.util.Map getChildren()
public boolean existsChild(java.lang.String name)
existsChild
in interface IFrameworkResourceParent
name
-
public java.util.Collection listChildren()
FrameworkResource
child resources.
listChildren
in interface IFrameworkResourceParent
public void remove(java.lang.String name)
FrameworkResourceInstance
by its name.
remove
in interface IFrameworkResourceParent
name
- Name of objectpublic void initialize()
initialize
in interface IFrameworkResourceParent
public java.util.Collection listChildNames()
listChildNames
in interface IFrameworkResourceParent
public boolean childCouldBeLoaded(java.lang.String name)
existsChildResourceDirectory(String)
)
Should be overridden by subtypes if this is not the desired behavior.
childCouldBeLoaded
in interface IFrameworkResourceParent
name
-
public boolean existsChildResourceDirectory(java.lang.String name)
existsChildResourceDirectory
in interface IFrameworkResourceParent
name
- Child resource name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |