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
    Since:
    3.0
    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        The name of the profile
      • getVersion

        java.lang.String getVersion()
        Returns:
        The version of the profile
      • getDescription

        java.lang.String getDescription()
        Returns:
        The description of the profile
      • getBinaryExtensions

        java.util.Set<java.lang.String> getBinaryExtensions()
        Returns:
        The list of file extensions which should be treated as binary
      • getExecutablePatterns

        java.util.Set<java.lang.String> getExecutablePatterns()
        Returns:
        The list of file patterns which should be executable in the resulting application
      • getInstructions

        java.lang.String getInstructions()
        Returns:
        Text to display after an application has been created with the profile
      • getFeatures

        java.lang.Iterable<org.grails.cli.profile.Feature> getFeatures()
        Returns:
        The features for this profile
      • getDefaultFeatures

        java.lang.Iterable<org.grails.cli.profile.Feature> getDefaultFeatures()
        Returns:
        The default features for this profile
      • getRequiredFeatures

        java.lang.Iterable<org.grails.cli.profile.Feature> getRequiredFeatures()
        Returns:
        The required features for this profile
      • getExtends

        java.lang.Iterable<Profile> getExtends()
        The other Profile instances that this Profile extends
        Returns:
        zero or many Profile instance that this profile extends from
      • getRepositories

        java.util.List<java.lang.String> getRepositories()
        Returns:
        The maven repository definitions for this profile
      • getDependencies

        java.util.List<org.eclipse.aether.graph.Dependency> getDependencies()
        Returns:
        The dependency definitions for this profile
      • getConfiguration

        org.grails.config.NavigableMap getConfiguration()
        Returns:
        The profiles configuration
      • getProfileDir

        org.grails.io.support.Resource getProfileDir()
        Returns:
        The directory where the profile is located locally
      • getTemplate

        org.grails.io.support.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
      • getCommand

        org.grails.cli.profile.Command getCommand​(ProjectContext context,
                                                  java.lang.String name)
        Obtain a command by name
        Parameters:
        name - Obtain a command by name
        Returns:
        The command
      • getCompleters

        java.lang.Iterable<jline.console.completer.Completer> getCompleters​(ProjectContext context)
        The profile completers
        Parameters:
        context - The ProjectContext instance
        Returns:
        An Iterable of Completer instances
      • getCommands

        java.lang.Iterable<org.grails.cli.profile.Command> getCommands​(ProjectContext context)
        The profile Command instances
        Parameters:
        context - The ProjectContext instance
        Returns:
        An Iterable of Command instances
      • hasCommand

        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
      • handleCommand

        boolean handleCommand​(ExecutionContext context)
        Obtains a Command
        Returns:
        True if the command was handled
      • getBuildRepositories

        java.util.List<java.lang.String> getBuildRepositories()
        Returns:
        The buildscript maven repository definitions for this profile
      • getBuildMergeProfileNames

        java.util.List<java.lang.String> getBuildMergeProfileNames()
        Returns:
        The profile names to participate in build merge
      • getBuildPlugins

        java.util.List<java.lang.String> getBuildPlugins()
        Returns:
        The list of build plugins for this profile
      • getParentSkeletonDir

        java.lang.String getParentSkeletonDir()
        Returns:
        The subfolder the parent profile(s) skeleton should be copied into
      • getParentSkeletonDir

        java.io.File getParentSkeletonDir​(java.io.File parent)
        Returns:
        The directory the parent profile(s) skeleton should be copied into
      • getSkeletonExcludes

        java.util.List<java.lang.String> getSkeletonExcludes()
        Returns:
        A list of paths to exclude from the skeleton. Used in ant fileset exclude: