org.apache.maven.model.profile
Class DefaultProfileActivationContext

java.lang.Object
  extended by org.apache.maven.model.profile.DefaultProfileActivationContext
All Implemented Interfaces:
ProfileActivationContext

public class DefaultProfileActivationContext
extends java.lang.Object
implements ProfileActivationContext

Describes the environmental context used to determine the activation status of profiles.

Author:
Benjamin Bentmann

Constructor Summary
DefaultProfileActivationContext()
           
 
Method Summary
 java.util.List<java.lang.String> getActiveProfileIds()
          Gets the identifiers of those profiles that should be activated by explicit demand.
 java.util.List<java.lang.String> getInactiveProfileIds()
          Gets the identifiers of those profiles that should be deactivated by explicit demand.
 java.io.File getProjectDirectory()
          Gets the base directory of the current project (if any).
 java.util.Properties getSystemProperties()
          Gets the system properties to use for interpolation and profile activation.
 java.util.Properties getUserProperties()
          Gets the user properties to use for interpolation and profile activation.
 DefaultProfileActivationContext setActiveProfileIds(java.util.List<java.lang.String> activeProfileIds)
          Sets the identifiers of those profiles that should be activated by explicit demand.
 DefaultProfileActivationContext setInactiveProfileIds(java.util.List<java.lang.String> inactiveProfileIds)
          Sets the identifiers of those profiles that should be deactivated by explicit demand.
 ProfileActivationContext setProjectDirectory(java.io.File projectDirectory)
          Sets the base directory of the current project.
 DefaultProfileActivationContext setSystemProperties(java.util.Properties systemProperties)
          Sets the system properties to use for interpolation and profile activation.
 DefaultProfileActivationContext setUserProperties(java.util.Properties userProperties)
          Sets the user properties to use for interpolation and profile activation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProfileActivationContext

public DefaultProfileActivationContext()
Method Detail

getActiveProfileIds

public java.util.List<java.lang.String> getActiveProfileIds()
Description copied from interface: ProfileActivationContext
Gets the identifiers of those profiles that should be activated by explicit demand.

Specified by:
getActiveProfileIds in interface ProfileActivationContext
Returns:
The identifiers of those profiles to activate, never null.

setActiveProfileIds

public DefaultProfileActivationContext setActiveProfileIds(java.util.List<java.lang.String> activeProfileIds)
Description copied from interface: ProfileActivationContext
Sets the identifiers of those profiles that should be activated by explicit demand.

Specified by:
setActiveProfileIds in interface ProfileActivationContext
Parameters:
activeProfileIds - The identifiers of those profiles to activate, may be null.
Returns:
This context, never null.

getInactiveProfileIds

public java.util.List<java.lang.String> getInactiveProfileIds()
Description copied from interface: ProfileActivationContext
Gets the identifiers of those profiles that should be deactivated by explicit demand.

Specified by:
getInactiveProfileIds in interface ProfileActivationContext
Returns:
The identifiers of those profiles to deactivate, never null.

setInactiveProfileIds

public DefaultProfileActivationContext setInactiveProfileIds(java.util.List<java.lang.String> inactiveProfileIds)
Description copied from interface: ProfileActivationContext
Sets the identifiers of those profiles that should be deactivated by explicit demand.

Specified by:
setInactiveProfileIds in interface ProfileActivationContext
Parameters:
inactiveProfileIds - The identifiers of those profiles to deactivate, may be null.
Returns:
This context, never null.

getSystemProperties

public java.util.Properties getSystemProperties()
Description copied from interface: ProfileActivationContext
Gets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment like System.getProperties() and environment variables.

Specified by:
getSystemProperties in interface ProfileActivationContext
Returns:
The execution properties, never null.

setSystemProperties

public DefaultProfileActivationContext setSystemProperties(java.util.Properties systemProperties)
Description copied from interface: ProfileActivationContext
Sets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment like System.getProperties() and environment variables.

Specified by:
setSystemProperties in interface ProfileActivationContext
Parameters:
systemProperties - The execution properties, may be null.
Returns:
This context, never null.

getUserProperties

public java.util.Properties getUserProperties()
Description copied from interface: ProfileActivationContext
Gets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the -Dkey=value parameter on the command line.

Specified by:
getUserProperties in interface ProfileActivationContext
Returns:
The user properties, never null.

setUserProperties

public DefaultProfileActivationContext setUserProperties(java.util.Properties userProperties)
Description copied from interface: ProfileActivationContext
Sets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the -Dkey=value parameter on the command line.

Specified by:
setUserProperties in interface ProfileActivationContext
Parameters:
userProperties - The user properties, may be null.
Returns:
This context, never null.

getProjectDirectory

public java.io.File getProjectDirectory()
Description copied from interface: ProfileActivationContext
Gets the base directory of the current project (if any).

Specified by:
getProjectDirectory in interface ProfileActivationContext
Returns:
The base directory of the current project or null if none.

setProjectDirectory

public ProfileActivationContext setProjectDirectory(java.io.File projectDirectory)
Description copied from interface: ProfileActivationContext
Sets the base directory of the current project.

Specified by:
setProjectDirectory in interface ProfileActivationContext
Parameters:
projectDirectory - The base directory of the current project, may be null if profile activation happens in the context of metadata retrieval rather than project building.
Returns:
This context, never null.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.