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

bs.plugins.karman-grails.0.12.1.source-code.KarmanUrlMappings.groovy Maven / Gradle / Ivy

Go to download

Karman is a standardized / extensible interface plugin for dealing with various cloud services including Local, S3, and Openstack.

There is a newer version: 2.3.3
Show newest version
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