|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mevenide.context.AbstractQueryContext
org.mevenide.context.DefaultQueryContext
default implementation of IQueryContext. to externalize the project files content/models to one place, and reuse in all the queries (ILocationFinder, I PropertyResolver, etc)
| Field Summary |
| Fields inherited from interface org.mevenide.context.IQueryContext |
BUILD_PROPS_OFFSET, LOCATION_PARENT_PROJECT, LOCATION_PARENT_PROJECT_BUILD, LOCATION_PROJECT, LOCATION_PROJECT_BUILD, LOCATION_USER_BUILD, PROJECT_PROPS_OFFSET |
| Constructor Summary | |
DefaultQueryContext(java.io.File projectDirectory)
create a new project context. |
|
DefaultQueryContext(java.io.File projectDirectory,
IQueryErrorCallback errorCallback)
create a new project context. |
|
| Method Summary | |
java.util.Set |
getBuildPropertyKeys()
all property keys defined in build.properties |
java.lang.String |
getBuildPropertyValue(java.lang.String key)
|
static IQueryContext |
getNonProjectContextInstance()
the default instance that only refers to the user.dir properties file non-project based querycontext. |
java.util.Set |
getParentBuildPropertyKeys()
all property keys defined in parent build.properties |
java.lang.String |
getParentBuildPropertyValue(java.lang.String key)
|
java.util.Set |
getParentProjectPropertyKeys()
all property keys defined in parent project.properties |
java.lang.String |
getParentProjectPropertyValue(java.lang.String key)
|
IProjectContext |
getPOMContext()
pom files, parsed xml elements and project instances from the pom files of this project |
java.io.File |
getProjectDirectory()
the directory where the POM is located |
java.util.Set |
getProjectPropertyKeys()
all property keys defined in project.properties |
java.lang.String |
getProjectPropertyValue(java.lang.String key)
|
java.util.Set |
getPropertyKeysAt(int location)
all property keys defined at given location.. |
java.lang.String |
getPropertyValue(java.lang.String key)
|
java.lang.String |
getPropertyValueAt(java.lang.String key,
int location)
|
java.io.File |
getUserDirectory()
user directory, location of the build.properties file. |
java.util.Set |
getUserPropertyKeys()
all property keys defined in userdir/build.properties |
java.lang.String |
getUserPropertyValue(java.lang.String key)
|
| Methods inherited from class org.mevenide.context.AbstractQueryContext |
getResolver |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultQueryContext(java.io.File projectDirectory)
projectDirectory - the directory where the project.xml file is located.
public DefaultQueryContext(java.io.File projectDirectory,
IQueryErrorCallback errorCallback)
projectDirectory - the directory where the project.xml file is located.errorCallback - callback which gets notified when reading/parsing errors occur| Method Detail |
public static IQueryContext getNonProjectContextInstance()
public java.lang.String getBuildPropertyValue(java.lang.String key)
public java.io.File getProjectDirectory()
IQueryContext
public java.lang.String getProjectPropertyValue(java.lang.String key)
public java.lang.String getParentBuildPropertyValue(java.lang.String key)
public java.lang.String getParentProjectPropertyValue(java.lang.String key)
public java.lang.String getUserPropertyValue(java.lang.String key)
public java.io.File getUserDirectory()
IQueryContext
public IProjectContext getPOMContext()
IQueryContext
public java.util.Set getBuildPropertyKeys()
IQueryContext
public java.util.Set getProjectPropertyKeys()
IQueryContext
public java.util.Set getUserPropertyKeys()
IQueryContext
public java.util.Set getParentBuildPropertyKeys()
IQueryContext
public java.util.Set getParentProjectPropertyKeys()
IQueryContext
public java.lang.String getPropertyValueAt(java.lang.String key,
int location)
location - PomContext.getProjectDepth() * 10 + x,
where x is 0 for project.properties file and 1 for build.properties file.public java.util.Set getPropertyKeysAt(int location)
IQueryContext
location - PomContext.getProjectDepth() * 10 + x,
where x is PROJECT_PROPS_OFFSET for project.properties file and BUILD_PROPS_OFFSET for build.properties file.public final java.lang.String getPropertyValue(java.lang.String key)
getPropertyValue in interface IQueryContextgetPropertyValue in class AbstractQueryContext
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||