Package org.eclipse.tycho.core.ee
Class ExecutionEnvironmentConfigurationImpl
- java.lang.Object
-
- org.eclipse.tycho.core.ee.ExecutionEnvironmentConfigurationImpl
-
- All Implemented Interfaces:
ExecutionEnvironmentConfiguration
public class ExecutionEnvironmentConfigurationImpl extends java.lang.Object implements ExecutionEnvironmentConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ExecutionEnvironmentConfigurationImpl.ProfileConfiguration
-
Field Summary
Fields Modifier and Type Field Description private ExecutionEnvironmentConfigurationImpl.ProfileConfiguration[]
configurations
Configurations, ordered by precedenceprivate CustomExecutionEnvironment
customExecutionEnvironment
private static java.lang.String
DEFAULT_EXECUTION_ENVIRONMENT
private java.lang.String
effectiveProfileName
private boolean
ignoredByResolver
private org.codehaus.plexus.logging.Logger
logger
private static int
PRIMARY
private static int
SECONDARY
private org.apache.maven.execution.MavenSession
session
private org.apache.maven.toolchain.ToolchainManager
toolchainManager
-
Constructor Summary
Constructors Constructor Description ExecutionEnvironmentConfigurationImpl(org.codehaus.plexus.logging.Logger logger, boolean ignoredByResolver, org.apache.maven.toolchain.ToolchainManager toolchainManager, org.apache.maven.execution.MavenSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkConfigurationMutable()
private java.lang.String
computeEffectiveProfileName()
java.util.Collection<ExecutionEnvironment>
getAllKnownEEs()
ExecutionEnvironment
getFullSpecification()
Returns the execution environment specification with information needed for the build.java.lang.String
getProfileName()
Returns the name of the configured profile.boolean
ignoreExecutionEnvironment()
boolean
isCustomProfile()
Returnstrue
if the configured profile is not one of the known standard execution environments.boolean
isIgnoredByResolver()
void
overrideProfileConfiguration(java.lang.String profileName, java.lang.String configurationOrigin)
Sets the effective profile configuration.void
setFullSpecificationForCustomProfile(java.util.List<SystemCapability> systemCapabilities)
Call-back for setting the actual specification for the configured custom profile.void
setProfileConfiguration(java.lang.String profileName, java.lang.String configurationOrigin)
Sets the effective profile configuration, unless the methodExecutionEnvironmentConfiguration.overrideProfileConfiguration(String, String)
has been called on this instance.
-
-
-
Field Detail
-
DEFAULT_EXECUTION_ENVIRONMENT
private static final java.lang.String DEFAULT_EXECUTION_ENVIRONMENT
- See Also:
- Constant Field Values
-
PRIMARY
private static final int PRIMARY
- See Also:
- Constant Field Values
-
SECONDARY
private static final int SECONDARY
- See Also:
- Constant Field Values
-
logger
private org.codehaus.plexus.logging.Logger logger
-
configurations
private final ExecutionEnvironmentConfigurationImpl.ProfileConfiguration[] configurations
Configurations, ordered by precedence
-
effectiveProfileName
private java.lang.String effectiveProfileName
-
customExecutionEnvironment
private CustomExecutionEnvironment customExecutionEnvironment
-
ignoredByResolver
private final boolean ignoredByResolver
-
toolchainManager
private final org.apache.maven.toolchain.ToolchainManager toolchainManager
-
session
private org.apache.maven.execution.MavenSession session
-
-
Method Detail
-
overrideProfileConfiguration
public void overrideProfileConfiguration(java.lang.String profileName, java.lang.String configurationOrigin) throws java.lang.IllegalStateException
Description copied from interface:ExecutionEnvironmentConfiguration
Sets the effective profile configuration.- Specified by:
overrideProfileConfiguration
in interfaceExecutionEnvironmentConfiguration
- Throws:
java.lang.IllegalStateException
- if the configuration has been already frozen by calling any one of the getters defined inExecutionEnvironmentConfiguration
-
setProfileConfiguration
public void setProfileConfiguration(java.lang.String profileName, java.lang.String configurationOrigin) throws java.lang.IllegalStateException
Description copied from interface:ExecutionEnvironmentConfiguration
Sets the effective profile configuration, unless the methodExecutionEnvironmentConfiguration.overrideProfileConfiguration(String, String)
has been called on this instance.- Specified by:
setProfileConfiguration
in interfaceExecutionEnvironmentConfiguration
- Throws:
java.lang.IllegalStateException
- if the configuration has been already frozen by calling any one of the getters defined inExecutionEnvironmentConfiguration
-
checkConfigurationMutable
private void checkConfigurationMutable() throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
-
getProfileName
public java.lang.String getProfileName()
Description copied from interface:ExecutionEnvironmentConfiguration
Returns the name of the configured profile.- Specified by:
getProfileName
in interfaceExecutionEnvironmentConfiguration
-
computeEffectiveProfileName
private java.lang.String computeEffectiveProfileName()
-
isCustomProfile
public boolean isCustomProfile()
Description copied from interface:ExecutionEnvironmentConfiguration
Returnstrue
if the configured profile is not one of the known standard execution environments.- Specified by:
isCustomProfile
in interfaceExecutionEnvironmentConfiguration
-
setFullSpecificationForCustomProfile
public void setFullSpecificationForCustomProfile(java.util.List<SystemCapability> systemCapabilities) throws java.lang.IllegalStateException
Description copied from interface:ExecutionEnvironmentConfiguration
Call-back for setting the actual specification for the configured custom profile. The specification, e.g. the list of provided packages, is read from the target platform.- Specified by:
setFullSpecificationForCustomProfile
in interfaceExecutionEnvironmentConfiguration
- Throws:
java.lang.IllegalStateException
- if the configured execution environment profile is not a custom profile- See Also:
ExecutionEnvironmentConfiguration.isCustomProfile()
-
getFullSpecification
public ExecutionEnvironment getFullSpecification() throws java.lang.IllegalStateException
Description copied from interface:ExecutionEnvironmentConfiguration
Returns the execution environment specification with information needed for the build.- Specified by:
getFullSpecification
in interfaceExecutionEnvironmentConfiguration
- Throws:
java.lang.IllegalStateException
- if a custom execution environment profile has been configure, andExecutionEnvironmentConfiguration.setFullSpecificationForCustomProfile(List)
has not been called.- See Also:
ExecutionEnvironment
-
isIgnoredByResolver
public boolean isIgnoredByResolver()
- Specified by:
isIgnoredByResolver
in interfaceExecutionEnvironmentConfiguration
-
getAllKnownEEs
public java.util.Collection<ExecutionEnvironment> getAllKnownEEs()
- Specified by:
getAllKnownEEs
in interfaceExecutionEnvironmentConfiguration
- Returns:
- all known Execution Environments accessible for the same scope
-
ignoreExecutionEnvironment
public boolean ignoreExecutionEnvironment()
- Specified by:
ignoreExecutionEnvironment
in interfaceExecutionEnvironmentConfiguration
-
-