Package org.grails.cli.profile
Interface Profile
-
public interface ProfileA 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.String>getBinaryExtensions()java.util.List<java.lang.String>getBuildMergeProfileNames()java.util.List<java.lang.String>getBuildPlugins()java.util.List<java.lang.String>getBuildRepositories()org.grails.cli.profile.CommandgetCommand(ProjectContext context, java.lang.String name)Obtain a command by namejava.lang.Iterable<org.grails.cli.profile.Command>getCommands(ProjectContext context)The profileCommandinstancesjava.lang.Iterable<jline.console.completer.Completer>getCompleters(ProjectContext context)The profile completersorg.grails.config.NavigableMapgetConfiguration()java.lang.Iterable<org.grails.cli.profile.Feature>getDefaultFeatures()java.util.List<org.eclipse.aether.graph.Dependency>getDependencies()java.lang.StringgetDescription()java.util.Set<java.lang.String>getExecutablePatterns()java.lang.Iterable<Profile>getExtends()java.lang.Iterable<org.grails.cli.profile.Feature>getFeatures()java.lang.StringgetInstructions()java.lang.StringgetName()java.lang.StringgetParentSkeletonDir()java.io.FilegetParentSkeletonDir(java.io.File parent)org.grails.io.support.ResourcegetProfileDir()java.util.List<java.lang.String>getRepositories()java.lang.Iterable<org.grails.cli.profile.Feature>getRequiredFeatures()java.util.List<java.lang.String>getSkeletonExcludes()org.grails.io.support.ResourcegetTemplate(java.lang.String path)Obtain a template by pathjava.lang.StringgetVersion()booleanhandleCommand(ExecutionContext context)Obtains aCommandbooleanhasCommand(ProjectContext context, java.lang.String name)Whether a command executes for the given context and name
-
-
-
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()
- Returns:
- zero or many
Profileinstance 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- TheProjectContextinstance- Returns:
- An
IterableofCompleterinstances
-
getCommands
java.lang.Iterable<org.grails.cli.profile.Command> getCommands(ProjectContext context)
The profileCommandinstances- Parameters:
context- TheProjectContextinstance- Returns:
- An
IterableofCommandinstances
-
hasCommand
boolean hasCommand(ProjectContext context, java.lang.String name)
Whether a command executes for the given context and name- Parameters:
context- TheProjectContextname- The command name- Returns:
- True if the command does exist
-
handleCommand
boolean handleCommand(ExecutionContext context)
Obtains aCommand- 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:
-
-