
grails.plugin.springsecurity.CommandLineHelper.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-core Show documentation
Show all versions of spring-security-core Show documentation
The Spring Security plugin simplifies the integration of Spring Security into Grails® framework applications.
The newest version!
package grails.plugin.springsecurity
import grails.dev.commands.ExecutionContext
import org.grails.build.parsing.CommandLine
trait CommandLineHelper {
static final boolean SUCCESS = true
static final boolean FAILURE = false
abstract ExecutionContext getExecutionContext()
boolean isFlagPresent(String name) {
final CommandLine commandLine = executionContext.commandLine
if (commandLine.hasOption(name)) {
return commandLine.optionValue(name) ? true : false
} else {
def value = commandLine?.undeclaredOptions?.get(name)
return value ? true : false
}
}
String flagValue(String name) {
final CommandLine commandLine = executionContext.commandLine
if (commandLine.hasOption(name)) {
return commandLine.optionValue(name)
} else {
def value = commandLine?.undeclaredOptions?.get(name)
return value
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy