Enum ProjectContextKey

java.lang.Object
java.lang.Enum<ProjectContextKey>
org.machanism.machai.gw.processor.ProjectContextKey
All Implemented Interfaces:
Serializable, Comparable<ProjectContextKey>

public enum ProjectContextKey extends Enum<ProjectContextKey>
Represents the context metadata keys used for evaluating and storing project layouts.

These keys are utilized as identifiers inside the ProjectContextFunctionTools registry to associate project-specific environment and directory information with a given project directory.

Version:
1.2.2
Author:
Viktor Tovstyi
  • Enum Constant Details

    • OPERATING_SYSTEM

      public static final ProjectContextKey OPERATING_SYSTEM
      The operating system name where the application is currently running.

      Source: SystemUtils.OS_NAME

    • PROJECT_NAME

      public static final ProjectContextKey PROJECT_NAME
      The user-friendly name of the project.

      Source: projectLayout.getProjectName()

    • PROJECT_ID

      public static final ProjectContextKey PROJECT_ID
      The unique identifier of the project.

      Source: projectLayout.getProjectId()

    • PROJECT_DIR_NAME

      public static final ProjectContextKey PROJECT_DIR_NAME
      The directory name of the project folder itself.

      Source: projectDir.getName()

    • PARENT_PROJECT_ID

      public static final ProjectContextKey PARENT_PROJECT_ID
      The unique identifier of the parent project, if one exists.

      Source: projectLayout.getParentId()

    • PARENT_PROJECT_DIR_NAME

      public static final ProjectContextKey PARENT_PROJECT_DIR_NAME
      The directory name of the parent project folder, or null if the project has no parent.

      Source: Derived from projectDir.getParentFile()

    • REL_PATH_FROM_ROOT

      public static final ProjectContextKey REL_PATH_FROM_ROOT
      The relative filesystem path from the root directory to the project's directory.

      Source: ProjectLayout.getRelativePath(getRootDir(), projectDir)

    • LAYOUT_TYPE

      public static final ProjectContextKey LAYOUT_TYPE
      The classification or structure style of the layout (e.g., Maven, Gradle, Custom).

      Source: projectLayout.getProjectLayoutType()

    • SRC_AND_RESOURCE_DIRS

      public static final ProjectContextKey SRC_AND_RESOURCE_DIRS
      A formatted list/line describing the path information for the main source and resource directories.

      Source: Evaluated paths of projectLayout.getSources()

    • TEST_SRC_AND_RESOURCE_DIRS

      public static final ProjectContextKey TEST_SRC_AND_RESOURCE_DIRS
      A formatted list/line describing the path information for test source and resource directories.

      Source: Evaluated paths of projectLayout.getTests()

    • DOCS_DIRS

      public static final ProjectContextKey DOCS_DIRS
      A formatted list/line describing the path information for documentation directories.

      Source: Evaluated paths of projectLayout.getDocuments()

    • MODULES

      public static final ProjectContextKey MODULES
      A formatted list/line describing the project sub-modules.

      Source: Evaluated paths of projectLayout.getModules()

  • Field Details

    • key

      private final String key
  • Constructor Details

    • ProjectContextKey

      private ProjectContextKey(String key)
      Constructs a ProjectContextKey constant mapped to its raw string representation.
      Parameters:
      key - the string key used in the backend registry map
  • Method Details

    • values

      public static ProjectContextKey[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ProjectContextKey valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getKey

      public String getKey()
      Gets the raw string value of the metadata key.
      Returns:
      the metadata key as a String