Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added licence and licence headers

  • Loading branch information...
commit 001c6e4fb82528c8608b148e14011a367f59ce16 1 parent dc8d3d6
Predrag Knezevic authored
View
2  LICENSE
@@ -1,4 +1,4 @@
-Copyright 2009 Peter Ledbrook
+Copyright 2011 Predrag Knezevic
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
15 MarshallersGrailsPlugin.groovy
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
import org.grails.plugins.marshallers.ExtendedConvertersConfigurationInitializer
import org.grails.plugins.marshallers.XmlMarshallerArtefactHandler
import org.grails.plugins.marshallers.JsonMarshallerArtefactHandler
View
1  application.properties
@@ -1,4 +1,3 @@
-#Grails Metadata file
#Fri Dec 02 15:35:52 CET 2011
app.grails.version=1.3.7
app.name=marshallers
View
24 grails-app/conf/Config.groovy
@@ -1,24 +0,0 @@
-// configuration for plugin testing - will not be included in the plugin zip
-
-log4j = {
- // Example of changing the log pattern for the default console
- // appender:
- //
- //appenders {
- // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
- //}
-
- error 'org.codehaus.groovy.grails.web.servlet', // controllers
- 'org.codehaus.groovy.grails.web.pages', // GSP
- 'org.codehaus.groovy.grails.web.sitemesh', // layouts
- 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
- 'org.codehaus.groovy.grails.web.mapping', // URL mapping
- 'org.codehaus.groovy.grails.commons', // core / classloading
- 'org.codehaus.groovy.grails.plugins', // plugins
- 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
- 'org.springframework',
- 'org.hibernate',
- 'net.sf.ehcache.hibernate'
-
- warn 'org.mortbay.log'
-}
View
32 grails-app/conf/DataSource.groovy
@@ -1,32 +0,0 @@
-dataSource {
- pooled = true
- driverClassName = "org.hsqldb.jdbcDriver"
- username = "sa"
- password = ""
-}
-hibernate {
- cache.use_second_level_cache = true
- cache.use_query_cache = true
- cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
-}
-// environment specific settings
-environments {
- development {
- dataSource {
- dbCreate = "create-drop" // one of 'create', 'create-drop','update'
- url = "jdbc:hsqldb:mem:devDB"
- }
- }
- test {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:mem:testDb"
- }
- }
- production {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:file:prodDb;shutdown=true"
- }
- }
-}
View
13 grails-app/conf/UrlMappings.groovy
@@ -1,13 +0,0 @@
-class UrlMappings {
-
- static mappings = {
- "/$controller/$action?/$id?"{
- constraints {
- // apply constraints here
- }
- }
-
- "/"(view:"/index")
- "500"(view:'/error')
- }
-}
View
19 src/groovy/org/grails/plugins/marshallers/ConfigurationBuilder.groovy
@@ -1,5 +1,18 @@
-
-
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers
@@ -117,4 +130,4 @@ class NameAwareClosureObjectMarshaller<T extends Converter> extends ClosureOject
elementName
}
-}
+}
View
28 src/groovy/org/grails/plugins/marshallers/ExtendedConvertersConfigurationInitializer.groovy
@@ -1,4 +1,18 @@
-
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers
import grails.converters.JSON;
@@ -24,9 +38,7 @@ class ExtendedConvertersConfigurationInitializer extends ConvertersConfiguration
protected def processGrailsConfigurations() {
[xml: XML, json: JSON].each { type, converterClass ->
def marshallerCfg = GrailsConfig.get("grails.plugins.marshallers.${type}")
- if (marshallerCfg != null) {
- processConfig(marshallerCfg, converterClass, type)
- }
+ processConfig(marshallerCfg, converterClass, type)
}
}
@@ -34,9 +46,11 @@ class ExtendedConvertersConfigurationInitializer extends ConvertersConfiguration
def converterCfg = ConvertersConfigurationHolder.getConverterConfiguration(converterClass)
def builder = new ConfigurationBuilder(type: type, applicationContext: applicationContext, cfg: converterCfg, log: LOG, converterClass: converterClass, cfgName: "default")
builder.registerSpringMarshallers()
- cfg.delegate = builder
- cfg.resolveStrategy = Closure.DELEGATE_FIRST;
- cfg.call()
+ if (cfg != null) {
+ cfg.delegate = builder
+ cfg.resolveStrategy = Closure.DELEGATE_FIRST;
+ cfg.call()
+ }
}
}
View
15 src/java/grails/plugins/marshallers/DefaultJsonMarshallerGrailsClass.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.AbstractInjectableGrailsClass;
View
15 src/java/grails/plugins/marshallers/DefaultXmlMarshallerGrailsClass.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.AbstractInjectableGrailsClass;
View
15 src/java/grails/plugins/marshallers/JsonMarshallerArtefactHandler.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter;
View
15 src/java/grails/plugins/marshallers/JsonMarshallerGrailsClass.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.InjectableGrailsClass;
View
15 src/java/grails/plugins/marshallers/XmlMarshallerArtefactHandler.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter;
View
15 src/java/grails/plugins/marshallers/XmlMarshallerGrailsClass.java
@@ -1,3 +1,18 @@
+/*******************************************************************************
+ * Copyright 2011 Predrag Knezevic
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
package org.grails.plugins.marshallers;
import org.codehaus.groovy.grails.commons.InjectableGrailsClass;
Please sign in to comment.
Something went wrong with that request. Please try again.