Package: org.grails.cli.profile

## [Java] Interface Profile

- A Profile defines an active code generation and command execution policy. For example the "web" profile allows the execution of code gen and build commands that relate to web applications

  Authors:
    Graeme Rocher
    Lari Hotari
  Since:
    3.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `java.util.Set<java.lang.String>` | `getBinaryExtensions()` @return The list of file extensions which should be treated as binary
    `` | `java.util.List<java.lang.String>` | `getBuildMergeProfileNames()` @return The profile names to participate in build merge
    `` | `java.util.List<java.lang.String>` | `getBuildPlugins()` @return The list of build plugins for this profile
    `` | `java.util.List<java.lang.String>` | `getBuildRepositories()` @return The buildscript maven repository definitions for this profile
    `` | `Command` | `getCommand(ProjectContext context, java.lang.String name)` Obtain a command by name
    `` | `java.lang.Iterable<Command>` | `getCommands(ProjectContext context)` The profile Command instances
    `` | `java.lang.Iterable<jline.console.completer.Completer>` | `getCompleters(ProjectContext context)` The profile completers
    `` | `NavigableMap` | `getConfiguration()` @return The profiles configuration
    `` | `java.lang.Iterable<Feature>` | `getDefaultFeatures()` @return The default features for this profile
    `` | `java.util.List<org.eclipse.aether.graph.Dependency>` | `getDependencies()` @return The dependency definitions for this profile
    `` | `java.lang.String` | `getDescription()` @return The description of the profile
    `` | `java.util.Set<java.lang.String>` | `getExecutablePatterns()` @return The list of file patterns which should be executable in the resulting application
    `` | `java.lang.Iterable<Profile>` | `getExtends()` The other Profile instances that this Profile extends
    `` | `java.lang.Iterable<Feature>` | `getFeatures()` @return The features for this profile
    `` | `java.lang.String` | `getInstructions()` @return Text to display after an application has been created with the profile
    `` | `java.lang.String` | `getName()` @return The name of the profile
    `` | `java.lang.String` | `getParentSkeletonDir()` @return The subfolder the parent profile(s) skeleton should be copied into
    `` | `java.io.File` | `getParentSkeletonDir(java.io.File parent)` @return The directory the parent profile(s) skeleton should be copied into
    `` | `Resource` | `getProfileDir()` @return The directory where the profile is located locally
    `` | `java.util.List<java.lang.String>` | `getRepositories()` @return The maven repository definitions for this profile
    `` | `java.lang.Iterable<Feature>` | `getRequiredFeatures()` @return The required features for this profile
    `` | `java.util.List<java.lang.String>` | `getSkeletonExcludes()` Returns: A list of paths to exclude from the skeleton.
    `` | `Resource` | `getTemplate(java.lang.String path)` Obtain a template by path
    `` | `java.lang.String` | `getVersion()` @return The version of the profile
    `` | `boolean` | `handleCommand(ExecutionContext context)` Obtains a Command
    `` | `boolean` | `hasCommand(ProjectContext context, java.lang.String name)` Whether a command executes for the given context and name

- - ### Method Detail

    - #### public java.util.Set<java.lang.String> getBinaryExtensions()

      Returns:
        The list of file extensions which should be treated as binary

    - #### public java.util.List<java.lang.String> getBuildMergeProfileNames()

      Returns:
        The profile names to participate in build merge

    - #### public java.util.List<java.lang.String> getBuildPlugins()

      Returns:
        The list of build plugins for this profile

    - #### public java.util.List<java.lang.String> getBuildRepositories()

      Returns:
        The buildscript maven repository definitions for this profile

    - #### public Command getCommand(ProjectContext context, java.lang.String name)

      Obtain a command by name

      Parameters:
        `name` - Obtain a command by name
      Returns:
        The command

    - #### public java.lang.Iterable<Command> getCommands(ProjectContext context)

      The profile Command instances

      Parameters:
        `context` - The ProjectContext instance
      Returns:
        An java.lang.Iterable of Command instances

    - #### public java.lang.Iterable<jline.console.completer.Completer> getCompleters(ProjectContext context)

      The profile completers

      Parameters:
        `context` - The ProjectContext instance
      Returns:
        An java.lang.Iterable of jline.console.completer.Completer instances

    - #### public NavigableMap getConfiguration()

      Returns:
        The profiles configuration

    - #### public java.lang.Iterable<Feature> getDefaultFeatures()

      Returns:
        The default features for this profile

    - #### public java.util.List<org.eclipse.aether.graph.Dependency> getDependencies()

      Returns:
        The dependency definitions for this profile

    - #### public java.lang.String getDescription()

      Returns:
        The description of the profile

    - #### public java.util.Set<java.lang.String> getExecutablePatterns()

      Returns:
        The list of file patterns which should be executable in the resulting application

    - #### public java.lang.Iterable<Profile> getExtends()

      The other Profile instances that this Profile extends

      Returns:
        zero or many Profile instance that this profile extends from

    - #### public java.lang.Iterable<Feature> getFeatures()

      Returns:
        The features for this profile

    - #### public java.lang.String getInstructions()

      Returns:
        Text to display after an application has been created with the profile

    - #### public java.lang.String getName()

      Returns:
        The name of the profile

    - #### public java.lang.String getParentSkeletonDir()

      Returns:
        The subfolder the parent profile(s) skeleton should be copied into

    - #### public java.io.File getParentSkeletonDir(java.io.File parent)

      Returns:
        The directory the parent profile(s) skeleton should be copied into

    - #### public Resource getProfileDir()

      Returns:
        The directory where the profile is located locally

    - #### public java.util.List<java.lang.String> getRepositories()

      Returns:
        The maven repository definitions for this profile

    - #### public java.lang.Iterable<Feature> getRequiredFeatures()

      Returns:
        The required features for this profile

    - #### public java.util.List<java.lang.String> getSkeletonExcludes()

      Returns:
        A list of paths to exclude from the skeleton. Used in ant fileset exclude:

    - #### public Resource getTemplate(java.lang.String path)

      Obtain a template by path

      Parameters:
        `path` - The path to template
      Returns:
        The resource or null if it doesn't exist

    - #### public java.lang.String getVersion()

      Returns:
        The version of the profile

    - #### public boolean handleCommand(ExecutionContext context)

      Obtains a Command

      Returns:
        True if the command was handled

    - #### public boolean hasCommand(ProjectContext context, java.lang.String name)

      Whether a command executes for the given context and name

      Parameters:
        `context` - The ProjectContext
        `name` - The command name
      Returns:
        True if the command does exist