public class FrameworkProjectMgr extends FrameworkResourceParent implements IFrameworkProjectMgr
FrameworkResourceParent.NoSuchResourceException
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log |
VALID_RESOURCE_NAME_REGEX
Modifier and Type | Method and Description |
---|---|
static FrameworkProjectMgr |
create(java.lang.String name,
java.io.File baseDir,
Framework framework)
Factory method.
|
IFrameworkResource |
createChild(java.lang.String projectName)
create a new child resource
|
FrameworkProject |
createFrameworkProject(java.lang.String projectName)
Add a new project to the map.
|
FrameworkProject |
createFrameworkProject(java.lang.String projectName,
java.util.Properties properties)
Create a new project if it doesn't exist, otherwise returns existing project
|
FrameworkProject |
createFrameworkProjectStrict(java.lang.String projectName,
java.util.Properties properties)
Create a new project if it doesn't, otherwise throw exception
|
boolean |
existsFrameworkProject(java.lang.String project)
Determines if Depot exists in framework.
|
Framework |
getFramework()
Gets the instance of the framework for this resource mgr
|
FrameworkProject |
getFrameworkProject(java.lang.String name)
Looks for name as an existing Depot object and returns it
|
java.util.Properties |
getProperties() |
java.util.Map |
getPropertiesMap()
Retrieves map of property data
|
java.lang.String |
getProperty(java.lang.String key)
get property value
|
java.io.File |
getPropertyFile() |
boolean |
hasProperty(java.lang.String key)
checks if property value exists
|
boolean |
isConfiguredObjectDeploymentsCheck(java.lang.String projectName)
Checks if objects must be registered in the resources.properties file
|
java.util.Collection |
listFrameworkProjects()
returns a collection of Depot objects
|
IFrameworkResource |
loadChild(java.lang.String name)
Load a specified child by name, returning null if it does not exist
|
void |
removeFrameworkProject(java.lang.String projectName)
Remove a project definition
|
java.lang.String |
toString()
Prints internal state info for debugging purposes
|
childCouldBeLoaded, existsChild, existsChildResourceDirectory, getChild, getChildren, initialize, listChildNames, listChildren, remove
getBaseDir, getLogger, getName, getParent, isValid, storeProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
childCouldBeLoaded, existsChild, existsChildResourceDirectory, getChild, initialize, listChildNames, listChildren, remove
getBaseDir, getName, getParent, isValid
public static FrameworkProjectMgr create(java.lang.String name, java.io.File baseDir, Framework framework)
name
- Name of manager. informational purposesbaseDir
- Basedir where child resources liveframework
- Framework instancepublic FrameworkProject createFrameworkProject(java.lang.String projectName)
createFrameworkProject
in interface IFrameworkProjectMgr
projectName
- Name of the projectFrameworkProject
public FrameworkProject createFrameworkProject(java.lang.String projectName, java.util.Properties properties)
IFrameworkProjectMgr
createFrameworkProject
in interface IFrameworkProjectMgr
projectName
- Name of the projectproperties
- additional properties to include in the project's properties filepublic FrameworkProject createFrameworkProjectStrict(java.lang.String projectName, java.util.Properties properties)
createFrameworkProjectStrict
in interface IFrameworkProjectMgr
projectName
- name of projectproperties
- config propertiesjava.lang.IllegalArgumentException
- if the project already existspublic void removeFrameworkProject(java.lang.String projectName)
removeFrameworkProject
in interface IFrameworkProjectMgr
projectName
- name of the projectpublic java.util.Collection listFrameworkProjects()
listFrameworkProjects
in interface IFrameworkProjectMgr
public FrameworkProject getFrameworkProject(java.lang.String name)
getFrameworkProject
in interface IFrameworkProjectMgr
name
- The name of the projectpublic boolean existsFrameworkProject(java.lang.String project)
existsFrameworkProject
in interface IFrameworkProjectMgr
project
- The name of the projectpublic java.lang.String toString()
toString
in class FrameworkResource
public java.util.Properties getProperties()
public java.io.File getPropertyFile()
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)
IFrameworkResourceParent
loadChild
in interface IFrameworkResourceParent
public Framework getFramework()
IFrameworkProjectMgr
getFramework
in interface IFrameworkProjectMgr
public boolean isConfiguredObjectDeploymentsCheck(java.lang.String projectName)
isConfiguredObjectDeploymentsCheck
in interface IFrameworkProjectMgr
projectName
- Name of project to checkpublic java.lang.String getProperty(java.lang.String key)
getProperty
in interface PropertyRetriever
getProperty
in interface IPropertyLookup
key
- the name of the propertypublic boolean hasProperty(java.lang.String key)
hasProperty
in interface IPropertyLookup
key
- name of the propertypublic java.util.Map getPropertiesMap()
getPropertiesMap
in interface IPropertyLookup
Map
containing property key/value pairPropertyLookupException
- thrown if loaderror