org.mevenide.context
Interface IQueryContext

All Known Implementing Classes:
AbstractQueryContext

public interface IQueryContext

interface to externalize the project files content/models to one place, and reuse in all the queries (ILocationFinder, IPropertyResolver, etc)

Author:
Milos Kleint

Field Summary
static int BUILD_PROPS_OFFSET
           
static int LOCATION_PARENT_PROJECT
          Location constant, the given key is in parent's directory project.properties file.
static int LOCATION_PARENT_PROJECT_BUILD
          Location constant, the given key is in parent's directory build.properties file.
static int LOCATION_PROJECT
          Location constant, the given key is in project.properties file.
static int LOCATION_PROJECT_BUILD
          Location constant, the given key is in ${basedir}/build.properties file.
static int LOCATION_USER_BUILD
          Location constant, the given key is in ${user.home}/build.properties file.
static int PROJECT_PROPS_OFFSET
           
 
Method Summary
 java.util.Set getBuildPropertyKeys()
          all property keys defined in build.properties
 java.lang.String getBuildPropertyValue(java.lang.String key)
           
 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)
           
 IPropertyResolver getResolver()
          the default property resolver for this instance of IQueryContext
 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)
           
 

Field Detail

LOCATION_PROJECT

public static final int LOCATION_PROJECT
Location constant, the given key is in project.properties file.

See Also:
Constant Field Values

LOCATION_PROJECT_BUILD

public static final int LOCATION_PROJECT_BUILD
Location constant, the given key is in ${basedir}/build.properties file.

See Also:
Constant Field Values

LOCATION_USER_BUILD

public static final int LOCATION_USER_BUILD
Location constant, the given key is in ${user.home}/build.properties file.

See Also:
Constant Field Values

LOCATION_PARENT_PROJECT

public static final int LOCATION_PARENT_PROJECT
Location constant, the given key is in parent's directory project.properties file. Parent is the file denoted by the extend tag in the pom file.

See Also:
Constant Field Values

LOCATION_PARENT_PROJECT_BUILD

public static final int LOCATION_PARENT_PROJECT_BUILD
Location constant, the given key is in parent's directory build.properties file. Parent is the file denoted by the extend tag in the pom file.

See Also:
Constant Field Values

PROJECT_PROPS_OFFSET

public static final int PROJECT_PROPS_OFFSET
See Also:
Constant Field Values

BUILD_PROPS_OFFSET

public static final int BUILD_PROPS_OFFSET
See Also:
Constant Field Values
Method Detail

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String key)

getUserPropertyValue

public java.lang.String getUserPropertyValue(java.lang.String key)

getBuildPropertyValue

public java.lang.String getBuildPropertyValue(java.lang.String key)

getProjectPropertyValue

public java.lang.String getProjectPropertyValue(java.lang.String key)

getParentBuildPropertyValue

public java.lang.String getParentBuildPropertyValue(java.lang.String key)

getParentProjectPropertyValue

public java.lang.String getParentProjectPropertyValue(java.lang.String key)

getPropertyValueAt

public java.lang.String getPropertyValueAt(java.lang.String key,
                                           int location)
Parameters:
location - PomContext.getProjectDepth() * 10 + x, where x is 0 for project.properties file and 1 for build.properties file.

getPropertyKeysAt

public java.util.Set getPropertyKeysAt(int location)
all property keys defined at given location..

Parameters:
location - PomContext.getProjectDepth() * 10 + x, where x is PROJECT_PROPS_OFFSET for project.properties file and BUILD_PROPS_OFFSET for build.properties file.

getUserPropertyKeys

public java.util.Set getUserPropertyKeys()
all property keys defined in userdir/build.properties


getBuildPropertyKeys

public java.util.Set getBuildPropertyKeys()
all property keys defined in build.properties


getProjectPropertyKeys

public java.util.Set getProjectPropertyKeys()
all property keys defined in project.properties


getParentBuildPropertyKeys

public java.util.Set getParentBuildPropertyKeys()
all property keys defined in parent build.properties


getParentProjectPropertyKeys

public java.util.Set getParentProjectPropertyKeys()
all property keys defined in parent project.properties


getProjectDirectory

public java.io.File getProjectDirectory()
the directory where the POM is located


getUserDirectory

public java.io.File getUserDirectory()
user directory, location of the build.properties file.


getPOMContext

public IProjectContext getPOMContext()
pom files, parsed xml elements and project instances from the pom files of this project


getResolver

public IPropertyResolver getResolver()
the default property resolver for this instance of IQueryContext



Copyright © 2003-2005 The Codehaus. All Rights Reserved.