Interface ExecutionEnvironmentConfiguration
Instances of this type collect information on the execution environment a project is targeted to.
Since there are multiple ways to configure the execution environment, and some of them are
project type specific, it is explicitly allowed to call the configuration setters of an instance
multiple times. In order to ensure that all configuration sources are taken into account,
IllegalStateExceptions are thrown if the configuration setters are called too late, i.e.
after the effective configuration has been queried for the first time.
In case of an custom execution environment, the information required for the build can not be directly computed from the configuration. Therefore, this instance also has a callback to add the missing information as soon as it has been extracted from the target platform.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the execution environment specification with information needed for the build.Returns the name of the configured profile.booleanbooleanReturnstrueif the configured profile is not one of the known standard execution environments.booleandefault booleanvoidoverrideProfileConfiguration(String profileName, String configurationOrigin) Sets the effective profile configuration.voidsetFullSpecificationForCustomProfile(List<SystemCapability> systemCapabilities) Call-back for setting the actual specification for the configured custom profile.voidsetProfileConfiguration(String profileName, String configurationOrigin) Sets the effective profile configuration, unless the methodoverrideProfileConfiguration(String, String)has been called on this instance.
-
Method Details
-
overrideProfileConfiguration
void overrideProfileConfiguration(String profileName, String configurationOrigin) throws IllegalStateException Sets the effective profile configuration.- Throws:
IllegalStateException- if the configuration has been already frozen by calling any one of the getters defined inExecutionEnvironmentConfiguration
-
setProfileConfiguration
void setProfileConfiguration(String profileName, String configurationOrigin) throws IllegalStateException Sets the effective profile configuration, unless the methodoverrideProfileConfiguration(String, String)has been called on this instance.- Throws:
IllegalStateException- if the configuration has been already frozen by calling any one of the getters defined inExecutionEnvironmentConfiguration
-
getProfileName
String getProfileName()Returns the name of the configured profile. -
isCustomProfile
boolean isCustomProfile()Returnstrueif the configured profile is not one of the known standard execution environments. -
setFullSpecificationForCustomProfile
void setFullSpecificationForCustomProfile(List<SystemCapability> systemCapabilities) throws IllegalStateException 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.- Throws:
IllegalStateException- if the configured execution environment profile is not a custom profile- See Also:
-
getFullSpecification
Returns the execution environment specification with information needed for the build.- Throws:
IllegalStateException- if a custom execution environment profile has been configure, andsetFullSpecificationForCustomProfile(List)has not been called.- See Also:
-
isIgnoredByResolver
boolean isIgnoredByResolver() -
isResolveWithEEConstraints
default boolean isResolveWithEEConstraints() -
getAllKnownEEs
Collection<ExecutionEnvironment> getAllKnownEEs()- Returns:
- all known Execution Environments accessible for the same scope
-
ignoreExecutionEnvironment
boolean ignoreExecutionEnvironment()
-