Interface ProfileActivationContext

  • All Known Implementing Classes:
    DefaultProfileActivationContext

    public interface ProfileActivationContext
    Describes the environmental context used to determine the activation status of profiles.
    Author:
    Benjamin Bentmann
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROPERTY_NAME_PACKAGING
      Key of the property containing the project's packaging.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Field Detail

      • PROPERTY_NAME_PACKAGING

        static final java.lang.String PROPERTY_NAME_PACKAGING
        Key of the property containing the project's packaging. Available in getUserProperties().
        Since:
        3.9
        See Also:
        Constant Field Values
    • Method Detail

      • getActiveProfileIds

        java.util.List<java.lang.String> getActiveProfileIds()
        Gets the identifiers of those profiles that should be activated by explicit demand.
        Returns:
        The identifiers of those profiles to activate, never null.
      • getInactiveProfileIds

        java.util.List<java.lang.String> getInactiveProfileIds()
        Gets the identifiers of those profiles that should be deactivated by explicit demand.
        Returns:
        The identifiers of those profiles to deactivate, never null.
      • getSystemProperties

        java.util.Map<java.lang.String,​java.lang.String> getSystemProperties()
        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.
        Returns:
        The execution properties, never null.
      • getUserProperties

        java.util.Map<java.lang.String,​java.lang.String> getUserProperties()
        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.
        Returns:
        The user properties, never null.
      • getProjectDirectory

        java.io.File getProjectDirectory()
        Gets the base directory of the current project (if any).
        Returns:
        The base directory of the current project or null if none.
      • getProjectProperties

        java.util.Map<java.lang.String,​java.lang.String> getProjectProperties()
        Gets current calculated project properties
        Returns:
        The project properties, never null.