Changeset 91

Show
Ignore:
Timestamp:
26-01-11 11:13:28 (3 years ago)
Author:
work@…
Message:

- fixed serialization issues with the GdtService? in webflows
- up to 0.0.4

Location:
gdt/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gdt/trunk/GdtGrailsPlugin.groovy

    r87 r91  
    2121 
    2222class GdtGrailsPlugin { 
    23     def version                 = "0.0.3" 
     23    def version                 = "0.0.4" 
    2424    def grailsVersion   = "1.3.4 > *" 
    2525    def dependsOn               = [ajaxflow: "0.1.18 > *"] 
  • gdt/trunk/grails-app/services/nl/grails/plugins/gdt/GdtService.groovy

    r87 r91  
    2020 */ 
    2121package nl.grails.plugins.gdt 
    22 import org.springframework.beans.factory.InitializingBean 
     22import org.codehaus.groovy.grails.commons.ApplicationHolder 
    2323import cr.co.arquetipos.crypto.Blowfish 
    2424 
    25 class GdtService implements InitializingBean { 
    26         def grailsApplication 
    27         def setting 
     25class GdtService implements Serializable { 
     26    // Must be false, since the webflow can't use a transactional service. See 
     27    // http://www.grails.org/WebFlow for more information 
     28    static transactional = false 
    2829 
     30//      def grailsApplication 
     31//      def setting 
     32 
     33/* 
    2934        void afterPropertiesSet() { 
    3035                this.setting = grailsApplication.config.setting 
    3136        } 
    32  
     37*/ 
    3338        /** 
    3439         * get all domain classes that use the domain templates 
     
    3641         */ 
    3742        def getTemplateEntities() { 
     43                def grailsApplication = ApplicationHolder.application 
    3844                def entities = [] 
    3945 
     
    6369         */ 
    6470        def String encryptEntity(String entityName) { 
     71                def grailsApplication = ApplicationHolder.application 
     72 
    6573                if (grailsApplication.config.crypto) { 
    6674                        // generate a Blowfish encrypted and Base64 encoded string 
     
    7987                        return URLEncoder.encode(entityName.replaceAll(/^class /, '').bytes.encodeBase64()) 
    8088                } 
    81                 return entityName 
    8289        } 
    8390 
     
    8895         */ 
    8996        def String decryptEntity(String entity) { 
     97                def grailsApplication = ApplicationHolder.application 
    9098                def entityName 
    9199 
     
    118126         */ 
    119127        def getInstanceByEntityName(String entityName) { 
     128                def grailsApplication = ApplicationHolder.application 
    120129                def entity 
    121130