bs.plugins.karman-grails.0.12.1.source-code.KarmanUrlMappings.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of karman-grails Show documentation
Show all versions of karman-grails Show documentation
Karman is a standardized / extensible interface plugin for dealing with various cloud services including Local, S3, and Openstack.
import org.springframework.context.ApplicationContext
class KarmanUrlMappings {
static mappings = { ApplicationContext context ->
def config = context.grailsApplication.config.grails.plugin.karman
def serveLocalStorage = config.containsKey('serveLocalStorage') ? config.serveLocalStorage : true
def path = config.serveLocalMapping ?: 'storage'
if(serveLocalStorage) {
"/$path/$directory/$id**" (
controller: 'localStorage',
plugin: 'karmanGrails',
action: 'show'
)
"/$path/$id**" (
controller: 'localStorage',
plugin: 'karmanGrails',
action: 'show'
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy