org.mevenide.properties
Interface IPropertyLocator

All Known Implementing Classes:
PropertyFilesAggregator

public interface IPropertyLocator

Instances of this interface are able to find out where the given property is defined.

Author:
Milos Kleint

Field Summary
static int LOCATION_DEFAULTS
          Location constant, the given key is default.
static int LOCATION_NOT_DEFINED
          Location constant, the given key was not found.
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_SYSENV
          sys
static int LOCATION_USER_BUILD
          Location constant, the given key is in ${user.home}/build.properties file.
 
Method Summary
 java.util.Set getKeysAtLocation(int location)
          returns all the keys at the given location.
 int getPropertyLocation(java.lang.String key)
          Returns where the key is located.
 java.lang.String getValueAtLocation(java.lang.String key, int location)
          get the value of the property as defined at the given location
 boolean isDefinedInLocation(java.lang.String key, int location)
          the return value indicates if the property is defined in the particular properties file.
 

Field Detail

LOCATION_NOT_DEFINED

public static final int LOCATION_NOT_DEFINED
Location constant, the given key was not found.

See Also:
Constant Field Values

LOCATION_DEFAULTS

public static final int LOCATION_DEFAULTS
Location constant, the given key is default. Either maven itself or maven plugin default.

See Also:
Constant Field Values

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

LOCATION_SYSENV

public static final int LOCATION_SYSENV
sys

See Also:
Constant Field Values
Method Detail

getPropertyLocation

public int getPropertyLocation(java.lang.String key)
Returns where the key is located.


isDefinedInLocation

public boolean isDefinedInLocation(java.lang.String key,
                                   int location)
the return value indicates if the property is defined in the particular properties file.


getKeysAtLocation

public java.util.Set getKeysAtLocation(int location)
returns all the keys at the given location.


getValueAtLocation

public java.lang.String getValueAtLocation(java.lang.String key,
                                           int location)
get the value of the property as defined at the given location



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