Package: org.grails.cli.profile

## [Java] Interface Profile

-     public 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
    --- | --- | ---
    `` | `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
    `` | `public java.lang.Iterable<Command>` | `getCommands(ProjectContext context)` The profile Command instances
    `` | `public java.lang.Iterable<jline.console.completer.Completer>` | `getCompleters(ProjectContext context)` The profile completers
    `` | `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
    `` | `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.
    `` | `public Resource` | `getTemplate(java.lang.String path)` Obtain a template by path
    `` | `public java.lang.String` | `getVersion()` Returns: The version of the profile
    `` | `public boolean` | `handleCommand(ExecutionContext context)` Obtains a Command
    `` | `public 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