Permalink
Browse files

implementation of issue 14. http://github.com/bradleybeddoes/nimble/i…

…ssues/#issue/14.  I tried to give default names to be backwards compatible, but not 100% sure, since I am overriding the names on my system and thus can't test it completely.
  • Loading branch information...
1 parent ba7a3be commit 27bf8ffed36bc24ae41d00f15eac65c36e1b8683 @jbarmash committed Feb 16, 2010
@@ -18,12 +18,16 @@
nimble {
tablenames {
- user = "_user"
- role = "_role"
- group = "_group"
- federationprovider = "federation_provider"
- socialmediaaccount = "social_media_account"
- socialmediaservice = "social_media_service"
+ user = "_user"
+ role = "_role"
+ group = "_group"
+ federationProvider = "federation_provider"
+ profileBase = "profile_base"
+ loginRecord = "login_record"
+ details = "details"
+ permission = "permission"
+ levelPermission = "level_permission"
+ url = "url"
}
fieldnames {
@@ -16,6 +16,7 @@
*/
package grails.plugins.nimble.core
+import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
* Represents an object that we wish to store a basic set of information about
*
@@ -33,6 +34,9 @@ class Details {
static belongsTo = [FederationProvider]
+ static mapping = {
+ table ConfigurationHolder.config.nimble.tablenames.details
+ }
static constraints = {
name(nullable: true, blank: false)
displayName(nullable: true, blank: false)
@@ -16,6 +16,7 @@
*/
package grails.plugins.nimble.core
+import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
* Represents a WildcardPermission in the data repository.
* Each level of a wildcard permission (upto 6) is able to be represented by
@@ -39,6 +40,7 @@ class LevelPermission extends Permission {
static mapping = {
cache usage: 'read-write', include: 'all'
+ table ConfigurationHolder.config.nimble.tablenames.levelPermission
}
static constraints = {
@@ -16,6 +16,7 @@
*/
package grails.plugins.nimble.core
+import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
* Represents a system that a user logged into a Nimble based application from
*
@@ -32,6 +33,9 @@ class LoginRecord {
static belongsTo = [owner: UserBase]
+ static mapping = {
+ table ConfigurationHolder.config.nimble.tablenames.loginRecord
+ }
static constraints = {
remoteAddr(nullable: false, blank: false)
remoteHost(nullable: false, blank: false)
@@ -46,6 +46,7 @@ class Permission implements Serializable {
static mapping = {
cache usage: 'read-write', include: 'all'
+ table ConfigurationHolder.config.nimble.tablenames.permission
}
static constraints = {
@@ -17,6 +17,7 @@
package grails.plugins.nimble.core
import org.apache.shiro.crypto.hash.Md5Hash
+import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
* Represents generic details about users that are useful to many applications
@@ -54,6 +55,7 @@ class ProfileBase {
static mapping = {
cache usage: 'read-write', include: 'all'
+ table ConfigurationHolder.config.nimble.tablenames.profileBase
}
static constraints = {
@@ -16,6 +16,7 @@
*/
package grails.plugins.nimble.core
+import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
* Represents a web based url with extended information for display purposes.
* A Url object does not belong to any parent object as its use is general in nature,
@@ -34,6 +35,9 @@ class Url {
static belongsTo = [Details, ProfileBase]
+ static mapping = {
+ table ConfigurationHolder.config.nimble.tablenames.url
+ }
static constraints = {
name(nullable: true, blank:false)
description(nullable: true, blank:false)

0 comments on commit 27bf8ff

Please sign in to comment.