public class DefaultProfileActivationContext extends java.lang.Object implements ProfileActivationContext
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
activeProfileIds |
private java.util.List<java.lang.String> |
inactiveProfileIds |
private java.io.File |
projectDirectory |
private java.util.Map<java.lang.String,java.lang.String> |
projectProperties |
private java.util.Map<java.lang.String,java.lang.String> |
systemProperties |
private java.util.Map<java.lang.String,java.lang.String> |
userProperties |
PROPERTY_NAME_PACKAGING
Constructor and Description |
---|
DefaultProfileActivationContext() |
Modifier and Type | Method and Description |
---|---|
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.Map<java.lang.String,java.lang.String> |
getProjectProperties()
Gets current calculated project properties
|
java.util.Map<java.lang.String,java.lang.String> |
getSystemProperties()
Gets the system properties to use for interpolation and profile activation.
|
java.util.Map<java.lang.String,java.lang.String> |
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.
|
DefaultProfileActivationContext |
setProjectDirectory(java.io.File projectDirectory)
Sets the base directory of the current project.
|
DefaultProfileActivationContext |
setProjectProperties(java.util.Properties projectProperties) |
DefaultProfileActivationContext |
setSystemProperties(java.util.Map<java.lang.String,java.lang.String> systemProperties)
Sets the system properties to use for interpolation and profile activation.
|
DefaultProfileActivationContext |
setSystemProperties(java.util.Properties systemProperties)
Sets the system properties to use for interpolation and profile activation.
|
DefaultProfileActivationContext |
setUserProperties(java.util.Map<java.lang.String,java.lang.String> userProperties)
Sets the user 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.
|
private java.util.List<java.lang.String> activeProfileIds
private java.util.List<java.lang.String> inactiveProfileIds
private java.util.Map<java.lang.String,java.lang.String> systemProperties
private java.util.Map<java.lang.String,java.lang.String> userProperties
private java.util.Map<java.lang.String,java.lang.String> projectProperties
private java.io.File projectDirectory
public java.util.List<java.lang.String> getActiveProfileIds()
ProfileActivationContext
getActiveProfileIds
in interface ProfileActivationContext
null
.public DefaultProfileActivationContext setActiveProfileIds(java.util.List<java.lang.String> activeProfileIds)
activeProfileIds
- The identifiers of those profiles to activate, may be null
.null
.public java.util.List<java.lang.String> getInactiveProfileIds()
ProfileActivationContext
getInactiveProfileIds
in interface ProfileActivationContext
null
.public DefaultProfileActivationContext setInactiveProfileIds(java.util.List<java.lang.String> inactiveProfileIds)
inactiveProfileIds
- The identifiers of those profiles to deactivate, may be null
.null
.public java.util.Map<java.lang.String,java.lang.String> getSystemProperties()
ProfileActivationContext
System.getProperties()
and environment variables.getSystemProperties
in interface ProfileActivationContext
null
.public DefaultProfileActivationContext setSystemProperties(java.util.Properties systemProperties)
System.getProperties()
and environment variables.systemProperties
- The system properties, may be null
.null
.public DefaultProfileActivationContext setSystemProperties(java.util.Map<java.lang.String,java.lang.String> systemProperties)
System.getProperties()
and environment variables.systemProperties
- The system properties, may be null
.null
.public java.util.Map<java.lang.String,java.lang.String> getUserProperties()
ProfileActivationContext
-Dkey=value
parameter on the command
line.getUserProperties
in interface ProfileActivationContext
null
.public DefaultProfileActivationContext setUserProperties(java.util.Properties userProperties)
-Dkey=value
parameter on the command
line.userProperties
- The user properties, may be null
.null
.public DefaultProfileActivationContext setUserProperties(java.util.Map<java.lang.String,java.lang.String> userProperties)
-Dkey=value
parameter on the command
line.userProperties
- The user properties, may be null
.null
.public java.io.File getProjectDirectory()
ProfileActivationContext
getProjectDirectory
in interface ProfileActivationContext
null
if none.public DefaultProfileActivationContext setProjectDirectory(java.io.File projectDirectory)
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.null
.public java.util.Map<java.lang.String,java.lang.String> getProjectProperties()
ProfileActivationContext
getProjectProperties
in interface ProfileActivationContext
null
.public DefaultProfileActivationContext setProjectProperties(java.util.Properties projectProperties)