All Downloads are FREE. Search and download functionalities are using the official Maven repository.

grails.dev.commands.GrailsApplicationCommand.groovy Maven / Gradle / Ivy

There is a newer version: 6.2.1
Show newest version
package grails.dev.commands

import grails.codegen.model.ModelBuilder
import grails.dev.commands.io.FileSystemInteraction
import grails.dev.commands.io.FileSystemInteractionImpl
import grails.dev.commands.template.TemplateRenderer
import grails.dev.commands.template.TemplateRendererImpl

trait GrailsApplicationCommand implements ApplicationCommand, ModelBuilder {

    @Delegate TemplateRenderer templateRenderer
    @Delegate FileSystemInteraction fileSystemInteraction
    ExecutionContext executionContext

    boolean handle(ExecutionContext executionContext) {
        this.executionContext = executionContext
        this.templateRenderer = new TemplateRendererImpl(executionContext.baseDir)
        this.fileSystemInteraction = new FileSystemInteractionImpl(executionContext.baseDir)
        handle()
    }

    List getArgs() {
        executionContext.commandLine.remainingArgs
    }

    abstract boolean handle()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy