diff --git a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecorator.groovy b/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecorator.groovy deleted file mode 100644 index f6974c934fc..00000000000 --- a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecorator.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2013 SpringSource - * - * 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.async.decorator - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.async.decorator.PromiseDecorator} instead - */ -interface PromiseDecorator extends grails.async.decorator.PromiseDecorator{ -} diff --git a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorLookupStrategy.groovy b/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorLookupStrategy.groovy deleted file mode 100644 index 452ef7ffa44..00000000000 --- a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorLookupStrategy.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2013 SpringSource - * - * 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.async.decorator - -/** - * - * @author Graeme Rocher - * @deprecated Use {@link grails.async.decorator.PromiseDecoratorLookupStrategy} instead - */ -public interface PromiseDecoratorLookupStrategy extends grails.async.decorator.PromiseDecoratorLookupStrategy { - @Override - List findDecorators() -} \ No newline at end of file diff --git a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorProvider.groovy b/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorProvider.groovy deleted file mode 100644 index b1ccf217e69..00000000000 --- a/grails-async/src/main/groovy/org/grails/async/decorator/PromiseDecoratorProvider.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2013 SpringSource - * - * 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.async.decorator - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.async.decorator.PromiseDecoratorProvider} instead - */ -interface PromiseDecoratorProvider extends grails.async.decorator.PromiseDecoratorProvider{ - @Override - List getDecorators() -} diff --git a/grails-async/src/main/groovy/org/grails/async/factory/AbstractPromiseFactory.groovy b/grails-async/src/main/groovy/org/grails/async/factory/AbstractPromiseFactory.groovy deleted file mode 100644 index 23a14070440..00000000000 --- a/grails-async/src/main/groovy/org/grails/async/factory/AbstractPromiseFactory.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2013 SpringSource - * - * 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.async.factory - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.async.factory.AbstractPromiseFactory} instead - */ -abstract class AbstractPromiseFactory extends grails.async.factory.AbstractPromiseFactory{ -} diff --git a/grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy b/grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy index c20db794f98..bddb986d06f 100644 --- a/grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy +++ b/grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy @@ -87,14 +87,6 @@ class BuildSettings { */ public static final String COMPILER_SOURCE_LEVEL = "grails.project.source.level" - /** - * The dependency resolver to use - * - * @deprecated Use Gradle dependency resolution instead - */ - @Deprecated - public static final String DEPENDENCY_RESOLVER = "grails.project.dependency.resolver" - /** * The compiler source level to use */ @@ -119,46 +111,6 @@ class BuildSettings { public static final String OFFLINE_MODE= "grails.offline.mode" - /** - * The name of the system property for WAR exploded directory - * - * @deprecated Exploded WAR directory no longer supported - */ - @Deprecated - public static final String PROJECT_WAR_EXPLODED_DIR = "grails.project.war.exploded.dir" - - /** - * The name of the system property for plugin staging directory - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PLUGIN_STAGING_DIR = "grails.project.plugin.staging.dir" - - /** - * The name of the system property for plugin include source - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PLUGIN_INCLUDE_SOURCE = "grails.project.plugin.includeSource" - - /** - * The name of the system property for the project plugins directory - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PLUGINS_DIR = "grails.project.plugins.dir" - - /** - * The name of the system property for global plugins directory - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String GLOBAL_PLUGINS_DIR = "grails.global.plugins.dir" - /** * The name of the system property for {@link #}. */ @@ -169,40 +121,10 @@ class BuildSettings { */ public static final String PROJECT_SOURCE_DIR = "grails.project.source.dir" - /** - * The name of the system property for for the web.xml location - * - * @deprecated A web.xml is no longer supported - */ - @Deprecated - public static final String PROJECT_WEB_XML_FILE = "grails.project.web.xml" /** * The name of the system property for the project classes directory. Must be set if changed from build/main/classes. */ public static final String PROJECT_CLASSES_DIR = "grails.project.class.dir" - /** - * The name of the system property for the plugin classes directory - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PROJECT_PLUGIN_CLASSES_DIR = "grails.project.plugin.class.dir" - - /** - * The name of the system property for project build classes directory. - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PROJECT_PLUGIN_BUILD_CLASSES_DIR = "grails.project.plugin.build.class.dir" - - /** - * The name of the system property for plugin provided classes diretory - * - * @deprecated Source plugins no longer supported - */ - @Deprecated - public static final String PROJECT_PLUGIN_PROVIDED_CLASSES_DIR = "grails.project.plugin.provided.class.dir" /** * The name of the system property for project test classes directory. Must be set if changed from build/test/classes @@ -239,22 +161,6 @@ class BuildSettings { */ public static final String PROJECT_AUTODEPLOY_DIR = "grails.project.autodeploy.dir" - /** - * The name of the system property for multiple build listeners - * - * @deprecated Build listeners no longer supported. Use gradle instead. - */ - @Deprecated - public static final String BUILD_LISTENERS = "grails.build.listeners" - - /** - * The name of the system property for enabling verbose compilation verbose compile - * - * @deprecated Use Gradle configuration instead - */ - @Deprecated - public static final String VERBOSE_COMPILE = "grails.project.compile.verbose" - /** * A system property with this name is populated in the preparation phase of functional testing * with the base URL that tests should be run against. diff --git a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsResourceUtils.groovy b/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsResourceUtils.groovy deleted file mode 100644 index fec4b04260c..00000000000 --- a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsResourceUtils.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.io.support - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.io.support.GrailsResourceUtils} instead - */ -@Deprecated -class GrailsResourceUtils extends org.grails.io.support.GrailsResourceUtils{ -} diff --git a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/Resource.groovy b/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/Resource.groovy deleted file mode 100644 index 7dd11a8db00..00000000000 --- a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/Resource.groovy +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.io.support - -/** - * @deprecated Use {@link org.grails.io.support.Resource} instead - * @author Graeme Rocher - */ -@Deprecated -public interface Resource extends org.grails.io.support.Resource{ - -} \ No newline at end of file diff --git a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginInfo.groovy b/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginInfo.groovy deleted file mode 100644 index a9d750716aa..00000000000 --- a/grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginInfo.groovy +++ /dev/null @@ -1,10 +0,0 @@ - -package org.codehaus.groovy.grails.plugins - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.plugins.GrailsPluginInfo} instead - */ -@Deprecated -public interface GrailsPluginInfo extends grails.plugins.GrailsPluginInfo { -} \ No newline at end of file diff --git a/grails-bootstrap/src/test/groovy/org/codehaus/groovy/grails/cli/parsing/CommandLineParserSpec.groovy b/grails-bootstrap/src/test/groovy/org/grails/build/parsing/CommandLineParserSpec.groovy similarity index 99% rename from grails-bootstrap/src/test/groovy/org/codehaus/groovy/grails/cli/parsing/CommandLineParserSpec.groovy rename to grails-bootstrap/src/test/groovy/org/grails/build/parsing/CommandLineParserSpec.groovy index 41f9c8dfbaa..00da1daf306 100644 --- a/grails-bootstrap/src/test/groovy/org/codehaus/groovy/grails/cli/parsing/CommandLineParserSpec.groovy +++ b/grails-bootstrap/src/test/groovy/org/grails/build/parsing/CommandLineParserSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.cli.parsing +package org.grails.build.parsing import grails.util.Environment import org.grails.build.parsing.CommandLineParser diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/beans/factory/GenericBeanFactoryAccessor.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/beans/factory/GenericBeanFactoryAccessor.groovy deleted file mode 100644 index c60169190ad..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/beans/factory/GenericBeanFactoryAccessor.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2002-2008 the original author or authors. - * - * 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.codehaus.groovy.grails.beans.factory - -import groovy.transform.CompileStatic -import org.springframework.beans.factory.ListableBeanFactory - -/** - * A fork of the Spring 2.5.6 GenericBeanFactoryAccess class that was removed from Spring 3.0. - * - * @author Rob Harrop - * @author Juergen Hoeller - * @since 2.0 - * @deprecated Will be removed in a future version of Grails - * - */ -@Deprecated -@CompileStatic -class GenericBeanFactoryAccessor extends org.grails.spring.beans.factory.GenericBeanFactoryAccessor{ - /** - * Constructs a GenericBeanFactoryAccessor that wraps the supplied {@link ListableBeanFactory}. - */ - GenericBeanFactoryAccessor(ListableBeanFactory beanFactory) { - super(beanFactory) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractGrailsClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractGrailsClass.groovy deleted file mode 100644 index c2b52d1dbca..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractGrailsClass.groovy +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.groovy.grails.commons - -import groovy.transform.InheritConstructors - -/** - * @deprecated Use {@link org.grails.core.AbstractGrailsClass} instead - */ -@InheritConstructors -@Deprecated -abstract class AbstractGrailsClass extends org.grails.core.AbstractGrailsClass { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractInjectableGrailsClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractInjectableGrailsClass.groovy deleted file mode 100644 index 5557dbc183d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AbstractInjectableGrailsClass.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.AbstractInjectableGrailsClass} instead - */ -@Deprecated -class AbstractInjectableGrailsClass extends org.grails.core.AbstractInjectableGrailsClass { - AbstractInjectableGrailsClass(Class clazz, String trailingName) { - super(clazz, trailingName) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AnnotationDomainClassArtefactHandler.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AnnotationDomainClassArtefactHandler.groovy deleted file mode 100644 index 356474d4998..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/AnnotationDomainClassArtefactHandler.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.artefact.AnnotationDomainClassArtefactHandler} instead - */ -@Deprecated -class AnnotationDomainClassArtefactHandler extends org.grails.core.artefact.AnnotationDomainClassArtefactHandler{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandlerAdapter.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandlerAdapter.groovy deleted file mode 100644 index 3b2187d4514..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandlerAdapter.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic -import groovy.transform.InheritConstructors - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.ArtefactHandlerAdapter} instead - */ -@Deprecated -@CompileStatic -@InheritConstructors -abstract class ArtefactHandlerAdapter extends grails.core.ArtefactHandlerAdapter{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/BootstrapArtefactHandler.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/BootstrapArtefactHandler.groovy deleted file mode 100644 index 6aae9245ab6..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/BootstrapArtefactHandler.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @deprecated Use {@link org.grails.web.servlet.boostrap.BootstrapArtefactHandler} instead - * @since 0.3 - * @author Marc Palmer - */ -@Deprecated -class BootstrapArtefactHandler extends org.grails.web.servlet.boostrap.BootstrapArtefactHandler{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ClassPropertyFetcher.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ClassPropertyFetcher.groovy deleted file mode 100644 index 465a6328d25..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ClassPropertyFetcher.groovy +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.util.ClassPropertyFetcher} instead - */ -@CompileStatic -@Deprecated -class ClassPropertyFetcher extends org.grails.core.util.ClassPropertyFetcher { - ClassPropertyFetcher(Class clazz, org.grails.core.util.ClassPropertyFetcher.ReferenceInstanceCallback callback) { - super(clazz, callback) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ControllerArtefactHandler.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ControllerArtefactHandler.groovy deleted file mode 100644 index 4028ccbf097..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ControllerArtefactHandler.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.artefact.ControllerArtefactHandler} instead - */ -@Deprecated -class ControllerArtefactHandler extends org.grails.core.artefact.ControllerArtefactHandler { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.groovy deleted file mode 100644 index 3b792561fbd..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.groovy +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.commons - -import groovy.transform.InheritConstructors - -/** - * @deprecated Use {@link grails.core.DefaultGrailsApplication instead} - */ -@InheritConstructors -class DefaultGrailsApplication extends grails.core.DefaultGrailsApplication { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsBootstrapClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsBootstrapClass.groovy deleted file mode 100644 index befd0fff2ea..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsBootstrapClass.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @deprecated Use {@link org.grails.web.servlet.boostrap.DefaultGrailsBootstrapClass} instead - * @since 1.0 - * @author Graeme Rocher - */ -@Deprecated -class DefaultGrailsBootstrapClass extends org.grails.web.servlet.boostrap.DefaultGrailsBootstrapClass{ - DefaultGrailsBootstrapClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClass.groovy deleted file mode 100644 index a61a331a6ad..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClass.groovy +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -/** - * Evaluates the conventions contained within controllers to perform auto-configuration. - * - * @author Graeme Rocher - * @author Steven Devijver - * @since 0.1 - * @deprecated Use {@link org.grails.core.DefaultGrailsControllerClass} instead - */ -@Deprecated -@CompileStatic -class DefaultGrailsControllerClass extends org.grails.core.DefaultGrailsControllerClass { - - DefaultGrailsControllerClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.groovy deleted file mode 100644 index 2c4f19e7341..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.DefaultGrailsDomainClass} instead - */ -@CompileStatic -class DefaultGrailsDomainClass extends org.grails.core.DefaultGrailsDomainClass { - DefaultGrailsDomainClass(Class clazz, Map defaultConstraints) { - super(clazz, defaultConstraints) - } - - DefaultGrailsDomainClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassProperty.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassProperty.groovy deleted file mode 100644 index e35ca821261..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassProperty.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -import java.beans.PropertyDescriptor - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.DefaultGrailsDomainClassProperty} instead - */ -@Deprecated -@CompileStatic -class DefaultGrailsDomainClassProperty extends org.grails.core.DefaultGrailsDomainClassProperty { - - DefaultGrailsDomainClassProperty(grails.core.GrailsDomainClass domainClass, PropertyDescriptor descriptor) { - super(domainClass, descriptor) - } - - DefaultGrailsDomainClassProperty(grails.core.GrailsDomainClass domainClass, PropertyDescriptor descriptor, Map defaultConstraints) { - super(domainClass, descriptor, defaultConstraints) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsServiceClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsServiceClass.groovy deleted file mode 100644 index ce0921314e2..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsServiceClass.groovy +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.DefaultGrailsServiceClass} instead - */ -@Deprecated -@CompileStatic -class DefaultGrailsServiceClass extends org.grails.core.DefaultGrailsServiceClass { - DefaultGrailsServiceClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsTagLibClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsTagLibClass.groovy deleted file mode 100644 index 9282d16c15c..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsTagLibClass.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.DefaultGrailsTagLibClass} instead - */ -class DefaultGrailsTagLibClass extends org.grails.core.DefaultGrailsTagLibClass { - - DefaultGrailsTagLibClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsUrlMappingsClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsUrlMappingsClass.groovy deleted file mode 100644 index 8f7c83a5b62..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsUrlMappingsClass.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import groovy.transform.CompileStatic - -/** - * @deprecated Use {@link org.grails.core.DefaultGrailsUrlMappingsClass} instead - */ -@Deprecated -@CompileStatic -class DefaultGrailsUrlMappingsClass extends org.grails.core.DefaultGrailsUrlMappingsClass { - DefaultGrailsUrlMappingsClass(Class clazz) { - super(clazz) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ExternalGrailsDomainClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ExternalGrailsDomainClass.groovy deleted file mode 100644 index 53549c14a85..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/ExternalGrailsDomainClass.groovy +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Will be removed in a future version of Grails - */ -@Deprecated -public interface ExternalGrailsDomainClass extends GrailsDomainClass { - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtils.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtils.java deleted file mode 100644 index 087cc929e90..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtils.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * - * 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.codehaus.groovy.grails.commons; - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.util.GrailsArrayUtils} instead - */ -@Deprecated -public class GrailsArrayUtils extends grails.util.GrailsArrayUtils { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsBootstrapClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsBootstrapClass.groovy deleted file mode 100644 index 3b26ad48c1d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsBootstrapClass.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * Loaded and executed on application load. - * - * @author Graeme Rocher - * @since 1.0 - * @deprecated Use {@link grails.web.servlet.bootstrap.GrailsBootstrapClass} instead - */ -public interface GrailsBootstrapClass extends grails.web.servlet.bootstrap.GrailsBootstrapClass{ -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtils.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtils.java deleted file mode 100644 index 82fac5110e2..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtils.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * - * 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.codehaus.groovy.grails.commons; - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.util.GrailsStringUtils} instead - */ -@Deprecated -public class GrailsStringUtils extends grails.util.GrailsStringUtils { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/InjectableGrailsClass.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/InjectableGrailsClass.groovy deleted file mode 100644 index 24076ca0ab5..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/InjectableGrailsClass.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.InjectableGrailsClass} instead - */ -@Deprecated -public interface InjectableGrailsClass extends grails.core.InjectableGrailsClass { - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsConfig.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsConfig.groovy deleted file mode 100644 index 5b70498fe3d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsConfig.groovy +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.groovy.grails.commons.cfg - -import grails.core.GrailsApplication -import groovy.transform.CompileStatic -import org.grails.core.cfg.DeprecatedGrailsConfig - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.config.CodeGenConfig} instead - */ -@CompileStatic -@Deprecated -class GrailsConfig extends DeprecatedGrailsConfig{ - GrailsConfig(GrailsApplication grailsApplication) { - super(grailsApplication) - } - -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/MetaClassEnhancer.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/MetaClassEnhancer.java deleted file mode 100644 index 84f6c6166fc..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/MetaClassEnhancer.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.commons.metaclass; - -/** - * @author Graeme Rocher - * - * @deprecated Use {@link org.grails.core.metaclass.MetaClassEnhancer} instead - */ -@Deprecated -public class MetaClassEnhancer extends org.grails.core.metaclass.MetaClassEnhancer { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/DefaultRuntimeSpringConfiguration.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/DefaultRuntimeSpringConfiguration.groovy deleted file mode 100644 index 0eb821c960d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/DefaultRuntimeSpringConfiguration.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons.spring - -import groovy.transform.CompileStatic -import org.springframework.context.ApplicationContext - -/** - * @deprecated Use {@link org.grails.spring.DefaultRuntimeSpringConfiguration} instead - */ -@Deprecated -@CompileStatic -class DefaultRuntimeSpringConfiguration extends org.grails.spring.DefaultRuntimeSpringConfiguration implements RuntimeSpringConfiguration { - - DefaultRuntimeSpringConfiguration() { - } - - DefaultRuntimeSpringConfiguration(ApplicationContext parent) { - super(parent) - } - - DefaultRuntimeSpringConfiguration(ApplicationContext parent, ClassLoader cl) { - super(parent, cl) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsApplicationContext.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsApplicationContext.java deleted file mode 100644 index cfdd60cf2c3..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsApplicationContext.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.commons.spring; - -import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.context.ApplicationContext; - -/** - * An ApplicationContext that extends StaticApplicationContext and implements GroovyObject such that - * beans can be retrieved with the dot de-reference syntax instead of using getBean('name'). - * - * @author Graeme Rocher - * @since 1.0 - * @deprecated Use {@link org.grails.spring.GrailsApplicationContext} - */ -@Deprecated -public class GrailsApplicationContext extends org.grails.spring.GrailsApplicationContext { - - public GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory) { - super(defaultListableBeanFactory); - } - - public GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, ApplicationContext applicationContext) { - super(defaultListableBeanFactory, applicationContext); - } - - public GrailsApplicationContext(org.springframework.context.ApplicationContext parent) throws org.springframework.beans.BeansException { - super(parent); - } - - public GrailsApplicationContext() throws org.springframework.beans.BeansException { - super(); - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext.groovy deleted file mode 100644 index cb8b0e104ca..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext.groovy +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons.spring - -import groovy.transform.CompileStatic -import grails.core.GrailsApplication -import org.springframework.beans.BeansException -import org.springframework.beans.factory.support.DefaultListableBeanFactory -import org.springframework.context.ApplicationContext - -/** - * A WebApplicationContext that extends StaticApplicationContext to allow for programmatic - * configuration at runtime. The code is adapted from StaticWebApplicationContext. - * - * @author Graeme - * @since 0.3 - * @deprecated Use {@link grails.web.servlet.context.GrailsWebApplicationContext} instead - */ -@CompileStatic -class GrailsWebApplicationContext extends grails.web.servlet.context.GrailsWebApplicationContext{ - - GrailsWebApplicationContext() throws BeansException { - } - - GrailsWebApplicationContext(GrailsApplication grailsApplication) { - super(grailsApplication) - } - - GrailsWebApplicationContext(ApplicationContext parent) throws BeansException { - super(parent) - } - - GrailsWebApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, GrailsApplication grailsApplication) { - super(defaultListableBeanFactory, grailsApplication) - } - - GrailsWebApplicationContext(ApplicationContext parent, GrailsApplication grailsApplication) throws BeansException { - super(parent, grailsApplication) - } - - GrailsWebApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory) { - super(defaultListableBeanFactory) - } - - GrailsWebApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, ApplicationContext parent) { - super(defaultListableBeanFactory, parent) - } - - GrailsWebApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, ApplicationContext parent, GrailsApplication grailsApplication) { - super(defaultListableBeanFactory, parent, grailsApplication) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/RuntimeSpringConfiguration.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/RuntimeSpringConfiguration.groovy deleted file mode 100644 index e64deb0b64a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/commons/spring/RuntimeSpringConfiguration.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons.spring - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.spring.RuntimeSpringConfiguration} instead - */ -@Deprecated -public interface RuntimeSpringConfiguration extends org.grails.spring.RuntimeSpringConfiguration { -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractArtefactTypeAstTransformation.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractArtefactTypeAstTransformation.groovy deleted file mode 100644 index 2321321afde..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractArtefactTypeAstTransformation.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Base implementation for the artefact type transformation. - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Use {@link org.grails.compiler.injection.AbstractArtefactTypeAstTransformation} instead - */ -@Deprecated -abstract class AbstractArtefactTypeAstTransformation extends org.grails.compiler.injection.AbstractArtefactTypeAstTransformation{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AllArtefactClassInjector.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AllArtefactClassInjector.groovy deleted file mode 100644 index 9b94fcda90d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AllArtefactClassInjector.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Extended marker interface that indicates this ClassInjector applies to all types of artefacts. - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Use {@link grails.compiler.ast.AllArtefactClassInjector} instead - */ -@Deprecated -public interface AllArtefactClassInjector extends grails.compiler.ast.AllArtefactClassInjector{ -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AnnotatedClassInjector.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AnnotatedClassInjector.groovy deleted file mode 100644 index f724c985f18..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AnnotatedClassInjector.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Injector applied to annotated (local transform) entities - * - * @author Graeme Rocher - * @since 2.2.3 - * @deprecated Use {@link grails.compiler.ast.AnnotatedClassInjector} instead - */ -@Deprecated -public interface AnnotatedClassInjector extends grails.compiler.ast.AnnotatedClassInjector{ - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ClassInjector.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ClassInjector.groovy deleted file mode 100644 index dd64a75002d..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ClassInjector.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * When implemented allows additional properties to be injected into Grails - * classes at compile time (ie when they are loaded by the GroovyClassLoader). - * - * @author Graeme Rocher - * - * @since 0.2 - * @deprecated Use {@link grails.compiler.ast.ClassInjector} instead - */ -public interface ClassInjector extends grails.compiler.ast.ClassInjector{ - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/DefaultGrailsDomainClassInjector.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/DefaultGrailsDomainClassInjector.groovy deleted file mode 100644 index 6b4e63b06e2..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/DefaultGrailsDomainClassInjector.groovy +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.groovy.grails.compiler.injection - -import grails.compiler.ast.AstTransformer - -/** - * Default implementation of domain class injector interface that adds the 'id' - * and 'version' properties and other previously boilerplate code. - * - * @author Graeme Rocher - * @since 0.2 - */ -@AstTransformer -@Deprecated -class DefaultGrailsDomainClassInjector extends org.grails.compiler.injection.DefaultGrailsDomainClassInjector implements GrailsDomainClassInjector{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/EntityASTTransformation.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/EntityASTTransformation.groovy deleted file mode 100644 index 7311198a4c9..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/EntityASTTransformation.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.compiler.injection - -import org.codehaus.groovy.control.CompilePhase -import org.codehaus.groovy.transform.GroovyASTTransformation - -/** - * Injects the necessary fields and behaviors into a domain class in order to make it a property GORM entity. - * - * @author Graeme Rocher - * @since 1.1 - * @deprecated Use {@link org.grails.compiler.injection.EntityASTTransformation} instead - */ -@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) -@Deprecated -class EntityASTTransformation extends org.grails.compiler.injection.EntityASTTransformation{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareClassLoader.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareClassLoader.groovy deleted file mode 100644 index 72b6c22187e..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareClassLoader.groovy +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2006-2007 Graeme Rocher - * - * 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.codehaus.groovy.grails.compiler.injection - -import groovy.transform.CompileStatic -import org.codehaus.groovy.control.CompilerConfiguration - -/** - * A class loader that is aware of Groovy sources and injection operations. - * - * @author Graeme Rocher - * @since 0.6 - * @deprecated Use {@link org.grails.compiler.injection.GrailsAwareClassLoader} instead - */ -@CompileStatic -@Deprecated -class GrailsAwareClassLoader extends org.grails.compiler.injection.GrailsAwareClassLoader{ - - GrailsAwareClassLoader() { - } - - GrailsAwareClassLoader(ClassLoader loader) { - super(loader) - } - - GrailsAwareClassLoader(GroovyClassLoader parent) { - super(parent) - } - - GrailsAwareClassLoader(ClassLoader parent, CompilerConfiguration config, boolean useConfigurationClasspath) { - super(parent, config, useConfigurationClasspath) - } - - GrailsAwareClassLoader(ClassLoader loader, CompilerConfiguration config) { - super(loader, config) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareInjectionOperation.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareInjectionOperation.groovy deleted file mode 100644 index 462c3e7ca8b..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsAwareInjectionOperation.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2006-2007 Graeme Rocher - * - * 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.codehaus.groovy.grails.compiler.injection - -import groovy.transform.CompileStatic - -/** - * A Groovy compiler injection operation that uses a specified array of - * ClassInjector instances to attempt AST injection. - * - * @author Graeme Rocher - * @since 0.6 - * @deprecated Use {@link org.grails.compiler.injection.GrailsAwareInjectionOperation} instead - */ -@CompileStatic -@Deprecated -class GrailsAwareInjectionOperation extends org.grails.compiler.injection.GrailsAwareInjectionOperation{ - - GrailsAwareInjectionOperation() { - } - - GrailsAwareInjectionOperation(grails.compiler.ast.ClassInjector[] classInjectors) { - super(classInjectors) - } - - GrailsAwareInjectionOperation(GroovyResourceLoader resourceLoader, grails.compiler.ast.ClassInjector[] classInjectors) { - super(resourceLoader, classInjectors) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/core/io/DefaultResourceLocator.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/core/io/DefaultResourceLocator.groovy deleted file mode 100644 index 9982f0b5066..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/core/io/DefaultResourceLocator.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.core.io - -/** - * @deprecated Use {@link org.grails.core.io.DefaultResourceLocator} instead - */ -@Deprecated -class DefaultResourceLocator extends org.grails.core.io.DefaultResourceLocator { - - DefaultResourceLocator() { - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/domain/GrailsDomainClassCleaner.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/domain/GrailsDomainClassCleaner.groovy deleted file mode 100644 index cf5503a625a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/domain/GrailsDomainClassCleaner.groovy +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.groovy.grails.domain - -import grails.core.GrailsApplication - -/** - * @deprecated Use {@link org.grails.plugins.domain.support.GrailsDomainClassCleaner} instead - * @author Graeme Rocher - */ -@Deprecated -class GrailsDomainClassCleaner extends org.grails.plugins.domain.support.GrailsDomainClassCleaner { - - GrailsDomainClassCleaner(GrailsApplication grailsApplication) { - super(grailsApplication) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsConfigurationException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsConfigurationException.groovy deleted file mode 100644 index 00b55c39de0..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsConfigurationException.groovy +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.exceptions - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.exceptions.GrailsConfigurationException} instead - */ -@Deprecated -@CompileStatic -class GrailsConfigurationException extends org.grails.core.exceptions.GrailsConfigurationException{ - GrailsConfigurationException() { - } - - GrailsConfigurationException(String message) { - super(message) - } - - GrailsConfigurationException(String message, Throwable cause) { - super(message, cause) - } - - GrailsConfigurationException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsDomainException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsDomainException.groovy deleted file mode 100644 index 2226525b8b7..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsDomainException.groovy +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.groovy.grails.exceptions - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.exceptions.GrailsDomainException} instead - */ -@Deprecated -@CompileStatic -class GrailsDomainException extends org.grails.core.exceptions.GrailsDomainException{ - - GrailsDomainException() { - } - - GrailsDomainException(String message, Throwable cause) { - super(message, cause) - } - - GrailsDomainException(String message) { - super(message) - } - - GrailsDomainException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsException.groovy deleted file mode 100644 index 9865919389f..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsException.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.exceptions - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.exceptions.GrailsException} instead - */ -@CompileStatic -@Deprecated -class GrailsException extends org.grails.core.exceptions.GrailsException{ - - GrailsException() { - } - - GrailsException(String message) { - super(message) - } - - GrailsException(String message, Throwable cause) { - super(message, cause) - } - - GrailsException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsRuntimeException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsRuntimeException.groovy deleted file mode 100644 index 525f3e24bd7..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/exceptions/GrailsRuntimeException.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.exceptions - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.exceptions.GrailsRuntimeException} instead - */ -@Deprecated -@CompileStatic -class GrailsRuntimeException extends org.grails.core.exceptions.GrailsRuntimeException{ - - GrailsRuntimeException(String message) { - super(message) - } - - GrailsRuntimeException(String message, Throwable cause) { - super(message, cause) - } - - GrailsRuntimeException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsIOUtils.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsIOUtils.groovy deleted file mode 100644 index 445eace474f..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsIOUtils.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.io.support - -/** - * @deprecated Use {@link grails.io.IOUtils} instead - * @author Graeme Rocher - */ -@Deprecated -class GrailsIOUtils extends grails.io.IOUtils{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.groovy index 466e9d4cbe8..4a6dce6c862 100644 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.groovy +++ b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.groovy @@ -3,7 +3,8 @@ package org.codehaus.groovy.grails.io.support import org.grails.io.support.SpringIOUtils /** - * Created by graemerocher on 09/07/14. + * @deprecated use org.grails.io.support.SpringIOUtils instead */ +@Deprecated class IOUtils extends SpringIOUtils { } diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/lifecycle/ShutdownOperations.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/lifecycle/ShutdownOperations.groovy deleted file mode 100644 index 7b78ed578d7..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/lifecycle/ShutdownOperations.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.lifecycle - -/** - * Operations that should be executed on shutdown. - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Use {@link org.grails.core.lifecycle.ShutdownOperations} instead - */ -@Deprecated -class ShutdownOperations extends org.grails.core.lifecycle.ShutdownOperations { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/orm/support/TransactionManagerAware.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/orm/support/TransactionManagerAware.groovy deleted file mode 100644 index 78d9772ee96..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/orm/support/TransactionManagerAware.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2006 Graeme Rocher - * - * 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.codehaus.groovy.grails.orm.support - -/** - * @author Graeme Rocher - * @since 0.4 - * @deprecated Use {@link grails.transaction.TransactionManagerAware} instead - */ -@Deprecated -public interface TransactionManagerAware extends grails.transaction.TransactionManagerAware { - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/AbstractGrailsPluginManager.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/AbstractGrailsPluginManager.groovy deleted file mode 100644 index a10aedb72ae..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/AbstractGrailsPluginManager.groovy +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.plugins - -import grails.core.GrailsApplication -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.plugins.AbstractGrailsPluginManager instead} - */ -@CompileStatic -@Deprecated -abstract class AbstractGrailsPluginManager extends org.grails.plugins.AbstractGrailsPluginManager { - AbstractGrailsPluginManager(GrailsApplication application) { - super(application) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.groovy deleted file mode 100644 index 9b76796fcf0..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.plugins - -import groovy.transform.CompileStatic -import groovy.transform.InheritConstructors - - -/** - * @deprecated Use {@link grails.plugins.DefaultGrailsPluginManager} instead - */ -@Deprecated -@CompileStatic -@InheritConstructors -class DefaultGrailsPluginManager extends grails.plugins.DefaultGrailsPluginManager { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DomainClassPluginSupport.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DomainClassPluginSupport.groovy deleted file mode 100644 index 93d2ce39ed9..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/DomainClassPluginSupport.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.plugins - -/** - * @deprecated Use {@link org.grails.plugins.domain.DomainClassPluginSupport} instead - * @author Graeme Rocher - */ -@Deprecated -class DomainClassPluginSupport extends org.grails.plugins.domain.DomainClassPluginSupport { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsVersionUtils.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsVersionUtils.groovy deleted file mode 100644 index 78a8fea1230..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsVersionUtils.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.plugins - -/** - * @deprecated Use {@link grails.plugins.GrailsVersionUtils} instead - * @author Graeme Rocher - */ -@Deprecated -class GrailsVersionUtils extends grails.plugins.GrailsVersionUtils { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/ClassLoaderAware.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/ClassLoaderAware.groovy deleted file mode 100644 index 9e2de8865b5..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/ClassLoaderAware.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.plugins.support.aware - -/** - * @deprecated Use {@link grails.core.support.ClassLoaderAware} instead - */ -@Deprecated -public interface ClassLoaderAware extends grails.core.support.ClassLoaderAware{ -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsConfigurationAware.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsConfigurationAware.groovy deleted file mode 100644 index 0f87efb4a46..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsConfigurationAware.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.plugins.support.aware - -/** - * @deprecated Use {@link grails.core.support.GrailsConfigurationAware} instead - */ -@Deprecated -public interface GrailsConfigurationAware extends grails.core.support.GrailsConfigurationAware{ -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/ClassEditor.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/ClassEditor.groovy deleted file mode 100644 index c34a57a99ec..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/ClassEditor.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.support - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.support.ClassEditor} instead - */ -@Deprecated -class ClassEditor extends org.grails.core.support.ClassEditor { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/GrailsApplicationDiscoveryStrategy.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/GrailsApplicationDiscoveryStrategy.java deleted file mode 100644 index a10e5fc346b..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/GrailsApplicationDiscoveryStrategy.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * - * 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.codehaus.groovy.grails.support; - -/** - * @deprecated Use {@link org.grails.core.support.GrailsApplicationDiscoveryStrategy} instead - */ -@Deprecated -public interface GrailsApplicationDiscoveryStrategy extends org.grails.core.support.GrailsApplicationDiscoveryStrategy { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/IncludeExcludeSupport.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/IncludeExcludeSupport.java deleted file mode 100644 index 3241cebf90a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/IncludeExcludeSupport.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * - * 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.codehaus.groovy.grails.support; - -import java.util.List; - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.util.IncludeExcludeSupport} instead - */ -@Deprecated -public class IncludeExcludeSupport extends org.grails.core.util.IncludeExcludeSupport { - - public IncludeExcludeSupport(List defaultIncludes, List defaultExcludes) { - super(defaultIncludes, defaultExcludes); - } - - public IncludeExcludeSupport(List defaultIncludes) { - super(defaultIncludes); - } - - public IncludeExcludeSupport() { - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptor.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptor.groovy deleted file mode 100644 index 6b4d64efb1a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptor.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014 Graeme Rocher - * - * 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.codehaus.groovy.grails.support - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.persistence.support.PersistenceContextInterceptor} instead - */ -@Deprecated -public interface PersistenceContextInterceptor extends grails.persistence.support.PersistenceContextInterceptor{ - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptorExecutor.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptorExecutor.java deleted file mode 100644 index b3918f94e9a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/PersistenceContextInterceptorExecutor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2013 SpringSource - * - * 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.codehaus.groovy.grails.support; - -import grails.persistence.support.PersistenceContextInterceptor; - -import java.util.Collection; - -/** - * @deprecated Use {@link grails.persistence.support.PersistenceContextInterceptorExecutor} instead - */ -@Deprecated -public class PersistenceContextInterceptorExecutor extends grails.persistence.support.PersistenceContextInterceptorExecutor { - public PersistenceContextInterceptorExecutor(Collection persistenceContextInterceptors) { - super(persistenceContextInterceptors); - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/SoftThreadLocalMap.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/SoftThreadLocalMap.groovy deleted file mode 100644 index 27d2977b268..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/SoftThreadLocalMap.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.support - -/** - * @deprecated Use {@link org.grails.core.util.SoftThreadLocalMap} instead - */ -@Deprecated -class SoftThreadLocalMap extends org.grails.core.util.SoftThreadLocalMap{ - -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/EntityProxyHandler.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/EntityProxyHandler.groovy deleted file mode 100644 index 45eec1eeb34..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/EntityProxyHandler.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2010 the original author or authors. - * - * 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.codehaus.groovy.grails.support.proxy - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.support.proxy.EntityProxyHandler} instead - */ -@Deprecated -public interface EntityProxyHandler extends ProxyHandler, grails.core.support.proxy.EntityProxyHandler { - -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/ProxyHandler.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/ProxyHandler.groovy deleted file mode 100644 index b3a4ac4e164..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/support/proxy/ProxyHandler.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2008 the original author or authors. - * - * 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.codehaus.groovy.grails.support.proxy - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.support.proxy.ProxyHandler} instead - */ -@Deprecated -interface ProxyHandler extends grails.core.support.proxy.ProxyHandler{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/AbstractVetoingConstraint.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/AbstractVetoingConstraint.groovy deleted file mode 100644 index 6754bbcda33..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/AbstractVetoingConstraint.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2009 the original author or authors. - * - * 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.codehaus.groovy.grails.validation - - -/** - * TODO: write javadoc - * - * @author Sergey Nebolsin () - * @deprecated Use {@link grails.validation.AbstractVetoingConstraint} - */ -@Deprecated -public abstract class AbstractVetoingConstraint extends grails.validation.AbstractVetoingConstraint { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/DefaultConstraintEvaluator.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/DefaultConstraintEvaluator.groovy deleted file mode 100644 index cdab96b9ca4..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/DefaultConstraintEvaluator.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2011 SpringSource - * - * 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.codehaus.groovy.grails.validation - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.validation.DefaultConstraintEvaluator} instead - */ -@CompileStatic -@Deprecated -class DefaultConstraintEvaluator extends org.grails.validation.DefaultConstraintEvaluator { - - DefaultConstraintEvaluator(Map defaultConstraints) { - super(defaultConstraints) - } - - DefaultConstraintEvaluator() { - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/GrailsDomainClassValidator.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/GrailsDomainClassValidator.groovy deleted file mode 100644 index fb25bbe7e05..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/GrailsDomainClassValidator.groovy +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.groovy.grails.validation - -import groovy.transform.InheritConstructors - -/** - * @author Graeme Rocher - * @deprecated Used {@link org.grails.validation.GrailsDomainClassValidator} instead - */ -@InheritConstructors -@Deprecated -class GrailsDomainClassValidator extends org.grails.validation.GrailsDomainClassValidator { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/VetoingConstraint.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/VetoingConstraint.groovy deleted file mode 100644 index f5ef9b100c8..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/VetoingConstraint.groovy +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.validation - - -/** - * Marker interface for vetoing constraint. - *

- * Vetoing constraints are those which might return 'true' from validateWithVetoing method to prevent any additional - * validation of the property. These constraints are proceeded before any other constraints, and validation continues - * only if no one of vetoing constraint hadn't vetoed. - * - * @author Sergey Nebolsin () - * @deprecated Use {@link grails.validation.VetoingConstraint} - */ -@Deprecated -public interface VetoingConstraint extends grails.validation.VetoingConstraint { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/exceptions/ConstraintException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/exceptions/ConstraintException.groovy deleted file mode 100644 index 75ffef4dffe..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/validation/exceptions/ConstraintException.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.validation.exceptions - - -/** - * Thrown when an error occurs applying a constraint to a property. - * - * @author Graeme Rocher - * @deprecated Use {@link grails.validation.exceptions.ConstraintException} - */ -@Deprecated -public class ConstraintException extends grails.validation.exceptions.ConstraintException { - - public ConstraintException() { - super() - } - - public ConstraintException(String message, Throwable cause) { - super(message, cause) - } - - public ConstraintException(String message) { - super(message) - } - - public ConstraintException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/DataBindingUtils.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/DataBindingUtils.java deleted file mode 100644 index dea05388898..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/DataBindingUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2006-2007 Graeme Rocher - * - * 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.codehaus.groovy.grails.web.binding; - -/** - * Utility methods to perform data binding from Grails objects. - * - * @author Graeme Rocher - * @since 1.0 - * @deprecated Use {@link grails.web.databinding.DataBindingUtils} - */ -@Deprecated -public class DataBindingUtils extends grails.web.databinding.DataBindingUtils { - -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsWebDataBinder.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsWebDataBinder.groovy deleted file mode 100644 index c29c2348cfc..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsWebDataBinder.groovy +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.codehaus.groovy.grails.web.binding - -import groovy.transform.CompileStatic - -import grails.core.GrailsApplication - -/** - * - * @deprecated Use {@link grails.web.databinding.GrailsWebDataBinder} - */ -@CompileStatic -@Deprecated -class GrailsWebDataBinder extends grails.web.databinding.GrailsWebDataBinder { - - GrailsWebDataBinder(GrailsApplication grailsApplication) { - super(grailsApplication) - } -} - - diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/GrailsConfigUtils.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/GrailsConfigUtils.groovy deleted file mode 100644 index 5488f728761..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/GrailsConfigUtils.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.context - -/** - * @deprecated Use {@link org.grails.web.servlet.context.GrailsConfigUtils} instead - * @author Graeme Rocher - */ -@Deprecated -class GrailsConfigUtils extends org.grails.web.servlet.context.GrailsConfigUtils{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolder.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolder.groovy deleted file mode 100644 index d1e1b18f246..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolder.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.context - -/** - * @deprecated Use {@link grails.web.context.ServletContextHolder} instead - */ -@Deprecated -class ServletContextHolder extends grails.web.context.ServletContextHolder{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/errors/GrailsExceptionResolver.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/errors/GrailsExceptionResolver.groovy deleted file mode 100644 index a3342712012..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/errors/GrailsExceptionResolver.groovy +++ /dev/null @@ -1,7 +0,0 @@ -package org.codehaus.groovy.grails.web.errors - -/** - * @deprecated Use {@link org.grails.web.errors.GrailsExceptionResolver} instead - */ -class GrailsExceptionResolver extends org.grails.web.errors.GrailsExceptionResolver{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGenerator.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGenerator.groovy deleted file mode 100644 index 60733a29453..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGenerator.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.web.mapping - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.web.mapping.CachingLinkGenerator} instead - */ -@Deprecated -@CompileStatic -class CachingLinkGenerator extends org.grails.web.mapping.CachingLinkGenerator { - CachingLinkGenerator(String serverBaseURL, String contextPath) { - super(serverBaseURL, contextPath) - } - - CachingLinkGenerator(String serverBaseURL) { - super(serverBaseURL) - } - - CachingLinkGenerator(String serverBaseURL, Map linkCache) { - super(serverBaseURL, linkCache) - } - - CachingLinkGenerator(String serverBaseURL, String contextPath, Map linkCache) { - super(serverBaseURL, contextPath, linkCache) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultLinkGenerator.java b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultLinkGenerator.java deleted file mode 100644 index bf5b2cb0a2a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultLinkGenerator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.web.mapping; - -/** - * @author Graeme Rocher - * - * @deprecated Use {@link org.grails.web.mapping.DefaultLinkGenerator} instead - */ -@Deprecated -public class DefaultLinkGenerator extends org.grails.web.mapping.DefaultLinkGenerator { - public DefaultLinkGenerator(String serverBaseURL, String contextPath) { - super(serverBaseURL, contextPath); - } - - public DefaultLinkGenerator(String serverBaseURL) { - super(serverBaseURL); - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ForwardMethod.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ForwardMethod.groovy deleted file mode 100644 index a07d521db58..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ForwardMethod.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.web.metaclass - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.plugins.web.controllers.metaclass.ForwardMethod} instead - */ -@Deprecated -class ForwardMethod extends org.grails.plugins.web.controllers.metaclass.ForwardMethod { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.groovy deleted file mode 100644 index 40c292cc783..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.web.metaclass - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.plugins.web.controllers.metaclass.RenderDynamicMethod} instead - */ -@Deprecated -class RenderDynamicMethod extends org.grails.plugins.web.controllers.metaclass.RenderDynamicMethod { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/DelegatingApplicationAttributes.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/DelegatingApplicationAttributes.groovy deleted file mode 100644 index b6906651848..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/DelegatingApplicationAttributes.groovy +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet - -import groovy.transform.CompileStatic - -/** - * @author Graeme Rocher - * @deprecated Do not use, will be removed in a future version of Grails - */ -@Deprecated -@CompileStatic -class DelegatingApplicationAttributes implements GrailsApplicationAttributes, org.grails.web.util.GrailsApplicationAttributes { - - @Delegate org.grails.web.util.GrailsApplicationAttributes applicationAttributes - - DelegatingApplicationAttributes(org.grails.web.util.GrailsApplicationAttributes applicationAttributes) { - this.applicationAttributes = applicationAttributes - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsFlashScope.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsFlashScope.groovy deleted file mode 100644 index c00a9678fcc..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsFlashScope.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet - -/** - * @deprecated Use {@link org.grails.web.servlet.GrailsFlashScope} instead - * @author Graeme Rocher - */ -@Deprecated -class GrailsFlashScope implements FlashScope { - - @Delegate grails.web.mvc.FlashScope flashScope - - GrailsFlashScope(grails.web.mvc.FlashScope flashScope) { - this.flashScope = flashScope - } - - GrailsFlashScope() { - this.flashScope = new org.grails.web.servlet.GrailsFlashScope() - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsUrlPathHelper.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsUrlPathHelper.groovy deleted file mode 100644 index 3194d765c82..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsUrlPathHelper.groovy +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet - -import groovy.transform.CompileStatic - -/** - * @deprecated Use {@link org.grails.web.servlet.GrailsUrlPathHelper} instead - */ -@CompileStatic -class GrailsUrlPathHelper extends org.grails.web.servlet.GrailsUrlPathHelper{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/HttpHeaders.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/HttpHeaders.groovy deleted file mode 100644 index cbb625bf0aa..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/HttpHeaders.groovy +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet - -/** - * Created by graemerocher on 18/06/2014. - * - * @deprecated Use {@link grails.web.http.HttpHeaders} instead - */ -@Deprecated -class HttpHeaders extends grails.web.http.HttpHeaders{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/WrappedResponseHolder.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/WrappedResponseHolder.groovy deleted file mode 100644 index ada23a78083..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/WrappedResponseHolder.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.web.servlet - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.web.servlet.WrappedResponseHolder} instead - */ -@Deprecated -class WrappedResponseHolder extends org.grails.web.servlet.WrappedResponseHolder{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsDispatcherServlet.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsDispatcherServlet.groovy deleted file mode 100644 index b455848e744..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsDispatcherServlet.groovy +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet.mvc - -import org.springframework.web.context.WebApplicationContext - -/** - * @deprecated Use {@link org.grails.web.servlet.mvc.GrailsDispatcherServlet} instead - */ -class GrailsDispatcherServlet extends org.grails.web.servlet.mvc.GrailsDispatcherServlet{ - - GrailsDispatcherServlet() { - } - - GrailsDispatcherServlet(WebApplicationContext webApplicationContext) { - super(webApplicationContext) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsHttpSession.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsHttpSession.groovy deleted file mode 100644 index 72b2e477405..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsHttpSession.groovy +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet.mvc - -import javax.servlet.http.HttpServletRequest -import javax.servlet.http.HttpSession - -/** - * An adapter class that takes a regular HttpSession and allows you to access it like a Groovy map. - * - * @author Graeme Rocher - * @since 0.4 - * - * @deprecated Use {@link grails.web.servlet.mvc.GrailsHttpSession} instead - */ -@Deprecated -class GrailsHttpSession implements HttpSession{ - - @Delegate grails.web.servlet.mvc.GrailsHttpSession grailsHttpSession - - GrailsHttpSession(grails.web.servlet.mvc.GrailsHttpSession grailsHttpSession) { - this.grailsHttpSession = grailsHttpSession - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy deleted file mode 100644 index 2ae82c358f3..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet.mvc - -import groovy.transform.CompileStatic - -import javax.servlet.http.HttpServletRequest - -/** - * A parameter map class that allows mixing of request parameters and controller parameters. If a controller - * parameter is set with the same name as a request parameter the controller parameter value is retrieved. - * - * @author Graeme Rocher - * @author Kate Rhodes - * @author Lari Hotari - * - * @since 0.5 - * @deprecated Use {@link grails.web.servlet.mvc.GrailsParameterMap} instead - */ -@Deprecated -@CompileStatic -class GrailsParameterMap implements Map { - - @Delegate grails.web.servlet.mvc.GrailsParameterMap delegate - - GrailsParameterMap(grails.web.servlet.mvc.GrailsParameterMap delegate) { - this.delegate = delegate - } - - GrailsParameterMap(Map values, HttpServletRequest request) { - this.delegate = new grails.web.servlet.mvc.GrailsParameterMap(values, request) - } - - public GrailsParameterMap(HttpServletRequest request) { - this.delegate = new grails.web.servlet.mvc.GrailsParameterMap(request) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsWebRequest.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsWebRequest.groovy deleted file mode 100644 index 13a99c2acde..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsWebRequest.groovy +++ /dev/null @@ -1,94 +0,0 @@ -package org.codehaus.groovy.grails.web.servlet.mvc - -import grails.util.Holders -import org.grails.web.util.GrailsApplicationAttributes -import groovy.transform.CompileStatic -import org.codehaus.groovy.grails.commons.GrailsApplication -import org.codehaus.groovy.grails.web.servlet.DelegatingApplicationAttributes -import org.codehaus.groovy.grails.web.servlet.FlashScope -import org.codehaus.groovy.grails.web.servlet.GrailsFlashScope -import org.springframework.context.ApplicationContext -import org.springframework.web.context.request.NativeWebRequest - -import javax.servlet.ServletContext -import javax.servlet.http.HttpServletRequest -import javax.servlet.http.HttpServletResponse - -/** - * @author Graeme Rocher - * @since 0.4 - * @deprecated Use {@link org.grails.web.servlet.mvc.GrailsWebRequest} instead - * - */ -@Deprecated -@CompileStatic -class GrailsWebRequest implements NativeWebRequest { - - @Delegate org.grails.web.servlet.mvc.GrailsWebRequest webRequest - - GrailsWebRequest(HttpServletRequest request, HttpServletResponse response, GrailsApplicationAttributes attributes) { - webRequest = new org.grails.web.servlet.mvc.GrailsWebRequest(request, response, attributes) - } - - GrailsWebRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) { - webRequest = new org.grails.web.servlet.mvc.GrailsWebRequest(request, response, servletContext) - } - - GrailsWebRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, ApplicationContext applicationContext) { - webRequest = new org.grails.web.servlet.mvc.GrailsWebRequest(request, response, servletContext, applicationContext) - } - - GrailsWebRequest(org.grails.web.servlet.mvc.GrailsWebRequest webRequest) { - this.webRequest = webRequest - } -/** - * Looks up the current Grails WebRequest instance - * @return The GrailsWebRequest instance - */ - public static GrailsWebRequest lookup() { - return new GrailsWebRequest(org.grails.web.servlet.mvc.GrailsWebRequest.lookup()) - } - - /** - * Looks up the GrailsWebRequest from the current request. - * @param request The current request - * @return The GrailsWebRequest - */ - public static GrailsWebRequest lookup(HttpServletRequest request) { - org.grails.web.servlet.mvc.GrailsWebRequest webRequest = (org.grails.web.servlet.mvc.GrailsWebRequest) request.getAttribute(GrailsApplicationAttributes.WEB_REQUEST); - - return webRequest == null ? lookup() : new GrailsWebRequest(webRequest); - } - - /** - * Looks up the GrailsApplication from the current request. - - * @return The GrailsWebRequest - * @deprecated Use {@link grails.util.Holders#findApplication()} instead - */ - @Deprecated - public static GrailsApplication lookupApplication() { - return (GrailsApplication)Holders.findApplication(); - } - - FlashScope getFlashScope() { - new GrailsFlashScope(webRequest.getFlashScope()) - } - - - - /** - * @return The Grails params object - */ - public GrailsParameterMap getParams() { - return new GrailsParameterMap(webRequest.params) - } - - GrailsHttpSession getSession() { - return new GrailsHttpSession(webRequest.getSession()) - } - - org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes getAttributes() { - return new DelegatingApplicationAttributes(webRequest.getAttributes()) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/RedirectEventListener.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/RedirectEventListener.groovy deleted file mode 100644 index a1138d8f01c..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/RedirectEventListener.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet.mvc - -/** - * @deprecated Use {@link grails.web.mapping.mvc.RedirectEventListener} instead - */ -@Deprecated -interface RedirectEventListener extends grails.web.mapping.mvc.RedirectEventListener { -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/ControllerExecutionException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/ControllerExecutionException.groovy deleted file mode 100644 index fc5cf8dc0ac..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/ControllerExecutionException.groovy +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet.mvc.exceptions - -/** - * @author Graeme Rocher - * @since 0.2 - * @deprecated Use {@link org.grails.web.servlet.mvc.exceptions.ControllerExecutionException} instead - */ -@Deprecated -class ControllerExecutionException extends org.grails.web.servlet.mvc.exceptions.ControllerExecutionException{ - - ControllerExecutionException() { - } - - ControllerExecutionException(String message, Throwable cause) { - super(message, cause) - } - - ControllerExecutionException(String message) { - super(message) - } - - ControllerExecutionException(Throwable cause) { - super(cause) - } -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/GrailsMVCException.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/GrailsMVCException.groovy deleted file mode 100644 index 07f6d27cb06..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/exceptions/GrailsMVCException.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet.mvc.exceptions - -/** - * Thrown when an unrecoverable error occured in the Grails MVC framework. - * - * @author Steven Devijver - * @deprecated Use {@link org.grails.web.servlet.mvc.exceptions.GrailsMVCException} instead - */ -@Deprecated -class GrailsMVCException extends org.grails.web.servlet.mvc.exceptions.GrailsMVCException{ -} diff --git a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/util/WebUtils.groovy b/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/util/WebUtils.groovy deleted file mode 100644 index f6a09bf119a..00000000000 --- a/grails-compat/src/main/groovy/org/codehaus/groovy/grails/web/util/WebUtils.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.web.util - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.web.util.WebUtils} instead - */ -@Deprecated -class WebUtils extends org.grails.web.util.WebUtils{ -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/BindingHelper.java b/grails-compat/src/main/groovy/org/grails/databinding/BindingHelper.java deleted file mode 100644 index 39426fe0ece..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/BindingHelper.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - - - -/** - * @author Jeff Brown - * @since 2.3 - * @see BindUsing - * @deprecated Use {@link grails.databinding.BindingHelper} - */ -@Deprecated -public interface BindingHelper extends grails.databinding.BindingHelper{ -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/CollectionDataBindingSource.java b/grails-compat/src/main/groovy/org/grails/databinding/CollectionDataBindingSource.java deleted file mode 100644 index 9cb7fae9deb..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/CollectionDataBindingSource.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - -import grails.databinding.DataBindingSource; - -/** - * @see DataBindingSource - * @since 2.3 - * @deprecated Use {@link grails.databinding.CollectionDataBindingSource} - */ -@Deprecated -public interface CollectionDataBindingSource extends grails.databinding.CollectionDataBindingSource { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/DataBinder.java b/grails-compat/src/main/groovy/org/grails/databinding/DataBinder.java deleted file mode 100644 index 4e053bda90f..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/DataBinder.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - - -/** - * @author Jeff Brown - * @since 2.3 - * @deprecated Use {@link grails.databinding.DataBinder} - */ -@Deprecated -public interface DataBinder extends grails.databinding.DataBinder { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/DataBindingSource.java b/grails-compat/src/main/groovy/org/grails/databinding/DataBindingSource.java deleted file mode 100644 index ed47f21d772..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/DataBindingSource.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - - -/** - * A DataBindingSource is a lot like a Map but is read-only and is - * tailored to support data binding. - * - * @since 2.3 - * @deprecated Use {@link grails.databinding.DataBindingSource} - */ -@Deprecated -public interface DataBindingSource extends grails.databinding.DataBindingSource { -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/grails/databinding/SimpleDataBinder.groovy b/grails-compat/src/main/groovy/org/grails/databinding/SimpleDataBinder.groovy deleted file mode 100644 index b92fb8ba4e7..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/SimpleDataBinder.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding - -import groovy.transform.CompileStatic - -/** - * - * @since 2.3 - * @deprecated Use {@link grails.databinding.SimpleDataBinder} - */ -@CompileStatic -class SimpleDataBinder extends grails.databinding.SimpleDataBinder { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/SimpleMapDataBindingSource.groovy b/grails-compat/src/main/groovy/org/grails/databinding/SimpleMapDataBindingSource.groovy deleted file mode 100644 index 36c183d2da4..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/SimpleMapDataBindingSource.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding - - -/** - * - * @deprecated Use {@link grails.databinding.SimpleMapDataBindingSource} - * - */ -@Deprecated -class SimpleMapDataBindingSource extends grails.databinding.SimpleMapDataBindingSource { - SimpleMapDataBindingSource(Map map) { - super(map) - } -} \ No newline at end of file diff --git a/grails-compat/src/main/groovy/org/grails/databinding/StructuredBindingEditor.java b/grails-compat/src/main/groovy/org/grails/databinding/StructuredBindingEditor.java deleted file mode 100644 index ff1e2279cbd..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/StructuredBindingEditor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - -import grails.databinding.SimpleDataBinder; - -/** - * StructuredBindingEditors convert structured data in a Map - * into an object. Typically a structured editor will pull - * several values out of the Map that are necessary to initialize - * the state of the object. -

-class Address {
-    String state
-    String city
-}
-class StructuredAddressBindingEditor implements StructuredBindingEditor {
-
-    public Object getPropertyValue(Object obj, String propertyName, Map source) {
-        def address = new Address()
-
-        address.state = source[propertyName + '_someState']
-        address.city = source[propertyName + '_someCity']
-
-        address
-    }
-}
-
-def binder = new SimpleDataBinder()
-binder.registerStructuredEditor Address, new StructuredAddressBindingEditor()
-def resident = new Resident()
-def bindingSource = [:]
-bindingSource.name = 'Scott'
-bindingSource.homeAddress_someCity = "Scott's Home City"
-bindingSource.homeAddress_someState = "Scott's Home State"
-bindingSource.workAddress_someState = "Scott's Work State"
-bindingSource.workAddress = 'struct'
-bindingSource.homeAddress = 'struct'
-
-binder.bind resident, bindingSource
-
-resident.name == 'Scott'
-resident.homeAddress
-assert resident.homeAddress.city == "Scott's Home City"
-assert resident.homeAddress.state == "Scott's Home State"
-assert resident.workAddress
-assert resident.workAddress.state == "Scott's Work State"
-assert resident.workAddress.city == null
-
- * - * @author Jeff Brown - * @since 2.3 - * @see SimpleDataBinder#registerStructuredEditor(Class, StructuredBindingEditor) - * @deprecated Use {@link grails.databinding.StructuredBindingEditor} - */ -@Deprecated -public interface StructuredBindingEditor extends grails.databinding.StructuredBindingEditor { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/TypedStructuredBindingEditor.java b/grails-compat/src/main/groovy/org/grails/databinding/TypedStructuredBindingEditor.java deleted file mode 100644 index 46e7cc36238..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/TypedStructuredBindingEditor.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding; - -/** - * - * @since 2.3.4 - * @see StructuredBindingEditor - * @deprecated Use {@link grails.databinding.TypedStructuredBindingEditor} - */ -@Deprecated -public interface TypedStructuredBindingEditor extends grails.databinding.TypedStructuredBindingEditor { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/converters/FormattedValueConverter.java b/grails-compat/src/main/groovy/org/grails/databinding/converters/FormattedValueConverter.java deleted file mode 100644 index a60a70253ec..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/converters/FormattedValueConverter.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding.converters; - -/** - * Classes which implement this interface may participate - * in the data binding process as formatted value converters. -
-import org.grails.databinding.converters.FormattedValueConverter
-
-class FormattedStringValueConverter implements FormattedValueConverter {
-    def convert(value, String format) {
-        if('UPPERCASE' == format) {
-            value = value.toUpperCase()
-        } else if('LOWERCASE' == format) {
-            value = value.toLowerCase()
-        }
-        value
-    }
-
-    Class getTargetType() {
-        // specifies the type to which this converter may be applied
-        String
-    }
-}
-
- * - * @author Jeff Brown - * @since 2.3 - * @see grails.databinding.BindingFormat - * @see org.grails.databinding.SimpleDataBinder - * @see org.grails.databinding.SimpleDataBinder#registerFormattedValueConverter(FormattedValueConverter) - * @deprecated Use {@link grails.databinding.converters.FormattedValueConverter} - */ -public interface FormattedValueConverter extends grails.databinding.converters.FormattedValueConverter { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/converters/ValueConverter.java b/grails-compat/src/main/groovy/org/grails/databinding/converters/ValueConverter.java deleted file mode 100644 index 477527b932a..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/converters/ValueConverter.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding.converters; - -/** - * @author Jeff Brown - * @since 2.3 - * @deprecated Use {@link grails.databinding.converters.ValueConverter} - */ -public interface ValueConverter extends grails.databinding.converters.ValueConverter { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/errors/BindingError.java b/grails-compat/src/main/groovy/org/grails/databinding/errors/BindingError.java deleted file mode 100644 index 753086101b3..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/errors/BindingError.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding.errors; - -/** - * Represents a problem which occurred during data binding. - * - * @author Jeff Brown - * @since 2.3 - * @deprecated Use {@link grails.databinding.errors.BindingError} - */ -@Deprecated -public interface BindingError extends grails.databinding.errors.BindingError { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListener.java b/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListener.java deleted file mode 100644 index be29e98255a..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListener.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding.events; - -import grails.databinding.events.DataBindingListenerAdapter; - - -/** - * A listener which will be notified of events generated during data binding. - * - * @author Jeff Brown - * @since 2.3 - * @see DataBindingListenerAdapter - * @deprecated Use {@link grails.databinding.events.DataBindingListener} - */ -@Deprecated -public interface DataBindingListener extends grails.databinding.events.DataBindingListener { -} diff --git a/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListenerAdapter.java b/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListenerAdapter.java deleted file mode 100644 index 57a7a7f1be7..00000000000 --- a/grails-compat/src/main/groovy/org/grails/databinding/events/DataBindingListenerAdapter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding.events; - -import grails.databinding.events.DataBindingListener; - -/** - * @author Jeff Brown - * @since 2.3 - * @see DataBindingListener - * @deprecated Use {@link grails.databinding.events.DataBindingListenerAdapter} - */ -@Deprecated -public class DataBindingListenerAdapter extends grails.databinding.events.DataBindingListenerAdapter { - -} diff --git a/grails-core/src/main/groovy/grails/core/ArtefactHandlerAdapter.java b/grails-core/src/main/groovy/grails/core/ArtefactHandlerAdapter.java index d4b4ee93038..6e3d740b0aa 100644 --- a/grails-core/src/main/groovy/grails/core/ArtefactHandlerAdapter.java +++ b/grails-core/src/main/groovy/grails/core/ArtefactHandlerAdapter.java @@ -39,7 +39,7 @@ * @since 1.0 */ @SuppressWarnings( "deprecation" ) -public class ArtefactHandlerAdapter implements ArtefactHandler, org.codehaus.groovy.grails.commons.ArtefactHandler { +public class ArtefactHandlerAdapter implements ArtefactHandler { protected String type; protected Class grailsClassType; diff --git a/grails-core/src/main/groovy/grails/core/DefaultArtefactInfo.java b/grails-core/src/main/groovy/grails/core/DefaultArtefactInfo.java index 961ec37ddc4..09209913506 100644 --- a/grails-core/src/main/groovy/grails/core/DefaultArtefactInfo.java +++ b/grails-core/src/main/groovy/grails/core/DefaultArtefactInfo.java @@ -31,7 +31,7 @@ * @author Marc Palmer (marc@anyware.co.uk) * @author Graeme Rocher */ -public class DefaultArtefactInfo implements ArtefactInfo, org.codehaus.groovy.grails.commons.ArtefactInfo { +public class DefaultArtefactInfo implements ArtefactInfo { private LinkedList grailsClasses = new LinkedList(); private Class[] classes; diff --git a/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java b/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java index 062a2292799..b81f307c939 100644 --- a/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java +++ b/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java @@ -176,12 +176,6 @@ public DefaultGrailsApplication(org.grails.io.support.Resource[] resources) { @SuppressWarnings( "deprecation" ) protected void initArtefactHandlers() { - List legacyArtefactHandlers = GrailsFactoriesLoader.loadFactories(org.codehaus.groovy.grails.commons.ArtefactHandler.class, getClassLoader()); - - for (org.codehaus.groovy.grails.commons.ArtefactHandler artefactHandler : legacyArtefactHandlers) { - registerArtefactHandler(artefactHandler); - } - List additionalArtefactHandlers = GrailsFactoriesLoader.loadFactories(ArtefactHandler.class, getClassLoader()); for (ArtefactHandler artefactHandler : additionalArtefactHandlers) { @@ -194,7 +188,7 @@ protected void initArtefactHandlers() { private void updateArtefactHandlers() { // Cache the list as an array artefactHandlers = artefactHandlersByName.values().toArray( - new org.codehaus.groovy.grails.commons.ArtefactHandler[artefactHandlersByName.size()]); + new ArtefactHandler[artefactHandlersByName.size()]); } /** @@ -303,7 +297,7 @@ public Config getConfig() { * @return The number of registered artefacts */ protected int getArtefactCount(String artefactType) { - org.codehaus.groovy.grails.commons.ArtefactInfo info = getArtefactInfo(artefactType); + ArtefactInfo info = getArtefactInfo(artefactType); return info == null ? 0 : info.getClasses().length; } @@ -561,7 +555,7 @@ protected void initializeArtefacts(ArtefactHandler handler) { return; } - org.codehaus.groovy.grails.commons.ArtefactInfo info = getArtefactInfo(handler.getType()); + ArtefactInfo info = getArtefactInfo(handler.getType()); // Only init those that have data if (info != null) { //System.out.println("Initialising artefacts of kind " + handler.getType() + " with registered artefacts" + info.getGrailsClassesByName()); @@ -592,7 +586,7 @@ protected DefaultArtefactInfo getArtefactInfo(String artefactType, boolean creat * @param artefactType The name of an artefact type * @return The cache of classes for the type, or null if no cache exists */ - public org.codehaus.groovy.grails.commons.ArtefactInfo getArtefactInfo(String artefactType) { + public ArtefactInfo getArtefactInfo(String artefactType) { return getArtefactInfo(artefactType, false); } diff --git a/grails-core/src/main/groovy/grails/core/GrailsApplication.java b/grails-core/src/main/groovy/grails/core/GrailsApplication.java index ad7e99e0d89..cfe9adcfefa 100644 --- a/grails-core/src/main/groovy/grails/core/GrailsApplication.java +++ b/grails-core/src/main/groovy/grails/core/GrailsApplication.java @@ -83,14 +83,6 @@ public interface GrailsApplication extends ApplicationContextAware { */ Config getConfig(); - /** - * Returns the flatten ConfigObject for use from Java classes. - * @return The flattened config - * @deprecated Do not use flat config. Use the {@link grails.config.Config} interface instead - */ - @Deprecated - Map getFlatConfig(); - /** * Returns the class loader instance for the Grails application. * diff --git a/grails-core/src/main/groovy/grails/core/GrailsClass.java b/grails-core/src/main/groovy/grails/core/GrailsClass.java index 82e9b78ed4b..16d9acde08a 100644 --- a/grails-core/src/main/groovy/grails/core/GrailsClass.java +++ b/grails-core/src/main/groovy/grails/core/GrailsClass.java @@ -18,8 +18,6 @@ import groovy.lang.MetaClass; import grails.core.support.GrailsApplicationAware; -import org.codehaus.groovy.grails.commons.*; -import org.springframework.beans.BeanWrapper; /** * Represents any class in a Grails application. @@ -37,16 +35,6 @@ public interface GrailsClass extends GrailsApplicationAware{ */ boolean isAbstract(); - /** - * The GrailsApplication that this class belongs to - * - * @return The GrailsApplication instance - * @deprecated Use {@link #getApplication()} instead - */ - @Deprecated - org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication(); - - /** * The GrailsApplication that this class belongs to * @@ -139,13 +127,6 @@ public interface GrailsClass extends GrailsApplicationAware{ */ MetaClass getMetaClass(); - /** - * @deprecated - * @return BeanWrapper for reference instance, deprecated - */ - @Deprecated - BeanWrapper getReference(); - /** * @return Sample (reference) instance for this Grails class */ diff --git a/grails-core/src/main/groovy/grails/core/GrailsDomainClass.java b/grails-core/src/main/groovy/grails/core/GrailsDomainClass.java index f17db7c8c4d..62d626d77ca 100644 --- a/grails-core/src/main/groovy/grails/core/GrailsDomainClass.java +++ b/grails-core/src/main/groovy/grails/core/GrailsDomainClass.java @@ -48,14 +48,6 @@ public interface GrailsDomainClass extends GrailsClass { */ GrailsDomainClassProperty[] getProperties(); - /** - * Returns all of the persistant properties of the domain class - * @return The domain class' persistant properties - * @deprecated Use #getPersistentProperties instead - */ - @Deprecated - GrailsDomainClassProperty[] getPersistantProperties(); - /** * Returns all of the persistant properties of the domain class * @return The domain class' persistant properties diff --git a/grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java b/grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java index b57340cfbc9..1024909731c 100644 --- a/grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java +++ b/grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java @@ -164,22 +164,6 @@ private void setPluginFilter() { pluginFilter = new PluginFilterRetriever().getPluginFilter(application.getConfig()); } - /** - * @deprecated Will be removed in a future version of Grails - */ - @Deprecated - public void startPluginChangeScanner() { - // do nothing - } - - /** - * @deprecated Will be removed in a future version of Grails - */ - @Deprecated - public void stopPluginChangeScanner() { - // do nothing - } - public void refreshPlugin(String name) { if (hasGrailsPlugin(name)) { getGrailsPlugin(name).refresh(); @@ -686,8 +670,6 @@ public void reloadPlugin(GrailsPlugin plugin) { plugin.doWithDynamicMethods(applicationContext); } - - @Override public void setApplication(GrailsApplication application) { Assert.notNull(application, "Argument [application] cannot be null"); diff --git a/grails-core/src/main/groovy/grails/plugins/GrailsPlugin.java b/grails-core/src/main/groovy/grails/plugins/GrailsPlugin.java index 18c95258abb..e6b9a8e7345 100644 --- a/grails-core/src/main/groovy/grails/plugins/GrailsPlugin.java +++ b/grails-core/src/main/groovy/grails/plugins/GrailsPlugin.java @@ -50,7 +50,7 @@ * @see org.springframework.beans.factory.support.BeanDefinitionRegistry */ @SuppressWarnings("rawtypes") -public interface GrailsPlugin extends ApplicationContextAware, Comparable, GrailsPluginInfo, org.codehaus.groovy.grails.plugins.GrailsPlugin { +public interface GrailsPlugin extends ApplicationContextAware, Comparable, GrailsPluginInfo { int EVENT_ON_CHANGE = 0; int EVENT_ON_CONFIG_CHANGE = 1; @@ -229,7 +229,10 @@ public interface GrailsPlugin extends ApplicationContextAware, Comparable, Grail /** * Write some documentation to the DocumentationContext + * @deprecated Dynamic document generation no longer supported + * @param text */ + @Deprecated void doc(String text); /** diff --git a/grails-core/src/main/groovy/grails/plugins/GrailsPluginManager.java b/grails-core/src/main/groovy/grails/plugins/GrailsPluginManager.java index 17e319ff5ec..83f2e63de60 100644 --- a/grails-core/src/main/groovy/grails/plugins/GrailsPluginManager.java +++ b/grails-core/src/main/groovy/grails/plugins/GrailsPluginManager.java @@ -165,6 +165,7 @@ public interface GrailsPluginManager extends ApplicationContextAware { /** * Checks all the plugins to see whether they have any changes */ + @Deprecated void checkForChanges(); /** diff --git a/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java b/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java index 602c5439da6..b2783e3742b 100644 --- a/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java +++ b/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java @@ -411,257 +411,6 @@ public static PropertyDescriptor getProperty(Class clazz, String propertyName return null; } } - /** - * Returns the class name without the package prefix - * - * @param targetClass The class to get a short name for - * @return The short name of the class - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getShortName(Class)} instead. - */ - @SuppressWarnings("rawtypes") - @Deprecated - public static String getShortName(Class targetClass) { - return getShortName(targetClass.getName()); - } - - /** - * Returns the class name without the package prefix - * - * @param className The class name to get a short name for - * @return The short name of the class - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getShortName(String)} instead. - */ - @Deprecated - public static String getShortName(String className) { - int i = className.lastIndexOf("."); - if (i > -1) { - className = className.substring(i + 1, className.length()); - } - return className; - } - - /** - * Returns the property name equivalent for the specified class - * - * @param targetClass The class to get the property name for - * @return A property name reperesentation of the class name (eg. MyClass becomes myClass) - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getPropertyNameRepresentation(Class)} instead. - */ - @SuppressWarnings("rawtypes") - @Deprecated - public static String getPropertyNameRepresentation(Class targetClass) { - return getPropertyNameRepresentation(getShortName(targetClass)); - } - - /** - * Returns the property name representation of the given name - * - * @param name The name to convert - * @return The property name representation - * @deprecated Use {@link grails.util.GrailsNameUtils#getPropertyNameRepresentation(String)} instead. - */ - @Deprecated - public static String getPropertyNameRepresentation(String name) { - // Strip any package from the name. - int pos = name.lastIndexOf('.'); - if (pos != -1) { - name = name.substring(pos + 1); - } - - // Check whether the name begins with two upper case letters. - if (name.length() > 1 && Character.isUpperCase(name.charAt(0)) && Character.isUpperCase(name.charAt(1))) { - return name; - } - - String propertyName = name.substring(0,1).toLowerCase(Locale.ENGLISH) + name.substring(1); - if (propertyName.indexOf(' ') > -1) { - propertyName = propertyName.replaceAll("\\s", ""); - } - return propertyName; - } - - /** - * Returns the class name representation of the given name - * - * @param name The name to convert - * @return The property name representation - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getClassNameRepresentation(String)} instead. - */ - @Deprecated - public static String getClassNameRepresentation(String name) { - - StringBuilder buf = new StringBuilder(); - if (name != null && name.length() > 0) { - String[] tokens = name.split("[^\\w\\d]"); - for (int i = 0; i < tokens.length; i++) { - String token = tokens[i].trim(); - buf.append(token.substring(0, 1).toUpperCase(Locale.ENGLISH)) - .append(token.substring(1)); - } - } - return buf.toString(); - } - - /** - * Shorter version of getPropertyNameRepresentation - * @param name The name to convert - * @return The property name version - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getPropertyName(String)} instead. - */ - @Deprecated - public static String getPropertyName(String name) { - return getPropertyNameRepresentation(name); - } - - /** - * Shorter version of getPropertyNameRepresentation - * @param clazz The clazz to convert - * @return The property name version - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getPropertyName(Class)} instead. - */ - @SuppressWarnings("rawtypes") - @Deprecated - public static String getPropertyName(Class clazz) { - return getPropertyNameRepresentation(clazz); - } - - /** - * Retrieves the script name representation of the supplied class. For example - * MyFunkyGrailsScript would be my-funky-grails-script - * - * @param clazz The class to convert - * @return The script name representation - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getScriptName(Class)} instead. - */ - @SuppressWarnings("rawtypes") - @Deprecated - public static String getScriptName(Class clazz) { - return getScriptName(clazz.getName()); - } - - /** - * @deprecated Use {@link grails.util.GrailsNameUtils#getScriptName(String)} instead. - */ - @Deprecated - public static String getScriptName(String name) { - if (name.endsWith(".groovy")) { - name = name.substring(0, name.length()-7); - } - String naturalName = getNaturalName(getShortName(name)); - return naturalName.replaceAll("\\s", "-").toLowerCase(); - } - - /** - * Calculates the class name from a script name in the form - * my-funk-grails-script - * - * @param scriptName The script name - * @return A class name - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getNameFromScript(String)} instead. - */ - @Deprecated - public static String getNameFromScript(String scriptName) { - return getClassNameForLowerCaseHyphenSeparatedName(scriptName); - } - - /** - * Converts foo-bar into fooBar - * - * @param name The lower case hyphen separated name - * @return The property name equivalent - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getPropertyNameForLowerCaseHyphenSeparatedName(String)} instead. - */ - @Deprecated - public static String getPropertyNameForLowerCaseHyphenSeparatedName(String name) { - return getPropertyName(getClassNameForLowerCaseHyphenSeparatedName(name)); - } - - /** - * Converts foo-bar into FooBar - * - * @param name The lower case hyphen separated name - * @return The class name equivalent - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getClassNameForLowerCaseHyphenSeparatedName(String)} instead. - */ - @Deprecated - private static String getClassNameForLowerCaseHyphenSeparatedName(String name) { - if (name.indexOf('-') > -1) { - StringBuilder buf = new StringBuilder(); - String[] tokens = name.split("-"); - for (int i = 0; i < tokens.length; i++) { - String token = tokens[i]; - if (token == null || token.length() == 0) continue; - buf.append(token.substring(0,1).toUpperCase()) - .append(token.substring(1)); - } - return buf.toString(); - } - return name.substring(0,1).toUpperCase() + name.substring(1); - } - - /** - * Converts a property name into its natural language equivalent eg ('firstName' becomes 'First Name') - * @param name The property name to convert - * @return The converted property name - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getNaturalName(String)} instead. - */ - @Deprecated - public static String getNaturalName(String name) { - List words = new ArrayList(); - int i = 0; - char[] chars = name.toCharArray(); - for (int j = 0; j < chars.length; j++) { - char c = chars[j]; - String w; - if (i >= words.size()) { - w = ""; - words.add(i, w); - } - else { - w = words.get(i); - } - - if (Character.isLowerCase(c) || Character.isDigit(c)) { - if (Character.isLowerCase(c) && w.length() == 0) { - c = Character.toUpperCase(c); - } - else if (w.length() > 1 && Character.isUpperCase(w.charAt(w.length() - 1))) { - w = ""; - words.add(++i,w); - } - - words.set(i, w + c); - } - else if (Character.isUpperCase(c)) { - if ((i == 0 && w.length() == 0) || Character.isUpperCase(w.charAt(w.length() - 1))) { - words.set(i, w + c); - } - else { - words.add(++i, String.valueOf(c)); - } - } - } - - StringBuilder buf = new StringBuilder(); - for (Iterator j = words.iterator(); j.hasNext();) { - buf.append(j.next()); - if (j.hasNext()) { - buf.append(' '); - } - } - return buf.toString(); - } /** * Convenience method for converting a collection to an Object[] @@ -963,49 +712,6 @@ else if (interfaceType.equals(SortedSet.class)) { return elements; } - /** - * Retrieves the logical class name of a Grails artifact given the Grails class - * and a specified trailing name - * - * @param clazz The class - * @param trailingName The trailing name such as "Controller" or "TagLib" - * @return The logical class name - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getLogicalName(Class, String)} instead. - */ - @SuppressWarnings("rawtypes") - @Deprecated - public static String getLogicalName(Class clazz, String trailingName) { - return getLogicalName(clazz.getName(), trailingName); - } - - /** - * Retrieves the logical name of the class without the trailing name - * @param name The name of the class - * @param trailingName The trailing name - * @return The logical name - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getLogicalName(String, String)} instead. - */ - @Deprecated - public static String getLogicalName(String name, String trailingName) { - if (StringUtils.hasText(trailingName)) { - String shortName = getShortName(name); - if (shortName.indexOf(trailingName) > - 1) { - return shortName.substring(0, shortName.length() - trailingName.length()); - } - } - return name; - } - - /** - * @deprecated Use {@link grails.util.GrailsNameUtils#getLogicalPropertyName(String, String)} instead. - */ - @Deprecated - public static String getLogicalPropertyName(String className, String trailingName) { - return getLogicalName(getPropertyName(className), trailingName); - } - /** * Retrieves the name of a setter for the specified property name * @param propertyName The property name @@ -1183,35 +889,6 @@ public static boolean getBooleanFromMap(String key, Map map, boolean defau return defaultValue; } - /** - * Returns the class name for the given logical name and trailing name. For example "person" and "Controller" would evaluate to "PersonController" - * - * @param logicalName The logical name - * @param trailingName The trailing name - * @return The class name - * - * @deprecated Use {@link grails.util.GrailsNameUtils#getClassName(String, String)} instead. - */ - @Deprecated - public static String getClassName(String logicalName, String trailingName) { - Assert.isTrue(StringUtils.hasText(logicalName), "Argument [logicalName] cannot be null or blank"); - - String className = logicalName.substring(0,1).toUpperCase() + logicalName.substring(1); - if (trailingName != null) className = className + trailingName; - return className; - } - - /** - * Checks whether the given class is a JDK 1.5 enum. - * - * @param type The class to check - * @return true if it is an enum - * @deprecated - */ - public static boolean isJdk5Enum(Class type) { - return type.isEnum(); - } - /** * Locates the name of a property for the given value on the target object using Groovy's meta APIs. * Note that this method uses the reference so the incorrect result could be returned for two properties diff --git a/grails-core/src/main/groovy/grails/util/GrailsUtil.java b/grails-core/src/main/groovy/grails/util/GrailsUtil.java index 447f74a3787..a186f4e124e 100644 --- a/grails-core/src/main/groovy/grails/util/GrailsUtil.java +++ b/grails-core/src/main/groovy/grails/util/GrailsUtil.java @@ -52,18 +52,6 @@ public class GrailsUtil { private GrailsUtil() { } - - /** - * Retrieves the current execution environment. - * - * @return The environment Grails is executing under - * @deprecated Use Environment.getCurrent() method instead - */ - @Deprecated - public static String getEnvironment() { - return Environment.getCurrent().getName(); - } - /** * Retrieves whether the current execution environment is the development one. * @@ -128,19 +116,6 @@ public static void warn(String message) { } } - /** - *

Remove all apparently Grails-internal trace entries from the exception instance

- *

This modifies the original instance and returns it, it does not clone

- * @param t The exception - * @return The exception passed in, after cleaning the stack trace - * - * @deprecated Use {@link StackTraceFilterer} instead - */ - @Deprecated - public static Throwable sanitize(Throwable t) { - return stackFilterer.filter(t); - } - public static void printSanitizedStackTrace(Throwable t, PrintWriter p) { printSanitizedStackTrace(t, p, stackFilterer); } @@ -193,26 +168,5 @@ public static Throwable deepSanitize(Throwable t) { return stackFilterer.filter(t, true); } - /** - * Writes out a GPathResult (i.e. the result of parsing XML using - * XmlSlurper) to the given writer. - * @param result The root node of the XML to write out. - * @param output Where to write the XML to. - * @throws IOException If the writing fails due to a closed stream or unwritable file. - * @deprecated Will be removed in a future release - */ - @Deprecated - public static void writeSlurperResult(GPathResult result, Writer output) throws IOException { - Binding b = new Binding(); - b.setVariable("node", result); - // this code takes the XML parsed by XmlSlurper and writes it out using StreamingMarkupBuilder - // don't ask me how it works, refer to John Wilson ;-) - Writable w = (Writable)new GroovyShell(b).evaluate( - "new groovy.xml.StreamingMarkupBuilder().bind {" + - " mkp.declareNamespace(\"\": \"http://java.sun.com/xml/ns/j2ee\");" + - " mkp.yield node}"); - w.writeTo(output); - } - } diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ApplicationAttributes.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ApplicationAttributes.groovy deleted file mode 100644 index 8153d886db7..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ApplicationAttributes.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @since 0.4 - * @deprecated Use {@link grails.core.ApplicationAttributes} instead - */ -@Deprecated -public interface ApplicationAttributes extends grails.core.ApplicationAttributes{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandler.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandler.groovy deleted file mode 100644 index 402453355e9..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactHandler.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.ArtefactHandler} instead - * - */ -@Deprecated -public interface ArtefactHandler extends grails.core.ArtefactHandler{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactInfo.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactInfo.groovy deleted file mode 100644 index e88f4e15f27..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ArtefactInfo.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.ArtefactInfo} instead - */ -@Deprecated -public interface ArtefactInfo extends grails.core.ArtefactInfo{ -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DomainClassArtefactHandler.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DomainClassArtefactHandler.groovy deleted file mode 100644 index 82a83e29734..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DomainClassArtefactHandler.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.artefact.DomainClassArtefactHandler} instead - */ -@Deprecated -class DomainClassArtefactHandler extends org.grails.core.artefact.DomainClassArtefactHandler { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsApplication.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsApplication.groovy deleted file mode 100644 index 4b204e6961d..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsApplication.groovy +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import grails.util.Metadata -import groovy.transform.CompileStatic -import org.springframework.context.ApplicationContext -import org.springframework.core.io.Resource - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.GrailsApplication} instead - */ -@Deprecated -@CompileStatic -public interface GrailsApplication { - /** - * The id of the grails application within a bean context - */ - String APPLICATION_ID = "grailsApplication"; - - /** - * The name of the class that provides configuration - */ - String CONFIG_CLASS = "Config"; - /** - * The name of the DataSource class - */ - String DATA_SOURCE_CLASS = "DataSource"; - /** - * The name of the project metadata file - */ - String PROJECT_META_FILE = "application.properties"; - /** - * The name of the transaction manager bean - */ - String TRANSACTION_MANAGER_BEAN = "transactionManager"; - String SESSION_FACTORY_BEAN = "sessionFactory"; - String DATA_SOURCE_BEAN = "dataSource"; - String MESSAGE_SOURCE_BEAN = "messageSource"; - String MULTIPART_RESOLVER_BEAN = "multipartResolver"; - String EXCEPTION_HANDLER_BEAN = "exceptionHandler"; - String CLASS_LOADER_BEAN = "classLoader"; - String DIALECT_DETECTOR_BEAN = "dialectDetector"; - String OPEN_SESSION_IN_VIEW_INTERCEPTOR_BEAN = "openSessionInViewInterceptor"; - - /** - * Returns the ConfigObject instance. - * - * @return The ConfigObject instance - */ - ConfigObject getConfig(); - - /** - * Returns the flatten ConfigObject for use from Java classes. - * @return The flattened config - */ - Map getFlatConfig(); - - /** - * Returns the class loader instance for the Grails application. - * - * @return The ClassLoader instance - */ - ClassLoader getClassLoader(); - - /** - * Retrieves all java.lang.Class instances loaded by the Grails class loader - * @return An array of classes - */ - @SuppressWarnings("rawtypes") - Class[] getAllClasses(); - - /** - * Retrieves all java.lang.Class instances considered Artefacts loaded by the Grails class loader - * @return An array of classes - */ - @SuppressWarnings("rawtypes") - Class[] getAllArtefacts(); - - /** - * Returns the Spring context for this application. Note that this - * will return null until the application is fully - * initialised. This context contains all the application artifacts, - * plugin beans, the works. - */ - ApplicationContext getMainContext(); - - /** - * Sets the main Spring context for this application. - */ - void setMainContext(ApplicationContext context); - - /** - * Returns the Spring application context that contains this - * application instance. It is the parent of the context returned - * by {@link #getMainContext()}. - */ - ApplicationContext getParentContext(); - - /** - * Retrieves a class for the given name within the GrailsApplication or returns null - * - * @param className The name of the class - * @return The class or null - */ - @SuppressWarnings("rawtypes") - Class getClassForName(String className); - - /** - * Rebuilds the constraint definitions. - * TODO move this out? Why ORM dependencies in here? - */ - void refreshConstraints(); - - /** - * This method will refresh the entire application - */ - void refresh(); - - /** - * Rebuilds this Application throwing away the class loader and re-constructing it from the loaded - * resources again. Can only be called in development mode and an error will be thrown if called - * in a different enivronment - */ - void rebuild(); - - /** - * Retrieves a Resource instance for the given Grails class or null it doesn't exist. - * - * @param theClazz The Grails class - * @return A Resource or null - */ - @SuppressWarnings("rawtypes") - Resource getResourceForClass(Class theClazz); - - /** - *

Call this to find out if the class you have is an artefact loaded by grails.

- * @param theClazz A class to test - * @return true if and only if the class was loaded from grails-app/ - * @since 0.5 - */ - @SuppressWarnings("rawtypes") - boolean isArtefact(Class theClazz); - - /** - *

Check if the specified artefact Class has been loaded by Grails already AND is - * of the type expected

- * @param artefactType A string identifying the artefact type to check for - * @param theClazz The class to check - * @return true if Grails considers the class to be managed as an artefact of the type specified. - * @since 0.5 - */ - @SuppressWarnings("rawtypes") - boolean isArtefactOfType(String artefactType, Class theClazz); - - /** - *

Check if the artefact Class with the name specified is of the type expected

- * @param artefactType A string identifying the artefact type to check for - * @param className The name of a class to check - * @return true if Grails considers the class to be managed as an artefact of the type specified. - * @since 0.5 - */ - boolean isArtefactOfType(String artefactType, String className); - - /** - *

Gets the GrailsClass associated with the named artefact class

- *

i.e. to get the GrailsClass for controller called "BookController" you pass the name "BookController"

- * @param artefactType The type of artefact to retrieve, i.e. "Controller" - * @param name The name of an artefact such as "BookController" - * @return The associated GrailsClass or null - * @since 0.5 - */ - GrailsClass getArtefact(String artefactType, String name); - - /** - * Returns the ArtefactHandler for the given class or null - * @param theClass The class - * @return The ArtefactHandler - */ - @SuppressWarnings("rawtypes") - ArtefactHandler getArtefactType(Class theClass); - - /** - *

Obtain all the class information about the artefactType specified

- * @param artefactType An artefact type identifier i.e. "Domain" - * @return The artefact info or null if the artefactType is not recognized - * @since 0.5 - */ - ArtefactInfo getArtefactInfo(String artefactType); - - /** - *

Get an array of all the GrailsClass instances relating to artefacts of the specified type.

- * @param artefactType The type of artefact to retrieve, i.e. "Controller" - * @return An array of GrailsClasses which may empty by not null - * @since 0.5 - */ - GrailsClass[] getArtefacts(String artefactType); - - /** - *

Get an artefact GrailsClass by a "feature" which depending on the artefact may be a URI or tag name - * for example

- * @param artefactType The type ID of the artefact, i.e. "TagLib" - * @param featureID The "feature" ID, say a URL or tag name - * @return The grails class or null if none is found - * @since 0.5 - */ - GrailsClass getArtefactForFeature(String artefactType, Object featureID); - - /** - *

Registers a new artefact

- * @param artefactType The type ID of the artefact, i.e. "TagLib" - * @param artefactClass The class of the artefact. A new GrailsClass will be created automatically and added - * to internal structures, using the appropriate ArtefactHandler - * @return The new grails class for the artefact class - * @since 0.5 - */ - @SuppressWarnings("rawtypes") - GrailsClass addArtefact(String artefactType, Class artefactClass); - - /** - *

Registers a new artefact

- * @param artefactType The type ID of the artefact, i.e. "TagLib" - * @param artefactGrailsClass The GrailsClass of the artefact. - * @return The supplied grails class for the artefact class - * @since 0.5 - */ - GrailsClass addArtefact(String artefactType, GrailsClass artefactGrailsClass); - - /** - *

Register a new artefact handler

- * @param handler The new handler to add - */ - void registerArtefactHandler(ArtefactHandler handler); - - /** - *

Test whether an artefact handler exists for a given type

- * @param type The type of the handler - * @return true if it does - */ - boolean hasArtefactHandler(String type); - - /** - *

Obtain a list of all the artefact handlers

- * @return The list, possible empty but not null, of all currently registered handlers - */ - ArtefactHandler[] getArtefactHandlers(); - - /** - * Initialise this GrailsApplication. - */ - void initialise(); - - /** - * Returns whether this GrailsApplication has been initialised or not. - * @return true if it has been initialised - */ - boolean isInitialised(); - - /** - *

Get access to the project's metadata, specified in application.yml and grails.build.info if it is present

- *

This provides access to information like required grails version, application name, version etc - * but NOT general application settings.

- * @return A read-only Map of data about the application, not environment specific - */ - Metadata getMetadata(); - - /** - * Retrieves an artefact by its logical property name. For example the logical property name of - * BookController would be book. - * @param type The artefact type - * @param logicalName The logical name - * @return The GrailsClass or null if it doesn't exist - */ - GrailsClass getArtefactByLogicalPropertyName(String type, String logicalName); - - /** - * Adds the given artefact, attempting to determine type from - * @param artefact The artefact to add - */ - @SuppressWarnings("rawtypes") - void addArtefact(Class artefact); - - /** - * Returns true if this application has been deployed as a WAR file - * - * @return true if the application is WAR deployed - */ - boolean isWarDeployed(); - - /** - * Adds an artefact that can be overriden by user defined classes - * @param artefact An overridable artefact - */ - @SuppressWarnings("rawtypes") - void addOverridableArtefact(Class artefact); - - /** - * Fired to inform the application when the Config.groovy file changes. - */ - void configChanged(); - - /** - * Returns the ArtefactHandler for the given type - * @param type The artefact handler type - * @return The artefact handler - */ - ArtefactHandler getArtefactHandler(String type); -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClass.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClass.groovy deleted file mode 100644 index 5d9100f582d..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClass.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.core.GrailsClass} instead - * - */ -@Deprecated -public interface GrailsClass extends grails.core.GrailsClass{ -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClassUtils.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClassUtils.groovy deleted file mode 100644 index ed7da292f74..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClassUtils.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.util.GrailsClassUtils} instead - */ -@Deprecated -class GrailsClassUtils extends grails.util.GrailsClassUtils { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsControllerClass.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsControllerClass.groovy deleted file mode 100644 index da389f037f6..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsControllerClass.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * Represents a controller class in Grails. - * - * @author Steven Devijver - * @author Graeme Rocher - * - * @since 1.0 - * @deprecated Use {@link grails.core.GrailsControllerClass} instead - */ -@Deprecated -public interface GrailsControllerClass extends grails.core.GrailsControllerClass{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClass.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClass.groovy deleted file mode 100644 index 5e99ccadff2..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClass.groovy +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -import org.springframework.validation.Validator - -/** - * Represents a persistable Grails domain class. - * - * @author Graeme Rocher - * @since 1.0 - * - * Created: Jul 5, 2005 - * - * @deprecated Use {@link grails.core.GrailsDomainClass} instead - */ -@Deprecated -public interface GrailsDomainClass extends grails.core.GrailsClass, GrailsClass { - - /** - * The name of the default ORM implementation used to map the class - */ - String GORM = "GORM"; - - String ORM_MAPPING = "mapping"; - - /** - * @param domainClass - * @return true if the specifying domain class is on the owning side of a relationship - */ - @SuppressWarnings("rawtypes") - boolean isOwningClass(Class domainClass); - - /** - * Returns all of the properties of the domain class - * @return The domain class properties - */ - GrailsDomainClassProperty[] getProperties(); - - /** - * Returns all of the persistant properties of the domain class - * @return The domain class' persistant properties - * @deprecated Use #getPersistentProperties instead - */ - @Deprecated - GrailsDomainClassProperty[] getPersistantProperties(); - - /** - * Returns all of the persistant properties of the domain class - * @return The domain class' persistant properties - */ - GrailsDomainClassProperty[] getPersistentProperties(); - - /** - * Returns the identifier property - * @return The identifier property - */ - GrailsDomainClassProperty getIdentifier(); - - /** - * Returns the version property - * @return The version property - */ - GrailsDomainClassProperty getVersion(); - - /** - * Returns this classes association map - * @return The association map - */ - @SuppressWarnings("rawtypes") - Map getAssociationMap(); - - /** - * Returns the property for the given name - * - * @param name The property for the name - * @throws org.grails.core.exceptions.InvalidPropertyException - * @return The domain class property for the given name - */ - GrailsDomainClassProperty getPropertyByName(String name); - - /** - * Returns the property for the given name or null if non exists - * - * @param name The property name - * @return The property or null - */ - GrailsDomainClassProperty getPersistentProperty(String name); - - /** - * Returns the field name for the given property name - * @param propertyName - * @return The field representation of the property name - */ - String getFieldName(String propertyName); - - /** - *

Returns the default property name of the GrailsClass. For example the property name for - * a class called "User" would be "user"

- * - * @return The property name representation of the class name - */ - String getPropertyName(); - - /** - * Returns true if the given property is a one to many relationship - * @param propertyName The name of the property - * @return A boolean value - */ - boolean isOneToMany(String propertyName); - - /** - * Returns true if the given property is a many to one relationship - * @param propertyName The name of the property - * @return A boolean value - */ - boolean isManyToOne(String propertyName); - - /** - * Returns true if the given property is a bi-directional relationship - * - * @param propertyName The name of the property - * @return A boolean value - */ - boolean isBidirectional(String propertyName); - - /** - * Returns the type of the related class of the given property - * - * @param propertyName The name of the property - * @return The type of the class or null if no relationship exists for the specified property - */ - @SuppressWarnings("rawtypes") - Class getRelatedClassType(String propertyName); - - /** - * Returns a map of constraints applied to this domain class with the keys being the property name - * and the values being ConstrainedProperty instances - * - * @return A map of constraints - */ - @SuppressWarnings("rawtypes") - Map getConstrainedProperties(); - - /** - * Retreives the validator for this domain class - * - * @return A validator instance or null if none exists - */ - Validator getValidator(); - - /** - * Sets the validator for this domain class - * - * @param validator The domain class validator to set - */ - void setValidator(Validator validator); - - /** - * @return The name of the ORM implementation used to map the domain class (default is "GORM") - */ - String getMappingStrategy(); - - /** - * Whether the class is the root of a heirarchy - * - * @return true if it is the root of the heirarchy - */ - boolean isRoot(); - - /** - * Returns the sub-classes for this class if any - * - * @return A set of sub classes or an empty set if none exist - */ - Set getSubClasses(); - - /** - * Refreshes the constraint defined on a domain class - */ - void refreshConstraints(); - - /** - * Returns true if the domain classes has sub classes - * @return true if it does - */ - boolean hasSubClasses(); - - /** - * @return The map that defines association mappings - */ - @SuppressWarnings("rawtypes") - Map getMappedBy(); - - /** - * Returns true if this domain class has a persistent property for the given name - * @param propertyName The property name - * @return true if it does - */ - boolean hasPersistentProperty(String propertyName); - - /** - * Sets the strategy to use for ORM mapping. Default is GORM - * @param strategy The mapping strategy - */ - void setMappingStrategy(String strategy); - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClassProperty.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClassProperty.groovy deleted file mode 100644 index cf918150bd5..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainClassProperty.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * A property of a GrailsDomainClass instance. - * - * @author Graeme Rocher - * @deprecated Use {@link grails.core.GrailsDomainClassProperty} instead - */ -@Deprecated -public interface GrailsDomainClassProperty extends grails.core.GrailsDomainClassProperty{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainConfigurationUtil.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainConfigurationUtil.groovy deleted file mode 100644 index c9f8123b36a..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainConfigurationUtil.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link org.grails.core.support.GrailsDomainConfigurationUtil} instead - */ -@Deprecated -class GrailsDomainConfigurationUtil extends org.grails.core.support.GrailsDomainConfigurationUtil { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsMetaClassUtils.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsMetaClassUtils.groovy deleted file mode 100644 index 709ebeacf8c..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsMetaClassUtils.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.codehaus.groovy.grails.commons - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.util.GrailsMetaClassUtils} instead - */ -@Deprecated -class GrailsMetaClassUtils extends grails.util.GrailsMetaClassUtils { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTErrorsHelper.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTErrorsHelper.groovy deleted file mode 100644 index dd3b9b56171..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTErrorsHelper.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Enhances a class to contain an Errors property of type org.springframework.validation.Errors. Methods added include: - * - *
- *  public void setErrors(Errors errors)
- *  public Errors getErrors()
- *  public void clearErrors()
- *  public Boolean hasErrors()
- *  
- * - * @author Jeff Brown - * @deprecated Use {@link org.grails.compiler.injection.ASTErrorsHelper} instead - */ -@Deprecated -public interface ASTErrorsHelper extends org.grails.compiler.injection.ASTErrorsHelper{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelper.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelper.groovy deleted file mode 100644 index 09475653226..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelper.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * @author Jeff Brown - * @deprecated Use {@link org.grails.compiler.injection.ASTValidationErrorsHelper} instead - */ -@Deprecated -class ASTValidationErrorsHelper extends org.grails.compiler.injection.ASTValidationErrorsHelper implements ASTErrorsHelper { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractGrailsArtefactTransformer.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractGrailsArtefactTransformer.groovy deleted file mode 100644 index 7e0092c2d59..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AbstractGrailsArtefactTransformer.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Abstract transformer that takes an implementation class and creates methods - * in a target ClassNode that delegate to that implementation class. Subclasses - * should override to provide the implementation class details - * - * @since 2.0 - * @author Graeme Rocher - * @deprecated Use {@link org.grails.compiler.injection.AbstractGrailsArtefactTransformer} instead - */ -@Deprecated -abstract class AbstractGrailsArtefactTransformer extends org.grails.compiler.injection.AbstractGrailsArtefactTransformer{ -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AstTransformer.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AstTransformer.groovy deleted file mode 100644 index 4e91b3de063..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/AstTransformer.groovy +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.groovy.grails.compiler.injection -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Marker annotation that for classes that transform Grails classes at the AST level. - * - * @since 2.0 - * @author Graeme Rocher - * @deprecated Use {@link grails.compiler.ast.AstTransformer} instead - */ -@Retention(RetentionPolicy.RUNTIME) -@Target([ElementType.TYPE]) -public @interface AstTransformer { -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsASTUtils.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsASTUtils.groovy deleted file mode 100644 index 63dac8a0371..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsASTUtils.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Helper methods for working with Groovy AST trees. - * - * @author Graeme Rocher - * @since 0.3 - * @deprecated Use {@link org.grails.compiler.injection.GrailsASTUtils} instead - */ -@Deprecated -class GrailsASTUtils extends org.grails.compiler.injection.GrailsASTUtils{ -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactClassInjector.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactClassInjector.groovy deleted file mode 100644 index 7b64d4c7261..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactClassInjector.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Interface specific to Grails artefacts that returns the artefact type. - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Use {@link grails.compiler.ast.GrailsArtefactClassInjector} instead - */ -@Deprecated -public interface GrailsArtefactClassInjector extends grails.compiler.ast.GrailsArtefactClassInjector { -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsDomainClassInjector.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsDomainClassInjector.groovy deleted file mode 100644 index 3667242b6fa..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsDomainClassInjector.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.compiler.injection - -/** - * Mainly just a marker interface for implementations that perform injection on domain classes. - * - * @author Graeme Rocher - * - * @since 0.2 - * @deprecated Use {@link grails.compiler.ast.GrailsDomainClassInjector} instead - */ -@Deprecated -public interface GrailsDomainClassInjector extends grails.compiler.ast.GrailsDomainClassInjector { - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/orm/support/GrailsTransactionTemplate.java b/grails-core/src/main/groovy/org/codehaus/groovy/grails/orm/support/GrailsTransactionTemplate.java deleted file mode 100644 index 17b5f97a0f2..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/orm/support/GrailsTransactionTemplate.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.codehaus.groovy.grails.orm.support; - -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.TransactionDefinition; -import org.springframework.transaction.interceptor.TransactionAttribute; - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.transaction.GrailsTransactionTemplate} instead - */ -@Deprecated -public class GrailsTransactionTemplate extends grails.transaction.GrailsTransactionTemplate { - - public GrailsTransactionTemplate(PlatformTransactionManager transactionManager) { - super(transactionManager); - } - - public GrailsTransactionTemplate(PlatformTransactionManager transactionManager, TransactionDefinition transactionDefinition) { - super(transactionManager, transactionDefinition); - } - - public GrailsTransactionTemplate(PlatformTransactionManager transactionManager, TransactionAttribute transactionAttribute) { - super(transactionManager, transactionAttribute); - } -} diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPlugin.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPlugin.groovy deleted file mode 100644 index 101ae24cad9..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPlugin.groovy +++ /dev/null @@ -1,391 +0,0 @@ -package org.codehaus.groovy.grails.plugins - -import grails.core.GrailsApplication -import grails.util.BuildScope -import grails.util.Environment -import org.grails.plugins.support.WatchPattern -import org.grails.spring.RuntimeSpringConfiguration -import org.springframework.context.ApplicationContext -import org.springframework.core.io.Resource -import org.springframework.core.type.filter.TypeFilter - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.plugins.GrailsPlugin} instead - */ -@Deprecated -public interface GrailsPlugin { - int EVENT_ON_CHANGE = 0; - int EVENT_ON_CONFIG_CHANGE = 1; - int EVENT_ON_SHUTDOWN = 2; - - String DO_WITH_DYNAMIC_METHODS = "doWithDynamicMethods"; - - /** - * The scopes to which this plugin applies - */ - String SCOPES = "scopes"; - - /** - * The environments to which this plugin applies - */ - String ENVIRONMENTS = "environments"; - - /** - * The prefix used in plug-ins paths - */ - String PLUGINS_PATH = "/plugins"; - - /** - * Defines the name of the property that specifies resources which this plugin monitors for changes - * in the format a Ant-style path - */ - String WATCHED_RESOURCES = "watchedResources"; - - /** - * Defines the name of the property that specifies a List or plugins that this plugin evicts - * Eviction occurs when the PluginManager loads - */ - String EVICT = "evict"; - - /** - * The status of the plugin. - */ - String STATUS = "status"; - - /** - * When a plugin is "enabled" it will be loaded as usual. - */ - String STATUS_ENABLED = "enabled"; - - /** - * When a plugin is "disabled" it will not be loaded - */ - String STATUS_DISABLED = "disabled"; - - /** - * Defines the name of the property that defines the closure that will be invoked - * when a watched resource changes - */ - String ON_CHANGE = "onChange"; - - /** - * Defines the name of the property that holds a closure to be invoked when shutdown is called - */ - String ON_SHUTDOWN = "onShutdown"; - - /** - * Defines the name of the property that defines the closure that will be invoked - * when a the Grails configuration object changes - */ - String ON_CONFIG_CHANGE = "onConfigChange"; - - /** - * Defines the name of the property that defines the closure that will be invoked - * when the web.xml is being generated - */ - String DO_WITH_WEB_DESCRIPTOR = "doWithWebDescriptor"; - - /** - * Defines the name of the property that defines the closure that will be invoked during runtime spring configuration - */ - String DO_WITH_SPRING = "doWithSpring"; - - /** - * Defines the name of the property that defines a closure that will be invoked after intialisation - * and when the application context has been built - */ - String DO_WITH_APPLICATION_CONTEXT = "doWithApplicationContext"; - - /** - * Defines the name of the property that specifies which plugins this plugin depends on - */ - String DEPENDS_ON = "dependsOn"; - - /** - * Define the list of ArtefactHandlers supporting by the plugin - */ - String ARTEFACTS = "artefacts"; - - /** - * The name of the property that provides a list of shipped, but overridable artefacts - */ - String PROVIDED_ARTEFACTS = "providedArtefacts"; - - /** - * The name of the property that provides a list of plugins this plugin should load before - */ - String PLUGIN_LOAD_BEFORE_NAMES = "loadBefore"; - - /** - * The name of the property that provides a list of plugins this plugin should after before - */ - String PLUGIN_LOAD_AFTER_NAMES = "loadAfter"; - - /** - * The field that represents the list of resources to exclude from plugin packaging - */ - String PLUGIN_EXCLUDES = "pluginExcludes"; - - /** - * The field that represents the list of type filters a plugin provides - */ - String TYPE_FILTERS = "typeFilters"; - - /** - * The field that represents the plugin names that this plugin is observing for changes. - */ - String OBSERVE = "observe"; - - /** - *

This method is called to allow the plugin to add {@link org.springframework.beans.factory.config.BeanDefinition}s - * to the {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}.

- * - * @param applicationContext The Spring ApplicationContext instance - */ - void doWithApplicationContext(ApplicationContext applicationContext); - - /** - * Executes the plugin code that performs runtime configuration as defined in the doWithSpring closure - * - * @param springConfig The RuntimeSpringConfiguration instance - */ - void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig); - - - /** - * Makes the plugin excluded for a particular BuildScope - * @param buildScope The BuildScope - */ - void addExclude(BuildScope buildScope); - - /** - * Makes the plugin excluded for a particular Environment - * @param env The Environment - */ - void addExclude(Environment env); - - /** - * Return whether this plugin supports the given PluginScope - * - * @param buildScope The PluginScope - * @return true if it does - */ - boolean supportsScope(BuildScope buildScope); - - /** - * Returns whether this plugin supports the given environment name - * @param environment The environment name - * @return true if it does - */ - boolean supportsEnvironment(Environment environment); - - /** - * @return true if the current plugin supports the current BuildScope and Environment - */ - boolean supportsCurrentScopeAndEnvironment(); - - /** - * Write some documentation to the DocumentationContext - */ - void doc(String text); - - /** - * Returns the path of the plug-in - * - * @return A String that makes up the path to the plug-in in the format /plugins/PLUGIN_NAME-PLUGIN_VERSION - */ - String getPluginPath(); - - /** - * @return The names of the plugins this plugin is dependant on - */ - String[] getDependencyNames(); - - /** - * @return The names of the plugins this plugin should evict onload - */ - String[] getEvictionNames(); - - /** - * Retrieves the names of plugins that this plugin should be loaded after. This differs - * from dependencies in that if that plugin doesn't exist this plugin will still be loaded. - * It is a way of enforcing plugins are loaded before, but not necessarily needed - * - * @return The names of the plugins that this plugin should be loaded after - */ - String[] getLoadAfterNames(); - - /** - * Retrieves the names of plugins that this plugin should be loaded before. As with getLoadAfterNames() it - * is not a requirement that the specified plugins exist - * - * @return The names of the plugins that this plugin should load before - */ - String[] getLoadBeforeNames(); - - /** - * The version of the specified dependency - * - * @param name the name of the dependency - * @return The version - */ - String getDependentVersion(String name); - - /** - * When called this method checks for any changes to the plug-ins watched resources - * and reloads appropriately - * - * @return Returns true when the plug-in itself changes in some way, as oppose to plug-in resources - * - * @deprecated Plugins themselves no longer check for changes - */ - @Deprecated - boolean checkForChanges(); - - /** - * Refreshes this Grails plugin reloading any watched resources as necessary - */ - void refresh(); - - /** - * Retrieves the plugin manager if known, otherwise returns null - * @return The PluginManager or null - */ - grails.plugins.GrailsPluginManager getManager(); - - /** - * Retrieves the wrapped plugin instance for this plugin - * @return The plugin instance - */ - GroovyObject getInstance(); - - /** - * Sets the plugin manager for this plugin - * - * @param manager A GrailsPluginManager instance - */ - void setManager(grails.plugins.GrailsPluginManager manager); - - void setApplication(GrailsApplication application); - - /** - * Calls a "doWithDynamicMethods" closure that allows a plugin to register dynamic methods at runtime - * @param applicationContext The Spring ApplicationContext instance - */ - void doWithDynamicMethods(ApplicationContext applicationContext); - - /** - * @return Whether the plugin is enabled or not - */ - boolean isEnabled(); - - /** - * Retrieve the plugin names that this plugin is observing for changes - * - * @return The names of the observed plugins - */ - String[] getObservedPluginNames(); - - /** - * Notifies this plugin of the specified Event calling the onChange listener - * - * @param event The event to listen for - */ - void notifyOfEvent(Map event); - - /** - * Notifies the plugin of a specific event for the given event id, which is one of ON_CHANGE, ON_CONFIG_CHANGE - * - * @param eventKind The event kind - * @param source The source of the event - * @return a Map that represents the event - */ - Map notifyOfEvent(int eventKind, Object source); - - /** - * Called prior to the initialisation of the GrailsApplication instance to allow the registration - * of additonal ArtefactHandlers - * - * @see grails.core.ArtefactHandler - * - */ - void doArtefactConfiguration(); - - /** - * Retrieves an array of provided Artefacts that are pre-compiled additions to the GrailsApplication object - * but are overridable by the end-user - * - * @return A list of provided artefacts - */ - Class[] getProvidedArtefacts(); - - /** - * Returns the name of the plugin as represented in the file system including the version. For example TagLibGrailsPlugin would result in "tag-lib-0.1" - * @return The file system representation of the plugin name - */ - String getFileSystemName(); - - /** - * Returns the name of the plugin as represented on the file system without the version. For example TagLibGrailsPlugin would result in "tag-lib" - * @return The file system name - */ - String getFileSystemShortName(); - - /** - * Returns the underlying class that represents this plugin - * @return The plugin class - */ - Class getPluginClass(); - - /** - * A list of resources that the plugin should exclude from the packaged distribution - * @return a List of resources - */ - List getPluginExcludes(); - - /** - * Returns whether this plugin is loaded from the current plugin. In other words when you execute grails run-app from a plugin project - * the plugin project's *GrailsPlugin.groovy file represents the base plugin and this method will return true for this plugin - * - * @return true if it is the base plugin - */ - boolean isBasePlugin(); - - /** - * Sets whether this plugin is the base plugin - * - * @param isBase True if is - * @see #isBasePlugin() - */ - void setBasePlugin(boolean isBase); - - /** - * Plugin can provide a list of Spring TypeFilters so that annotated components can - * be scanned into the ApplicationContext - * @return A collection of TypeFilter instance - */ - Collection getTypeFilters(); - - /** - * Resources that this plugin watches - * - * @return The watch resource patterns - */ - List getWatchedResourcePatterns(); - - /** - * Whether the plugin is interested in a particular change - * - * @param path The path to the resource that changed - * @return true if it is - */ - boolean hasInterestInChange(String path); - - /** - * Sets the plugin descriptor for this plugin - * - * @param descriptor The descriptor - */ - void setDescriptor(Resource descriptor); -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginManager.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginManager.groovy deleted file mode 100644 index e2470d92970..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginManager.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.plugins - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.plugins.GrailsPluginManager} instead - */ -@Deprecated -public interface GrailsPluginManager extends grails.plugins.GrailsPluginManager{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/PluginManagerAware.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/PluginManagerAware.groovy deleted file mode 100644 index 128dfcd6714..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/PluginManagerAware.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2006-2007 Graeme Rocher - * - * 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.codehaus.groovy.grails.plugins - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.plugins.PluginManagerAware} instead - */ -@Deprecated -public interface PluginManagerAware { - /** - * Sets the plug-in manager on this instance - * - * @param pluginManager The PluginManager - */ - void setPluginManager(GrailsPluginManager pluginManager); -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsApplicationAware.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsApplicationAware.groovy deleted file mode 100644 index a9fa6dc2a97..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/support/aware/GrailsApplicationAware.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package org.codehaus.groovy.grails.plugins.support.aware - -import org.codehaus.groovy.grails.commons.GrailsApplication - -/** - * - * @author Graeme Rocher - * @deprecated Use {@link grails.core.support.GrailsApplicationAware} instead - */ -@Deprecated -public interface GrailsApplicationAware { - /** - *

This method is called by the {@link org.springframework.context.ApplicationContext} that - * loads the Grails application. The {@link grails.core.GrailsApplication} instance that represents - * the loaded Grails application is injected.

- * - * @param grailsApplication the {@link grails.core.GrailsApplication} object that represents this Grails application - */ - void setGrailsApplication(GrailsApplication grailsApplication); -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ConstraintsEvaluator.groovy b/grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ConstraintsEvaluator.groovy deleted file mode 100644 index 82077256afa..00000000000 --- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ConstraintsEvaluator.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2011 SpringSource - * - * 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.codehaus.groovy.grails.validation - -/** - * Evaluates and returns constraints. - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ -@Deprecated -public interface ConstraintsEvaluator extends grails.validation.ConstraintsEvaluator{ - -} \ No newline at end of file diff --git a/grails-core/src/main/groovy/org/grails/compiler/RelationshipManagementMethodTypeCheckingExtension.groovy b/grails-core/src/main/groovy/org/grails/compiler/RelationshipManagementMethodTypeCheckingExtension.groovy index 9a4e54e0fb5..635b69646dd 100644 --- a/grails-core/src/main/groovy/org/grails/compiler/RelationshipManagementMethodTypeCheckingExtension.groovy +++ b/grails-core/src/main/groovy/org/grails/compiler/RelationshipManagementMethodTypeCheckingExtension.groovy @@ -20,8 +20,8 @@ import grails.util.GrailsNameUtils import org.codehaus.groovy.ast.ClassNode import org.codehaus.groovy.ast.expr.ArgumentListExpression import org.codehaus.groovy.ast.expr.MethodCall -import org.codehaus.groovy.grails.compiler.injection.GrailsASTUtils import org.codehaus.groovy.transform.stc.GroovyTypeCheckingExtensionSupport.TypeCheckingDSL +import org.grails.compiler.injection.GrailsASTUtils /** * diff --git a/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java b/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java index 9876293ae6d..6a2baa2bd59 100644 --- a/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java +++ b/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java @@ -76,12 +76,6 @@ public class GrailsASTUtils { private static final ClassNode TYPECHECKINGMODE_CLASS_NODE = ClassHelper.make(TypeCheckingMode.class); public static final Parameter[] ZERO_PARAMETERS = new Parameter[0]; public static final ArgumentListExpression ZERO_ARGUMENTS = new ArgumentListExpression(); - - /** - * @deprecated Sharing copies of VariableExpression which refer to "this" is unsafe - */ - @Deprecated - public static final VariableExpression THIS_EXPR = new VariableExpression("this"); public static void warning(final SourceUnit sourceUnit, final ASTNode node, final String warningMessage) { diff --git a/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsAwareInjectionOperation.java b/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsAwareInjectionOperation.java index 497378fca93..af373cb0d84 100644 --- a/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsAwareInjectionOperation.java +++ b/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsAwareInjectionOperation.java @@ -64,13 +64,6 @@ public GrailsAwareInjectionOperation(ClassInjector[] classInjectors) { localClassInjectors = classInjectors; } - /** - * @deprecated Custom resource loader no longer supported - */ - @Deprecated - public GrailsAwareInjectionOperation(GroovyResourceLoader resourceLoader, ClassInjector[] classInjectors) { - localClassInjectors = classInjectors; - } public static ClassInjector[] getClassInjectors() { if (classInjectors == null) { diff --git a/grails-core/src/main/groovy/org/grails/config/PrefixedConfig.java b/grails-core/src/main/groovy/org/grails/config/PrefixedConfig.java index 6e0400fe60d..47b856844d3 100644 --- a/grails-core/src/main/groovy/org/grails/config/PrefixedConfig.java +++ b/grails-core/src/main/groovy/org/grails/config/PrefixedConfig.java @@ -58,6 +58,7 @@ public int hashCode() { } @Override + @Deprecated public Map flatten() { Map flattened = delegate.flatten(); Map map = new LinkedHashMap(flattened.size()); diff --git a/grails-core/src/main/groovy/org/grails/core/AbstractGrailsApplication.java b/grails-core/src/main/groovy/org/grails/core/AbstractGrailsApplication.java index ad7001c736e..ea394f4b406 100644 --- a/grails-core/src/main/groovy/org/grails/core/AbstractGrailsApplication.java +++ b/grails-core/src/main/groovy/org/grails/core/AbstractGrailsApplication.java @@ -79,6 +79,7 @@ public void setConfig(ConfigObject config) { } @SuppressWarnings("rawtypes") + @Deprecated public void updateFlatConfig() { if (config == null) { flatConfig = new LinkedHashMap(); @@ -88,6 +89,7 @@ public void updateFlatConfig() { } @SuppressWarnings("unchecked") + @Deprecated public Map getFlatConfig() { return new FlatConfig(getConfig()); } diff --git a/grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java b/grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java index bf9436d43a5..4c338cd58b4 100644 --- a/grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java +++ b/grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java @@ -20,17 +20,13 @@ import grails.util.GrailsClassUtils; import grails.util.GrailsMetaClassUtils; import grails.util.GrailsNameUtils; -import grails.util.GrailsUtil; import grails.web.Action; import groovy.lang.GroovyObject; import groovy.lang.MetaClass; -import groovy.lang.MetaProperty; import org.grails.core.exceptions.NewInstanceCreationException; -import org.grails.core.legacy.LegacyGrailsApplication; import org.grails.core.util.ClassPropertyFetcher; import grails.plugins.GrailsVersionUtils; import org.springframework.beans.BeanWrapper; -import org.springframework.beans.BeanWrapperImpl; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; @@ -51,7 +47,7 @@ * * @since 0.1 */ -public abstract class AbstractGrailsClass implements GrailsClass, org.codehaus.groovy.grails.commons.GrailsClass { +public abstract class AbstractGrailsClass implements GrailsClass { private final Class clazz; private BeanWrapper reference; @@ -101,12 +97,6 @@ public void setGrailsApplication(GrailsApplication grailsApplication) { this.grailsApplication = grailsApplication; } - @Override - @Deprecated - public org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication() { - return new LegacyGrailsApplication(grailsApplication); - } - @Override public GrailsApplication getApplication() { return this.grailsApplication; @@ -205,20 +195,6 @@ public boolean hasMetaProperty(String propName) { return (getMetaClass().getMetaProperty(propName) != null); } - /** - * Used to get configured property values. - * - * @return BeanWrapper instance that holds reference - * @deprecated - */ - @Deprecated - public BeanWrapper getReference() { - GrailsUtil.deprecated(AbstractGrailsClass.class, "getReference"); - if (reference == null) { - reference = new BeanWrapperImpl(newInstance()); - } - return reference; - } /** *

Looks for a property of the reference instance with a given name and type.

diff --git a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsControllerClass.java b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsControllerClass.java index 4ff47257eed..2ef3ff7a664 100644 --- a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsControllerClass.java +++ b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsControllerClass.java @@ -43,7 +43,7 @@ * @since 0.1 */ @SuppressWarnings("rawtypes") -public class DefaultGrailsControllerClass extends AbstractInjectableGrailsClass implements GrailsControllerClass, org.codehaus.groovy.grails.commons.GrailsControllerClass { +public class DefaultGrailsControllerClass extends AbstractInjectableGrailsClass implements GrailsControllerClass { public static final String CONTROLLER = "Controller"; diff --git a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClass.java b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClass.java index 1ecef7aaf6d..a15531beaf8 100644 --- a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClass.java +++ b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClass.java @@ -645,26 +645,18 @@ public GrailsDomainClassProperty getIdentifier() { } /* (non-Javadoc) - * @see org.codehaus.groovy.grails.domain.GrailsDomainClass#getVersion() + * @see grails.core.GrailsDomainClass#getVersion() */ public GrailsDomainClassProperty getVersion() { return version; } - /** - * @see grails.core.GrailsDomainClass#getPersistantProperties() - */ - @Deprecated - public GrailsDomainClassProperty[] getPersistantProperties() { - return persistentProperties; - } - public GrailsDomainClassProperty[] getPersistentProperties() { return persistentProperties; } /* (non-Javadoc) - * @see org.codehaus.groovy.grails.domain.GrailsDomainClass#getPropertyByName(java.lang.String) + * @see grails.core.GrailsDomainClass#getPropertyByName(java.lang.String) */ public GrailsDomainClassProperty getPropertyByName(String name) { GrailsDomainClassProperty persistentProperty = getPersistentProperty(name); diff --git a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClassProperty.java b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClassProperty.java index aa2725e8df2..74d8e2d44da 100644 --- a/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClassProperty.java +++ b/grails-core/src/main/groovy/org/grails/core/DefaultGrailsDomainClassProperty.java @@ -48,7 +48,7 @@ * @author Graeme Rocher * @since 0.1 */ -public class DefaultGrailsDomainClassProperty implements GrailsDomainClassProperty, org.codehaus.groovy.grails.commons.GrailsDomainClassProperty { +public class DefaultGrailsDomainClassProperty implements GrailsDomainClassProperty { private GrailsDomainClass domainClass; private boolean persistent = true; // persistant by default @@ -638,14 +638,6 @@ public GrailsDomainClassProperty[] getProperties() { return properties; } - /** - * @deprecated Use #getPersistentProperties instead - */ - @SuppressWarnings("dep-ann") - public GrailsDomainClassProperty[] getPersistantProperties() { - return properties; - } - public GrailsDomainClassProperty[] getPersistentProperties() { return properties; } diff --git a/grails-core/src/main/groovy/org/grails/core/cfg/DeprecatedGrailsConfig.java b/grails-core/src/main/groovy/org/grails/core/cfg/DeprecatedGrailsConfig.java deleted file mode 100644 index d196923d36e..00000000000 --- a/grails-core/src/main/groovy/org/grails/core/cfg/DeprecatedGrailsConfig.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright 2011 SpringSource - * - * 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.core.cfg; - -import grails.config.Config; -import grails.config.Settings; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import grails.core.GrailsApplication; - -import org.grails.config.PropertySourcesConfig; -import org.grails.core.exceptions.GrailsConfigurationException; -import org.codehaus.groovy.runtime.DefaultGroovyMethods; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Type safe abstraction over Grails configuration - * - * @author Graeme Rocher - * @since 2.0 - * @deprecated Will be removed in a future version of Grails - * - */ -@Deprecated -public class DeprecatedGrailsConfig implements Settings { - - private static final Log LOG = LogFactory.getLog(DeprecatedGrailsConfig.class); - - private GrailsApplication grailsApplication; - - public DeprecatedGrailsConfig(GrailsApplication grailsApplication) { - this.grailsApplication = grailsApplication; - } - - /** - * Utility method for retrieving a configuration value. - * - * @param key the flattened key - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig - */ - @SuppressWarnings("unchecked") - public T get(String key) { - if (key.indexOf(".") != -1) { - return (T) getFlatConfig().get(key); - } - - return (T)getConfig().get(key); - } - - /** - * Utility method for retrieving a configuration value and performs type checking - * (i.e. logs a verbose WARN message on type mismatch). - * - * @param key the flattened key - * @param type the required type - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig - */ - public T get(String key, Class type) { - Object o = get(key); - if (o != null) { - if (!type.isAssignableFrom(o.getClass())) { - LOG.warn(String.format( - "Configuration type mismatch for configuration value %s (%s)", key, type.getName())); - return null; - } - return type.cast(o); - } - return null; - } - - /** - * Configuration Value lookup with a default value. - * - * @param key the flattened key - * @param defaultValue the default value - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig if not null, otherwise the defaultValue - */ - @SuppressWarnings("unchecked") - public T get(String key, T defaultValue) { - T v; - if (defaultValue != null) { - v = (T) get(key, defaultValue.getClass()); - } - else { - v = (T) get(key); - } - return v != null ? v : defaultValue; - } - - /** - * Configuration Value lookup with a default value and a list of allowed values. - * - * @param key the flattened key - * @param defaultValue the default value - * @param allowedValues List of allowed values - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig, if it is contained in allowedValues, otherwise the defaultValue - */ - public T get(String key, T defaultValue, List allowedValues) { - T v = get(key, defaultValue); - if (!allowedValues.contains(v)) { - LOG.warn(String.format( - "Configuration value for key %s is not one of the allowed values (%s)", - key, DefaultGroovyMethods.inspect(allowedValues))); - return defaultValue; - } - return v; - } - - /** - * Configuration Value lookup with throws a GrailsConfigurationException when the value is null - * - * @param key the flattened key - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig - */ - @SuppressWarnings("unchecked") - public T getMandatory(String key) { - T v = (T) getFlatConfig().get(key); - if (v == null) { - throw new GrailsConfigurationException(String.format( - "Mandatory configuration value (%s) is not defined!", key)); - } - - return v; - } - - /** - * Configuration Value lookup with throws a GrailsConfigurationException when the value is null - * or not within the allowedValues. - * - * @param key the flattened key - * @param allowedValues List of allowed values - * @param the type parameter - * @return the value retrieved by ConfigurationHolder.flatConfig - */ - @SuppressWarnings("unchecked") - public T getMandatory(String key, List allowedValues) { - T val = (T)getMandatory(key); - if (!allowedValues.contains(val)) { - throw new GrailsConfigurationException( - String.format("Configuration value for key %s is not one of the allowed values (%s)", - key, DefaultGroovyMethods.inspect(allowedValues))); - } - return val; - } - - /** - * Configuration Value lookup for Groovy's array-like property access GrailsConfig['my.config.key'] - * - * @param key the config key - * @return the configured value - */ - public Object getAt(Object key) { - if (key instanceof String) { - return get((String)key); - } - - return getConfig().get(key); - } - - @SuppressWarnings("rawtypes") - public Map getFlatConfig() { - if(grailsApplication == null) { - return Collections.emptyMap(); - } - return grailsApplication.getFlatConfig(); - } - - public Config getConfig() { - if(grailsApplication == null) { - return new PropertySourcesConfig(); - } - return grailsApplication.getConfig(); - } -} diff --git a/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsApplication.groovy b/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsApplication.groovy deleted file mode 100644 index ae597862414..00000000000 --- a/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsApplication.groovy +++ /dev/null @@ -1,243 +0,0 @@ -package org.grails.core.legacy - -import grails.core.GrailsDomainClass -import grails.util.GrailsNameUtils -import grails.util.Metadata -import groovy.transform.CompileStatic -import org.codehaus.groovy.grails.commons.ArtefactHandler -import org.codehaus.groovy.grails.commons.ArtefactInfo -import org.codehaus.groovy.grails.commons.GrailsApplication -import org.codehaus.groovy.grails.commons.GrailsClass -import org.grails.core.artefact.DomainClassArtefactHandler -import org.springframework.context.ApplicationContext -import org.springframework.core.io.Resource - -import java.util.regex.Matcher -import java.util.regex.Pattern - -/** - * Legacy bridge for older GrailsApplication API - * - * @author Graeme Rocher - * @since 3.0 - */ -@CompileStatic -class LegacyGrailsApplication extends GroovyObjectSupport implements GrailsApplication { - - protected static final Pattern GETCLASSESPROP_PATTERN = Pattern.compile(/(\w+)(Classes)/); - protected static final Pattern GETCLASSESMETH_PATTERN = Pattern.compile(/(get)(\w+)(Classes)/); - protected static final Pattern ISCLASS_PATTERN = Pattern.compile(/(is)(\w+)(Class)/); - protected static final Pattern GETCLASS_PATTERN = Pattern.compile(/(get)(\w+)Class/); - - - grails.core.GrailsApplication grailsApplication - - LegacyGrailsApplication(grails.core.GrailsApplication grailsApplication) { - this.grailsApplication = grailsApplication - } - - @Override - Object getProperty(String property) { - // look for getXXXXClasses - final Matcher match = GETCLASSESPROP_PATTERN.matcher(property) - // find match - match.find() - if (match.matches()) { - def artefactName = GrailsNameUtils.getClassNameRepresentation(match.group(1)) - if (getArtefactHandler(artefactName)) { - return getArtefacts(artefactName) - } - } - return super.getProperty(property) - } - - @Override - ConfigObject getConfig() { - def configObject = new ConfigObject() - configObject.putAll(grailsApplication.config) - return configObject - } - - @Override - Map getFlatConfig() { - grailsApplication.flatConfig - } - - @Override - ClassLoader getClassLoader() { - grailsApplication.classLoader - } - - @Override - Class[] getAllClasses() { - grailsApplication.allClasses - } - - @Override - Class[] getAllArtefacts() { - grailsApplication.allArtefacts - } - - @Override - ApplicationContext getMainContext() { - grailsApplication.mainContext - } - - @Override - void setMainContext(ApplicationContext context) { - grailsApplication.mainContext = context - } - - @Override - ApplicationContext getParentContext() { - grailsApplication.parentContext - } - - @Override - Class getClassForName(String className) { - grailsApplication.getClassForName(className) - } - - @Override - void refreshConstraints() { - grailsApplication.refreshConstraints() - } - - @Override - void refresh() { - grailsApplication.refresh() - } - - @Override - void rebuild() { - grailsApplication.rebuild() - } - - @Override - Resource getResourceForClass(Class theClazz) { - grailsApplication.getResourceForClass(theClazz) - } - - @Override - boolean isArtefact(Class theClazz) { - grailsApplication.isArtefact(theClazz) - } - - @Override - boolean isArtefactOfType(String artefactType, Class theClazz) { - grailsApplication.isArtefactOfType(artefactType, theClazz) - } - - @Override - boolean isArtefactOfType(String artefactType, String className) { - grailsApplication.isArtefactOfType(artefactType, className) - } - - @Override - GrailsClass getArtefact(String artefactType, String name) { - def grailsClass = (GrailsClass) grailsApplication.getArtefact(artefactType, name) - return coerceToLegacyType(grailsClass) - } - - @Override - ArtefactHandler getArtefactType(Class theClass) { - return (ArtefactHandler)grailsApplication.getArtefactType(theClass) - } - - @Override - ArtefactInfo getArtefactInfo(String artefactType) { - return (ArtefactInfo)grailsApplication.getArtefactInfo(artefactType) - } - - @Override - GrailsClass[] getArtefacts(String artefactType) { - if(DomainClassArtefactHandler.TYPE.equals(artefactType)) { - return grailsApplication.getArtefacts(artefactType).collect() { GrailsClass grailsClass -> - new LegacyGrailsDomainClass((GrailsDomainClass)grailsClass) - } as GrailsClass[] - } - return grailsApplication.getArtefacts(artefactType) as GrailsClass[] - } - - @Override - GrailsClass getArtefactForFeature(String artefactType, Object featureID) { - return coerceToLegacyType( (GrailsClass)grailsApplication.getArtefactForFeature(artefactType, featureID) ) - } - - @Override - GrailsClass addArtefact(String artefactType, Class artefactClass) { - return coerceToLegacyType((GrailsClass)grailsApplication.addArtefact(artefactType, artefactClass)) - } - - @Override - GrailsClass addArtefact(String artefactType, GrailsClass artefactGrailsClass) { - return coerceToLegacyType((GrailsClass)grailsApplication.addArtefact(artefactType, artefactGrailsClass)) - } - - @Override - void registerArtefactHandler(ArtefactHandler handler) { - grailsApplication.registerArtefactHandler(handler) - } - - @Override - boolean hasArtefactHandler(String type) { - grailsApplication.hasArtefactHandler(type) - } - - @Override - ArtefactHandler[] getArtefactHandlers() { - return grailsApplication.artefactHandlers as ArtefactHandler[] - } - - @Override - void initialise() { - grailsApplication.initialise() - } - - @Override - boolean isInitialised() { - grailsApplication.isInitialised() - } - - @Override - Metadata getMetadata() { - grailsApplication.metadata - } - - @Override - GrailsClass getArtefactByLogicalPropertyName(String type, String logicalName) { - return (GrailsClass)grailsApplication.getArtefactByLogicalPropertyName(type, logicalName) - } - - @Override - void addArtefact(Class artefact) { - grailsApplication.addArtefact(artefact) - } - - @Override - boolean isWarDeployed() { - grailsApplication.isWarDeployed() - } - - @Override - void addOverridableArtefact(Class artefact) { - grailsApplication.addOverridableArtefact(artefact) - } - - @Override - void configChanged() { - grailsApplication.configChanged() - } - - @Override - ArtefactHandler getArtefactHandler(String type) { - return (ArtefactHandler)grailsApplication.getArtefactHandler(type) - } - - private GrailsClass coerceToLegacyType(GrailsClass grailsClass) { - if (grailsClass instanceof GrailsDomainClass) { - return new LegacyGrailsDomainClass(grailsClass) - } - return grailsClass - } -} diff --git a/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsDomainClass.groovy b/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsDomainClass.groovy deleted file mode 100644 index 12b2d9c82b9..00000000000 --- a/grails-core/src/main/groovy/org/grails/core/legacy/LegacyGrailsDomainClass.groovy +++ /dev/null @@ -1,244 +0,0 @@ -package org.grails.core.legacy - -import grails.core.GrailsApplication -import groovy.transform.CompileStatic -import org.codehaus.groovy.grails.commons.GrailsDomainClass -import org.codehaus.groovy.grails.commons.GrailsDomainClassProperty -import org.springframework.beans.BeanWrapper -import org.springframework.validation.Validator - -/** - * Legacy bridge to older Grails 2.3.x API for backwards compatibility - * - * @author Graeme Rocher - * @since 3.0 - */ -@CompileStatic -class LegacyGrailsDomainClass implements GrailsDomainClass { - - grails.core.GrailsDomainClass newDomainClass - - LegacyGrailsDomainClass(grails.core.GrailsDomainClass domainClass) { - this.newDomainClass = domainClass - } - - @Override - boolean isOwningClass(Class domainClass) { - return newDomainClass.isOwningClass(domainClass) - } - - @Override - GrailsDomainClassProperty[] getProperties() { - return newDomainClass.getProperties() as GrailsDomainClassProperty[] - } - - @Override - GrailsDomainClassProperty[] getPersistantProperties() { - return newDomainClass.persistentProperties as GrailsDomainClassProperty[] - } - - @Override - GrailsDomainClassProperty[] getPersistentProperties() { - return newDomainClass.persistentProperties as GrailsDomainClassProperty[] - } - - @Override - GrailsDomainClassProperty getIdentifier() { - return (GrailsDomainClassProperty)newDomainClass.identifier - } - - @Override - GrailsDomainClassProperty getVersion() { - return (GrailsDomainClassProperty)newDomainClass.version - } - - @Override - Map getAssociationMap() { - return newDomainClass.associationMap - } - - @Override - GrailsDomainClassProperty getPropertyByName(String name) { - return null - } - - @Override - GrailsDomainClassProperty getPersistentProperty(String name) { - return null - } - - @Override - String getFieldName(String propertyName) { - return newDomainClass.getFieldName(propertyName) - } - - @Override - boolean isAbstract() { - return newDomainClass.isAbstract() - } - - @Override - org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication() { - return newDomainClass.getGrailsApplication() - } - - @Override - GrailsApplication getApplication() { - return newDomainClass.application - } - - @Override - Object getPropertyValue(String name) { - return newDomainClass.getPropertyValue(name) - } - - @Override - boolean hasProperty(String name) { - return newDomainClass.hasProperty(name) - } - - @Override - Object newInstance() { - return newDomainClass.newInstance() - } - - @Override - String getName() { - return newDomainClass.name - } - - @Override - String getShortName() { - return newDomainClass.shortName - } - - @Override - String getFullName() { - return newDomainClass.fullName - } - - @Override - String getPropertyName() { - return newDomainClass.propertyName - } - - @Override - String getLogicalPropertyName() { - return newDomainClass.logicalPropertyName - } - - @Override - String getNaturalName() { - return newDomainClass.naturalName - } - - @Override - String getPackageName() { - return newDomainClass.packageName - } - - @Override - Class getClazz() { - return newDomainClass.clazz - } - - @Override - BeanWrapper getReference() { - return newDomainClass.getReference() - } - - @Override - Object getReferenceInstance() { - return newDomainClass.getReferenceInstance() - } - - @Override - def T getPropertyValue(String name, Class type) { - return newDomainClass.getPropertyValue(name, type) - } - - @Override - String getPluginName() { - return newDomainClass.pluginName - } - - @Override - boolean isOneToMany(String propertyName) { - return newDomainClass.isOneToMany(propertyName) - } - - @Override - boolean isManyToOne(String propertyName) { - return newDomainClass.isManyToOne(propertyName) - } - - @Override - boolean isBidirectional(String propertyName) { - return newDomainClass.isBidirectional(propertyName) - } - - @Override - Class getRelatedClassType(String propertyName) { - return newDomainClass.getRelatedClassType(propertyName) - } - - @Override - Map getConstrainedProperties() { - return newDomainClass.constrainedProperties - } - - @Override - Validator getValidator() { - return newDomainClass.validator - } - - @Override - void setValidator(Validator validator) { - newDomainClass.validator = validator - } - - @Override - String getMappingStrategy() { - return newDomainClass.mappingStrategy - } - - @Override - boolean isRoot() { - return newDomainClass.isRoot() - } - - @Override - Set getSubClasses() { - return null - } - - @Override - void refreshConstraints() { - newDomainClass.refreshConstraints() - } - - @Override - boolean hasSubClasses() { - return newDomainClass.hasSubClasses() - } - - @Override - Map getMappedBy() { - return newDomainClass.mappedBy - } - - @Override - boolean hasPersistentProperty(String propertyName) { - return newDomainClass.hasPersistentProperty(propertyName) - } - - @Override - void setMappingStrategy(String strategy) { - newDomainClass.mappingStrategy = strategy - } - - @Override - void setGrailsApplication(GrailsApplication grailsApplication) { - newDomainClass.grailsApplication = grailsApplication - } -} diff --git a/grails-core/src/main/groovy/org/grails/core/support/GrailsDomainConfigurationUtil.java b/grails-core/src/main/groovy/org/grails/core/support/GrailsDomainConfigurationUtil.java index dfb013094df..5b39036de94 100644 --- a/grails-core/src/main/groovy/org/grails/core/support/GrailsDomainConfigurationUtil.java +++ b/grails-core/src/main/groovy/org/grails/core/support/GrailsDomainConfigurationUtil.java @@ -354,23 +354,6 @@ public static boolean isNotConfigurational(String name) { return !isConfigurational(name); } - /** - * Evaluates the constraints closure to build the list of constraints - * - * @param instance The instance to evaluate constraints for - * @param properties The properties of the instance - * @param defaultConstraints A map that defines the default constraints - * - * @return A Map of constraints - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(Object instance, - GrailsDomainClassProperty[] properties, Map defaultConstraints) { - final Class theClass = instance.getClass(); - return getConstraintMap(properties, defaultConstraints, theClass); - } private static Map getConstraintMap(GrailsDomainClassProperty[] properties, Map defaultConstraints, Class theClass) { ConstraintsEvaluator constraintsEvaluator = GrailsFactoriesLoader.loadFactory(ConstraintsEvaluator.class, defaultConstraints); @@ -380,82 +363,6 @@ private static Map getConstraintMap(GrailsDomainClassProper return Collections.emptyMap(); } - /** - * Evaluates the constraints closure to build the list of constraints - * - * @param theClass The domain class to evaluate constraints for - * @param properties The properties of the instance - * @param defaultConstraints A map that defines the default constraints - * - * @return A Map of constraints - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(final Class theClass, - GrailsDomainClassProperty[] properties, Map defaultConstraints) { - return getConstraintMap(properties, defaultConstraints, theClass); - } - - /** - * Evaluates the constraints closure to build the list of constraints. - * - * @param instance The instance to evaluate constraints for - * @param properties The properties of the instance - * @return A Map of constraints - * When the bean cannot be introspected - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(Object instance, - GrailsDomainClassProperty[] properties) { - return evaluateConstraints(instance, properties,null); - } - - /** - * Evaluates the constraints closure to build the list of constraints. - * - * @param instance The instance to evaluate constraints for - * @return A Map of constraints - * When the bean cannot be introspected - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(Object instance) { - return evaluateConstraints(instance, null, null); - } - - /** - * Evaluates the constraints closure to build the list of constraints - * - * @param theClass The class to evaluate constraints for - * @return A Map of constraints - * When the bean cannot be introspected - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(Class theClass) { - return evaluateConstraints(theClass, null, null); - } - - /** - * Evaluates the constraints closure to build the list of constraints. - * - * @param theClass The class to evaluate constraints for - * @return A Map of constraints - * When the bean cannot be introspected - * - * @deprecated Use {@link grails.validation.ConstraintsEvaluator} instead - */ - @Deprecated - public static Map evaluateConstraints(Class theClass, - GrailsDomainClassProperty[] properties) { - return evaluateConstraints(theClass, properties, null); - } - public static LinkedList getSuperClassChain(Class theClass) { LinkedList> classChain = new LinkedList>(); Class clazz = theClass; diff --git a/grails-core/src/main/groovy/org/grails/core/util/SoftThreadLocalMap.java b/grails-core/src/main/groovy/org/grails/core/util/SoftThreadLocalMap.java deleted file mode 100644 index e95015330ec..00000000000 --- a/grails-core/src/main/groovy/org/grails/core/util/SoftThreadLocalMap.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.core.util; - -import org.springframework.util.ConcurrentReferenceHashMap; - -import java.util.Map; - - -/** - * Creates a InheritableThreadLocal with an intial value of a Map. - * - * @author Graeme Rocher - * @since 0.6 - * - * @deprecated Do not use - */ -@SuppressWarnings({ "unchecked", "rawtypes" }) -@Deprecated -public class SoftThreadLocalMap extends InheritableThreadLocal { - - /** - * Creates an initial value of a Map. - */ - @Override - protected Map initialValue() { - return new ConcurrentReferenceHashMap(); - } -} diff --git a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java index 766ef3d7c8e..e306263e6f6 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java +++ b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java @@ -25,7 +25,6 @@ import org.grails.config.yaml.YamlPropertySourceLoader; import org.grails.core.AbstractGrailsClass; import org.grails.core.cfg.GroovyConfigPropertySourceLoader; -import org.grails.core.legacy.LegacyGrailsApplication; import org.grails.plugins.support.WatchPattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +54,6 @@ public abstract class AbstractGrailsPlugin extends GroovyObjectSupport implement private static final List DEFAULT_CONFIG_IGNORE_LIST = Arrays.asList("dataSource", "hibernate"); private static Resource basePluginResource = null; protected PropertySource propertySource; - protected org.codehaus.groovy.grails.commons.GrailsApplication application; protected GrailsApplication grailsApplication; protected boolean isBase = false; protected String version = "1.0"; @@ -83,7 +81,6 @@ public AbstractGrailsPlugin(Class pluginClass, GrailsApplication application) Assert.isTrue(pluginClass.getName().endsWith(TRAILING_NAME), "Argument [pluginClass] with value [" + pluginClass + "] is not a Grails plugin (class name must end with 'GrailsPlugin')"); - this.application = new LegacyGrailsApplication(application); this.grailsApplication = application; this.pluginClass = pluginClass; Resource resource = readPluginConfiguration(pluginClass); @@ -231,7 +228,7 @@ public void setManager(GrailsPluginManager manager) { * @see grails.plugins.GrailsPlugin#setApplication(grails.core.GrailsApplication) */ public void setApplication(GrailsApplication application) { - this.application = new LegacyGrailsApplication(application); + this.grailsApplication = application; } public String[] getEvictionNames() { diff --git a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPluginManager.java b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPluginManager.java index 92b76fc1a56..69570462c8b 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPluginManager.java +++ b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPluginManager.java @@ -44,7 +44,6 @@ import grails.core.ArtefactHandler; import grails.core.GrailsApplication; -import org.grails.core.legacy.LegacyGrailsApplication; import org.grails.plugins.support.WatchPattern; import org.grails.spring.RuntimeSpringConfiguration; import org.grails.io.support.GrailsResourceUtils; @@ -73,7 +72,7 @@ * @author Graeme Rocher * @since 0.4 */ -public abstract class AbstractGrailsPluginManager implements GrailsPluginManager, org.codehaus.groovy.grails.plugins.GrailsPluginManager { +public abstract class AbstractGrailsPluginManager implements GrailsPluginManager { private static final Log LOG = LogFactory.getLog(AbstractGrailsPluginManager.class); private static final String BLANK = ""; @@ -155,12 +154,6 @@ public void doRuntimeConfiguration(RuntimeSpringConfiguration springConfig) { converterRegistry = (ConverterRegistry)existingConversionService; } - converterRegistry.addConverter(new Converter() { - @Override - public org.codehaus.groovy.grails.commons.GrailsApplication convert(GrailsApplication source) { - return new LegacyGrailsApplication(source); - } - }); converterRegistry.addConverter(new Converter() { @Override public Object convert(NavigableMap.NullSafeNavigator source) { diff --git a/grails-core/src/main/groovy/org/grails/plugins/BinaryGrailsPlugin.java b/grails-core/src/main/groovy/org/grails/plugins/BinaryGrailsPlugin.java index 6abf729c82c..436aa482664 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/BinaryGrailsPlugin.java +++ b/grails-core/src/main/groovy/org/grails/plugins/BinaryGrailsPlugin.java @@ -140,7 +140,7 @@ protected void initializeViewMap(BinaryGrailsPluginDescriptor descriptor) { String viewName = view.toString(); final String viewClassName = viewsProperties.getProperty(viewName); try { - final Class viewClass = application.getClassLoader().loadClass(viewClassName); + final Class viewClass = grailsApplication.getClassLoader().loadClass(viewClassName); precompiledViewMap.put(viewName, viewClass); } catch (Throwable e) { throw new PluginException("Failed to initialize view ["+viewName+"] from plugin ["+ getName()+ "] : " + e.getMessage(), e); @@ -161,7 +161,7 @@ protected void initializeProvidedArtefacts(List classNames) { List artefacts = new ArrayList(); if (!classNames.isEmpty()) { - final ClassLoader classLoader = application.getClassLoader(); + final ClassLoader classLoader = grailsApplication.getClassLoader(); for (String className : classNames) { try { artefacts.add(classLoader.loadClass(className)); diff --git a/grails-core/src/main/groovy/org/grails/plugins/CoreGrailsPlugin.groovy b/grails-core/src/main/groovy/org/grails/plugins/CoreGrailsPlugin.groovy index 872ff36d2ae..8d104dfbc52 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/CoreGrailsPlugin.groovy +++ b/grails-core/src/main/groovy/org/grails/plugins/CoreGrailsPlugin.groovy @@ -23,7 +23,6 @@ import grails.util.BuildSettings import grails.util.Environment import grails.util.GrailsUtil import groovy.transform.CompileStatic -import org.grails.core.legacy.LegacyGrailsApplication import org.grails.spring.DefaultRuntimeSpringConfiguration import org.grails.spring.RuntimeSpringConfiguration import org.grails.spring.aop.autoproxy.GroovyAwareAspectJAwareAdvisorAutoProxyCreator @@ -83,7 +82,6 @@ class CoreGrailsPlugin extends Plugin { placeholderPrefix = placeHolderPrefix } grailsConfigProperties(ConfigProperties, config) - legacyGrailsApplication(LegacyGrailsApplication, application) // replace AutoProxy advisor with Groovy aware one if (ClassUtils.isPresent('org.aspectj.lang.annotation.Around', application.classLoader) && !config.getProperty(Settings.SPRING_DISABLE_ASPECTJ, Boolean)) { diff --git a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java index 68a3d7ef802..c6f246fc841 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java +++ b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java @@ -45,7 +45,6 @@ import grails.util.GrailsArrayUtils; import grails.util.GrailsClassUtils; import org.grails.core.io.CachingPathMatchingResourcePatternResolver; -import org.grails.core.legacy.LegacyGrailsApplication; import org.grails.core.io.SpringResource; import org.grails.core.exceptions.GrailsConfigurationException; import org.grails.spring.RuntimeSpringConfiguration; @@ -180,11 +179,11 @@ private void initialisePlugin(Class clazz) { Plugin p = (Plugin)plugin; p.setApplicationContext(applicationContext); p.setPlugin(this); - p.setGrailsApplication(((LegacyGrailsApplication)application).getGrailsApplication()); + p.setGrailsApplication(grailsApplication); p.setPluginManager(manager); } else if(plugin instanceof GrailsApplicationAware) { - ((GrailsApplicationAware)plugin).setGrailsApplication(((LegacyGrailsApplication)this.application).getGrailsApplication()); + ((GrailsApplicationAware)plugin).setGrailsApplication(grailsApplication); } pluginBean = new BeanWrapperImpl(plugin); @@ -507,11 +506,11 @@ public PathMatchingResourcePatternResolver getResolver() { } public ApplicationContext getParentCtx() { - return application.getParentContext(); + return grailsApplication.getParentContext(); } public BeanBuilder beans(Closure closure) { - BeanBuilder bb = new BeanBuilder(getParentCtx(), new GroovyClassLoader(application.getClassLoader())); + BeanBuilder bb = new BeanBuilder(getParentCtx(), new GroovyClassLoader(grailsApplication.getClassLoader())); bb.invokeMethod("beans", new Object[]{closure}); return bb; } @@ -680,28 +679,6 @@ public String toString() { return "[" + getName() + ":" + getVersion() + "]"; } - /** - * Monitors the plugin resources defined in the watchResources property for changes and - * fires onChange events by calling an onChange closure defined in the plugin (if it exists) - * - * @deprecated - */ - @Override - @Deprecated - public boolean checkForChanges() { - return false; // do nothing - } - - /** - * Restarts the container - * - * @deprecated Not needed any more due to the reload agent - */ - @Deprecated - public void restartContainer() { - // do nothing - } - public void setWatchedResources(Resource[] watchedResources) throws IOException { this.watchedResources = watchedResources; } @@ -728,11 +705,11 @@ public void setParentApplicationContext(ApplicationContext parent) { public void refresh() { // do nothing org.grails.io.support.Resource descriptor = getDescriptor(); - if (application == null || descriptor == null) { + if (grailsApplication == null || descriptor == null) { return; } - ClassLoader parent = application.getClassLoader(); + ClassLoader parent = grailsApplication.getClassLoader(); GroovyClassLoader gcl = new GroovyClassLoader(parent); try { initialisePlugin(gcl.parseClass(descriptor.getFile())); @@ -782,7 +759,7 @@ public Map notifyOfEvent(int eventKind, final Object source) { Map event = CollectionUtils.newMap( PLUGIN_CHANGE_EVENT_SOURCE, source, PLUGIN_CHANGE_EVENT_PLUGIN, plugin, - PLUGIN_CHANGE_EVENT_APPLICATION, application, + PLUGIN_CHANGE_EVENT_APPLICATION, grailsApplication, PLUGIN_CHANGE_EVENT_MANAGER, getManager(), PLUGIN_CHANGE_EVENT_CTX, applicationContext); @@ -878,7 +855,7 @@ public void doArtefactConfiguration() { Class artefactClass = (Class) artefact; if (ArtefactHandler.class.isAssignableFrom(artefactClass)) { try { - ((LegacyGrailsApplication)application).getGrailsApplication().registerArtefactHandler((ArtefactHandler) artefactClass.newInstance()); + grailsApplication.registerArtefactHandler((ArtefactHandler) artefactClass.newInstance()); } catch (InstantiationException e) { LOG.error("Cannot instantiate an Artefact Handler:" + e.getMessage(), e); @@ -892,7 +869,7 @@ public void doArtefactConfiguration() { } } else if (artefact instanceof ArtefactHandler) { - ((LegacyGrailsApplication)application).getGrailsApplication().registerArtefactHandler((ArtefactHandler) artefact); + grailsApplication.registerArtefactHandler((ArtefactHandler) artefact); } else { LOG.error("This object is not an ArtefactHandler:" + artefact + "[" + artefact.getClass().getName() + "]"); diff --git a/grails-core/src/main/groovy/org/grails/spring/beans/GrailsApplicationAwareBeanPostProcessor.java b/grails-core/src/main/groovy/org/grails/spring/beans/GrailsApplicationAwareBeanPostProcessor.java index 28a473d6ec2..848127538c7 100644 --- a/grails-core/src/main/groovy/org/grails/spring/beans/GrailsApplicationAwareBeanPostProcessor.java +++ b/grails-core/src/main/groovy/org/grails/spring/beans/GrailsApplicationAwareBeanPostProcessor.java @@ -18,7 +18,6 @@ import grails.core.GrailsApplication; import grails.core.support.GrailsApplicationAware; import grails.core.support.GrailsConfigurationAware; -import org.grails.core.legacy.LegacyGrailsApplication; import org.springframework.beans.BeansException; /** @@ -46,8 +45,6 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) thro public static void processAwareInterfaces(GrailsApplication grailsApplication, Object bean) { if (bean instanceof GrailsApplicationAware) { ((GrailsApplicationAware)bean).setGrailsApplication(grailsApplication); - } else if(bean instanceof org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware) { - ((org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware)bean).setGrailsApplication(new LegacyGrailsApplication(grailsApplication)); } if (bean instanceof GrailsConfigurationAware) { ((GrailsConfigurationAware)bean).setConfiguration(grailsApplication.getConfig()); diff --git a/grails-core/src/main/groovy/org/grails/spring/beans/PluginManagerAwareBeanPostProcessor.java b/grails-core/src/main/groovy/org/grails/spring/beans/PluginManagerAwareBeanPostProcessor.java index c8afd3a78e8..e74f270726b 100644 --- a/grails-core/src/main/groovy/org/grails/spring/beans/PluginManagerAwareBeanPostProcessor.java +++ b/grails-core/src/main/groovy/org/grails/spring/beans/PluginManagerAwareBeanPostProcessor.java @@ -51,8 +51,6 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) thro if (bean instanceof PluginManagerAware) { ((PluginManagerAware)bean).setPluginManager(pluginManager); - } else if(bean instanceof org.codehaus.groovy.grails.plugins.PluginManagerAware) { - ((org.codehaus.groovy.grails.plugins.PluginManagerAware)bean).setPluginManager((org.codehaus.groovy.grails.plugins.GrailsPluginManager)pluginManager); } } diff --git a/grails-core/src/main/groovy/org/grails/spring/beans/factory/GrailsPluginManagerFactoryBean.java b/grails-core/src/main/groovy/org/grails/spring/beans/factory/GrailsPluginManagerFactoryBean.java deleted file mode 100644 index ba1019260fc..00000000000 --- a/grails-core/src/main/groovy/org/grails/spring/beans/factory/GrailsPluginManagerFactoryBean.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2004-2006 Graeme Rocher - * - * 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.spring.beans.factory; - -import grails.plugins.GrailsPluginManager; -import grails.plugins.PluginManagerLoader; -import grails.util.Holders; -import groovy.lang.GroovyClassLoader; -import groovy.util.slurpersupport.GPathResult; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -import grails.core.GrailsApplication; -import org.grails.io.support.SpringIOUtils; -import grails.plugins.DefaultGrailsPluginManager; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.core.io.Resource; -import org.springframework.util.Assert; - -/** - * A factory bean for loading the GrailsPluginManager instance. - * - * @author Graeme Rocher - * @author Chanwit Kaewkasi - * @since 0.4 - * - * @deprecated Will be removed in a future version of Grails - */ -@Deprecated -public class GrailsPluginManagerFactoryBean implements FactoryBean, InitializingBean, ApplicationContextAware { - - public static final String PLUGIN_LOADER_CLASS = "org.codehaus.groovy.grails.project.plugins.GrailsProjectPluginLoader"; - private GrailsApplication application; - private GrailsPluginManager pluginManager; - private Resource descriptor; - private ApplicationContext applicationContext; - - public GrailsPluginManager getObject() { - return pluginManager; - } - - public Class getObjectType() { - return GrailsPluginManager.class; - } - - public boolean isSingleton() { - return true; - } - - public void afterPropertiesSet() throws Exception { - pluginManager = Holders.getPluginManager(); - - if (pluginManager == null) { - Assert.state(descriptor != null, "Cannot create PluginManager, /WEB-INF/grails.xml not found!"); - - if (!descriptor.exists()) { - PluginManagerLoader pluginLoader = (PluginManagerLoader) application - .getClassLoader() - .loadClass(PLUGIN_LOADER_CLASS) - .getConstructor(GrailsApplication.class) - .newInstance(application); - pluginManager = pluginLoader.loadPlugins(); - } - else { - - ClassLoader classLoader = application.getClassLoader(); - List> classes = new ArrayList>(); - InputStream inputStream = null; - - try { - inputStream = descriptor.getInputStream(); - - // Xpath: /grails/plugins/plugin, where root is /grails - GPathResult root = SpringIOUtils.createXmlSlurper().parse(inputStream); - GPathResult plugins = (GPathResult) root.getProperty("plugins"); - GPathResult nodes = (GPathResult) plugins.getProperty("plugin"); - - for (int i = 0, count = nodes.size(); i < count; i++) { - GPathResult node = (GPathResult) nodes.getAt(i); - final String pluginName = node.text(); - Class clazz; - if (classLoader instanceof GroovyClassLoader) { - clazz = classLoader.loadClass(pluginName); - } - else { - clazz = Class.forName(pluginName, true, classLoader); - } - if (!classes.contains(clazz)) { - classes.add(clazz); - } - } - } - finally { - if (inputStream != null) { - inputStream.close(); - } - } - - Class[] loadedPlugins = classes.toArray(new Class[classes.size()]); - - pluginManager = new DefaultGrailsPluginManager(loadedPlugins, application); - pluginManager.setApplicationContext(applicationContext); - Holders.setPluginManager(pluginManager); - pluginManager.loadPlugins(); - } - - } - - pluginManager.setApplication(application); - pluginManager.doArtefactConfiguration(); - application.initialise(); - } - - public void setGrailsDescriptor(Resource grailsDescriptor) { - descriptor = grailsDescriptor; - } - - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; - } - - /** - * @param application the application to set - */ - public void setApplication(GrailsApplication application) { - this.application = application; - } -} diff --git a/grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java b/grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java index 4831edee7b6..81b86cbfcd0 100644 --- a/grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java +++ b/grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java @@ -60,16 +60,6 @@ public class PluginAwareResourceBundleMessageSource extends ReloadableResourceBu private ConcurrentMap> cachedMergedBinaryPluginProperties = new ConcurrentHashMap>(); private long pluginCacheMillis = Long.MIN_VALUE; - @Deprecated - public List getPluginBaseNames() { - return pluginBaseNames; - } - - @Deprecated - public void setPluginBaseNames(List pluginBaseNames) { - this.pluginBaseNames = pluginBaseNames; - } - public void setGrailsApplication(GrailsApplication grailsApplication) { application = grailsApplication; } diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ApiDelegateSpec.groovy b/grails-core/src/test/groovy/grails/artefact/ApiDelegateSpec.groovy similarity index 96% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ApiDelegateSpec.groovy rename to grails-core/src/test/groovy/grails/artefact/ApiDelegateSpec.groovy index 03748381f9f..ac97f0f62e6 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ApiDelegateSpec.groovy +++ b/grails-core/src/test/groovy/grails/artefact/ApiDelegateSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.compiler.injection +package grails.artefact import spock.lang.Specification diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy b/grails-core/src/test/groovy/grails/spring/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy similarity index 94% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy rename to grails-core/src/test/groovy/grails/spring/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy index 3a4aba7beca..9b2970f846a 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy +++ b/grails-core/src/test/groovy/grails/spring/GrailsPlaceHolderConfigurerCorePluginRuntimeSpec.groovy @@ -1,6 +1,5 @@ -package org.codehaus.groovy.grails.commons.cfg +package grails.spring -import grails.spring.BeanBuilder import grails.core.DefaultGrailsApplication import org.grails.plugins.CoreGrailsPlugin import spock.lang.Issue diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceholderConfigurerSpec.groovy b/grails-core/src/test/groovy/grails/spring/GrailsPlaceholderConfigurerSpec.groovy similarity index 97% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceholderConfigurerSpec.groovy rename to grails-core/src/test/groovy/grails/spring/GrailsPlaceholderConfigurerSpec.groovy index d7eba602851..32fca260797 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/GrailsPlaceholderConfigurerSpec.groovy +++ b/grails-core/src/test/groovy/grails/spring/GrailsPlaceholderConfigurerSpec.groovy @@ -1,6 +1,5 @@ -package org.codehaus.groovy.grails.commons.cfg +package grails.spring -import grails.spring.BeanBuilder import grails.util.Holders import grails.core.DefaultGrailsApplication import org.grails.spring.context.support.GrailsPlaceholderConfigurer diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtilsSpec.groovy b/grails-core/src/test/groovy/grails/util/GrailsArrayUtilsSpec.groovy similarity index 98% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtilsSpec.groovy rename to grails-core/src/test/groovy/grails/util/GrailsArrayUtilsSpec.groovy index fb5a4887f2b..0b6be5b43d1 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsArrayUtilsSpec.groovy +++ b/grails-core/src/test/groovy/grails/util/GrailsArrayUtilsSpec.groovy @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.commons +package grails.util import grails.util.GrailsArrayUtils import spock.lang.Specification diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtilsSpec.groovy b/grails-core/src/test/groovy/grails/util/GrailsStringUtilsSpec.groovy similarity index 98% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtilsSpec.groovy rename to grails-core/src/test/groovy/grails/util/GrailsStringUtilsSpec.groovy index b4fbeca741d..09073e32167 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/commons/GrailsStringUtilsSpec.groovy +++ b/grails-core/src/test/groovy/grails/util/GrailsStringUtilsSpec.groovy @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.commons +package grails.util import grails.util.GrailsStringUtils import spock.lang.Specification diff --git a/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java b/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java index b4e76c5d37a..0b012dc6ed3 100644 --- a/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +++ b/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java @@ -14,18 +14,8 @@ */ package grails.util; -import groovy.util.XmlSlurper; -import groovy.util.slurpersupport.GPathResult; - -import java.io.IOException; -import java.io.StringWriter; - -import javax.xml.parsers.ParserConfigurationException; - import junit.framework.TestCase; -import org.xml.sax.SAXException; - /** * Tests for the GrailsUtils class. * @@ -42,19 +32,4 @@ public void testGrailsVersion() { protected void tearDown() throws Exception { System.setProperty(Environment.KEY, ""); } - - @SuppressWarnings("deprecation") - public void testWriteSlurperResult() throws SAXException, ParserConfigurationException, IOException { - String testXml = "" + - "MiseryStephen King" + - ""; - GPathResult result = new XmlSlurper().parseText(testXml); - - StringWriter output = new StringWriter(testXml.length() + 20); - GrailsUtil.writeSlurperResult(result, output); - - testXml = testXml.replaceAll("", ""); - testXml = testXml.replace('"', '\''); - assertEquals(testXml, output.toString()); - } } diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy b/grails-core/src/test/groovy/org/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy similarity index 97% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy rename to grails-core/src/test/groovy/org/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy index 9c2958874fc..58318796a01 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/compiler/injection/ASTValidationErrorsHelperSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.compiler.injection +package org.grails.compiler.injection import org.codehaus.groovy.ast.ClassNode import org.codehaus.groovy.classgen.GeneratorContext diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy b/grails-core/src/test/groovy/org/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy similarity index 96% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy rename to grails-core/src/test/groovy/org/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy index 4b59c7526a8..9de88590592 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/compiler/injection/GrailsArtefactTransformerSpec.groovy @@ -1,13 +1,10 @@ -package org.codehaus.groovy.grails.compiler.injection +package org.grails.compiler.injection import grails.artefact.Enhanced import grails.persistence.PersistenceMethod -import grails.util.GrailsUtil import org.codehaus.groovy.ast.AnnotationNode import org.codehaus.groovy.ast.ClassNode -import org.grails.compiler.injection.AbstractGrailsArtefactTransformer import grails.compiler.ast.ClassInjector -import org.grails.compiler.injection.GrailsAwareClassLoader import spock.lang.Specification class GrailsArtefactTransformerSpec extends Specification { diff --git a/grails-core/src/test/groovy/org/grails/config/YamlPropertySourceLoaderSpec.groovy b/grails-core/src/test/groovy/org/grails/config/YamlPropertySourceLoaderSpec.groovy index cf902db364e..c76144b3ebb 100644 --- a/grails-core/src/test/groovy/org/grails/config/YamlPropertySourceLoaderSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/config/YamlPropertySourceLoaderSpec.groovy @@ -1,9 +1,5 @@ package org.grails.config -import grails.core.DefaultGrailsApplication -import grails.core.GrailsApplication -import org.grails.config.yaml.YamlPropertySourceLoader -import org.springframework.core.env.Environment import org.grails.config.yaml.YamlPropertySourceLoader import org.springframework.core.io.FileSystemResource import org.springframework.core.io.Resource diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/core/io/ResourceLocatorSpec.groovy b/grails-core/src/test/groovy/org/grails/core/io/ResourceLocatorSpec.groovy similarity index 85% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/core/io/ResourceLocatorSpec.groovy rename to grails-core/src/test/groovy/org/grails/core/io/ResourceLocatorSpec.groovy index aa02e155e05..e835cdad804 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/core/io/ResourceLocatorSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/core/io/ResourceLocatorSpec.groovy @@ -1,13 +1,11 @@ -package org.codehaus.groovy.grails.core.io +package org.grails.core.io import grails.core.DefaultGrailsApplication import org.grails.plugins.BinaryGrailsPlugin import org.grails.plugins.BinaryGrailsPluginDescriptor -import org.codehaus.groovy.grails.plugins.MockBinaryPluginResource +import org.grails.plugins.MockBinaryPluginResource import org.grails.plugins.MockGrailsPluginManager -import org.codehaus.groovy.grails.plugins.TestBinaryGrailsPlugin -import org.grails.core.io.MockStringResourceLoader -import org.grails.core.io.DefaultResourceLocator +import org.grails.plugins.TestBinaryGrailsPlugin import org.springframework.core.io.ByteArrayResource import org.springframework.core.io.ResourceLoader @@ -53,14 +51,14 @@ class ResourceLocatorSpec extends Specification { BinaryGrailsPlugin getBinaryPlugin() { def str = ''' - org.codehaus.groovy.grails.plugins.TestBinaryGrailsPlugin + org.grails.plugins.TestBinaryGrailsPlugin ''' def xml = new XmlSlurper().parseText(str) def resource = new MockBinaryPluginResource(str.bytes) - def descriptor = new BinaryGrailsPluginDescriptor(resource, ['org.codehaus.groovy.grails.plugins.TestBinaryGrailsPlugin']) + def descriptor = new BinaryGrailsPluginDescriptor(resource, ['org.grails.plugins.TestBinaryGrailsPlugin']) resource.relativesResources['static/css/main.css'] = new ByteArrayResource(''.bytes) def binaryPlugin = new BinaryGrailsPlugin(TestBinaryGrailsPlugin, descriptor, new DefaultGrailsApplication()) } diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTraceFiltererSpec.groovy b/grails-core/src/test/groovy/org/grails/exception/reporting/StackTraceFiltererSpec.groovy similarity index 98% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTraceFiltererSpec.groovy rename to grails-core/src/test/groovy/org/grails/exception/reporting/StackTraceFiltererSpec.groovy index f4c8df5c59e..768a0b49846 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTraceFiltererSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/exception/reporting/StackTraceFiltererSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.exceptions +package org.grails.exception.reporting import org.grails.exceptions.reporting.DefaultStackTraceFilterer import spock.lang.Specification diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTracePrinterSpec.groovy b/grails-core/src/test/groovy/org/grails/exception/reporting/StackTracePrinterSpec.groovy similarity index 99% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTracePrinterSpec.groovy rename to grails-core/src/test/groovy/org/grails/exception/reporting/StackTracePrinterSpec.groovy index 2a9fd0a04a1..aeb28f27a1b 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/exceptions/StackTracePrinterSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/exception/reporting/StackTracePrinterSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.exceptions +package org.grails.exception.reporting import org.grails.core.exceptions.DefaultErrorsPrinter import org.grails.core.io.StaticResourceLocator diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/BinaryPluginSpec.groovy b/grails-core/src/test/groovy/org/grails/plugins/BinaryPluginSpec.groovy similarity index 86% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/BinaryPluginSpec.groovy rename to grails-core/src/test/groovy/org/grails/plugins/BinaryPluginSpec.groovy index 82a3f8df4f5..1f3d7b1476e 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/BinaryPluginSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/plugins/BinaryPluginSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.plugins +package org.grails.plugins import grails.core.DefaultGrailsApplication import org.grails.plugins.BinaryGrailsPlugin @@ -14,16 +14,16 @@ class BinaryPluginSpec extends Specification { @Shared String testBinary = ''' - org.codehaus.groovy.grails.plugins.TestBinaryGrailsPlugin + org.grails.plugins.TestBinaryGrailsPlugin - org.codehaus.groovy.grails.plugins.TestBinaryResource + org.grails.plugins.TestBinaryResource ''' def "Test creation of a binary plugin"() { when: - def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.codehaus.groovy.grails.plugins.TestBinaryResource']) + def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.grails.plugins.TestBinaryResource']) def binaryPlugin = new BinaryGrailsPlugin(TestBinaryGrailsPlugin, descriptor, new DefaultGrailsApplication()) then: @@ -37,7 +37,7 @@ class BinaryPluginSpec extends Specification { def "Test load static resource from binary plugin"() { when: def resource = new MockBinaryPluginResource(testBinary.getBytes('UTF-8')) - def descriptor = new BinaryGrailsPluginDescriptor(resource, ['org.codehaus.groovy.grails.plugins.TestBinaryResource']) + def descriptor = new BinaryGrailsPluginDescriptor(resource, ['org.grails.plugins.TestBinaryResource']) resource.relativesResources['static/css/main.css'] = new ByteArrayResource(''.bytes) def binaryPlugin = new BinaryGrailsPlugin(TestBinaryGrailsPlugin, descriptor, new DefaultGrailsApplication()) def cssResource = binaryPlugin.getResource("/css/main.css") @@ -53,7 +53,7 @@ class BinaryPluginSpec extends Specification { def "Test plugin with both plugin.yml and plugin.groovy throws exception"() { when: - def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.codehaus.groovy.grails.plugins.TestBinaryResource']) + def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.grails.plugins.TestBinaryResource']) MockConfigBinaryGrailsPlugin.YAML_EXISTS = true MockConfigBinaryGrailsPlugin.GROOVY_EXISTS = true new MockConfigBinaryGrailsPlugin(descriptor) @@ -64,7 +64,7 @@ class BinaryPluginSpec extends Specification { def "Test plugin with only plugin.yml"() { when: - def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.codehaus.groovy.grails.plugins.TestBinaryResource']) + def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.grails.plugins.TestBinaryResource']) MockConfigBinaryGrailsPlugin.YAML_EXISTS = true MockConfigBinaryGrailsPlugin.GROOVY_EXISTS = false def binaryPlugin = new MockConfigBinaryGrailsPlugin(descriptor) @@ -75,7 +75,7 @@ class BinaryPluginSpec extends Specification { def "Test plugin with only plugin.groovy"() { when: - def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.codehaus.groovy.grails.plugins.TestBinaryResource']) + def descriptor = new BinaryGrailsPluginDescriptor(new ByteArrayResource(testBinary.getBytes('UTF-8')), ['org.grails.plugins.TestBinaryResource']) MockConfigBinaryGrailsPlugin.YAML_EXISTS = false MockConfigBinaryGrailsPlugin.GROOVY_EXISTS = true def binaryPlugin = new MockConfigBinaryGrailsPlugin(descriptor) diff --git a/grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/support/WatchPatternParserSpec.groovy b/grails-core/src/test/groovy/org/grails/plugins/support/WatchPatternParserSpec.groovy similarity index 98% rename from grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/support/WatchPatternParserSpec.groovy rename to grails-core/src/test/groovy/org/grails/plugins/support/WatchPatternParserSpec.groovy index 2cecdc74079..657e79e4c54 100644 --- a/grails-core/src/test/groovy/org/codehaus/groovy/grails/plugins/support/WatchPatternParserSpec.groovy +++ b/grails-core/src/test/groovy/org/grails/plugins/support/WatchPatternParserSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.plugins.support +package org.grails.plugins.support import org.grails.plugins.support.WatchPatternParser import spock.lang.Specification diff --git a/grails-databinding/src/main/groovy/grails/databinding/SimpleDataBinder.groovy b/grails-databinding/src/main/groovy/grails/databinding/SimpleDataBinder.groovy index 8f2de659e5e..f1994caa359 100755 --- a/grails-databinding/src/main/groovy/grails/databinding/SimpleDataBinder.groovy +++ b/grails-databinding/src/main/groovy/grails/databinding/SimpleDataBinder.groovy @@ -28,8 +28,6 @@ import java.lang.reflect.Field import java.lang.reflect.ParameterizedType import grails.databinding.BindUsing -import org.grails.databinding.BindUsing as LegacyBindUsing -import org.grails.databinding.BindingFormat as LegacyBindingFormat import org.grails.databinding.ClosureValueConverter import org.grails.databinding.IndexedPropertyReferenceDescriptor import org.grails.databinding.converters.ConversionService @@ -501,7 +499,7 @@ class SimpleDataBinder implements DataBinder { try { def field = getField(obj.getClass(), propName) if (field) { - def annotation = field.getAnnotation(BindUsing) ?: field.getAnnotation(LegacyBindUsing) + def annotation = field.getAnnotation(BindUsing) if (annotation) { def valueClass = getValueOfBindUsing(annotation) if (Closure.isAssignableFrom(valueClass)) { @@ -509,7 +507,7 @@ class SimpleDataBinder implements DataBinder { converter = new ClosureValueConverter(converterClosure: closure.curry(obj), targetType: field.type) } } else { - annotation = field.getAnnotation(BindingFormat) ?: field.getAnnotation(LegacyBindingFormat) + annotation = field.getAnnotation(BindingFormat) if (annotation) { converter = getFormattedConverter field, getFormatString(annotation) } @@ -525,12 +523,10 @@ class SimpleDataBinder implements DataBinder { * @return the value Class of the annotation */ protected Class getValueOfBindUsing(Annotation annotation) { - assert annotation instanceof BindUsing || annotation instanceof LegacyBindUsing + assert annotation instanceof BindUsing def value if(annotation instanceof BindUsing) { value = ((BindUsing)annotation).value() - } else { - value = ((LegacyBindUsing)annotation).value() } value } @@ -540,12 +536,10 @@ class SimpleDataBinder implements DataBinder { * @return the value String of the annotation */ protected String getFormatString(Annotation annotation) { - assert annotation instanceof BindingFormat || annotation instanceof LegacyBindingFormat + assert annotation instanceof BindingFormat String formatString if(annotation instanceof BindingFormat) { formatString = ((BindingFormat)annotation).value() - } else { - formatString = ((LegacyBindingFormat)annotation).value() } formatString } @@ -553,7 +547,7 @@ class SimpleDataBinder implements DataBinder { protected ValueConverter getValueConverterForClass(obj, String propName) { def converter def objClass = obj.getClass() - def annotation = objClass.getAnnotation(BindUsing) ?: objClass.getAnnotation(LegacyBindUsing) + def annotation = objClass.getAnnotation(BindUsing) if (annotation) { def valueClass = getValueOfBindUsing(annotation) if (BindingHelper.isAssignableFrom(valueClass)) { diff --git a/grails-databinding/src/main/groovy/org/grails/databinding/BindUsing.groovy b/grails-databinding/src/main/groovy/org/grails/databinding/BindUsing.groovy deleted file mode 100644 index d482e552b0d..00000000000 --- a/grails-databinding/src/main/groovy/org/grails/databinding/BindUsing.groovy +++ /dev/null @@ -1,53 +0,0 @@ -package org.grails.databinding - - -import grails.databinding.BindingHelper -import grails.databinding.DataBindingSource - -import java.lang.annotation.Retention -import java.lang.annotation.RetentionPolicy - -/** - * This annotation may be applied to a class or to a field to - * customize the data binding process. - * - * When the annotation is applied to a field, the value assigned to the - * annotation should be a Closure which accepts 2 parameters. The first - * parameter is the object that data binding is being applied to. The second - * parameter is a {@link org.grails.databinding.DataBindingSource} containing the values being bound to the object. - * The value returned by the Closure will be bound to the field. The - * following code demonstrates using this technique to bind an upper - * case version of the value in the DataBindingSource to the field. - * -
-class SomeClass {
-    @BindUsing({
-        obj, source -> source['name']?.toUpperCase()
-    })
-    String name
-}
-
- * - * When the annotation is applied to a class, the value assigned to the - * annotation should be a class which implements the {@link BindingHelper} - * interface. An instance of that class will be used any time a value - * is bound to a property in the class that this annotation has been - * applied to. -
-@BindUsing(SomeClassWhichImplementsBindingHelper)
-class SomeClass {
-    String someProperty
-    Integer someOtherProperty
-}
-
- * - * @author Jeff Brown - * @since 2.3 - * @see BindingHelper - * @see DataBindingSource - * @deprecated Use {@link grails.databinding.BindUsing} - */ -@Retention(RetentionPolicy.RUNTIME) -public @interface BindUsing { - Class value() -} diff --git a/grails-databinding/src/main/groovy/org/grails/databinding/BindingFormat.groovy b/grails-databinding/src/main/groovy/org/grails/databinding/BindingFormat.groovy deleted file mode 100644 index d666077ad41..00000000000 --- a/grails-databinding/src/main/groovy/org/grails/databinding/BindingFormat.groovy +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * 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.databinding - -import java.lang.annotation.ElementType -import java.lang.annotation.Retention -import java.lang.annotation.RetentionPolicy -import java.lang.annotation.Target - -import org.codehaus.groovy.transform.GroovyASTTransformationClass - -/** - * Apply BindingFormat to a field to provide a format - * to be used when binding a String to this field. - * -
-class DateContainer {
-    @BindingFormat('MMddyyyy')
-    Date someDate
-}
-
- * - * @author Jeff Brown - * @since 2.3 - * @deprecated Use {@link grails.databinding.BindingFormat} - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -@GroovyASTTransformationClass("org.grails.databinding.compiler.BindingFormatASTTransformation") -public @interface BindingFormat { - String value() default ""; - String code() default ""; -} diff --git a/grails-databinding/src/test/groovy/grails/databinding/BindUsingSpec.groovy b/grails-databinding/src/test/groovy/grails/databinding/BindUsingSpec.groovy index 348c675319b..516bc057394 100755 --- a/grails-databinding/src/test/groovy/grails/databinding/BindUsingSpec.groovy +++ b/grails-databinding/src/test/groovy/grails/databinding/BindUsingSpec.groovy @@ -14,11 +14,6 @@ */ package grails.databinding -import grails.databinding.BindingHelper -import grails.databinding.DataBindingSource -import grails.databinding.SimpleDataBinder -import grails.databinding.SimpleMapDataBindingSource -import org.grails.databinding.BindUsing as LegacyBindUsing import spock.lang.Issue import spock.lang.Specification @@ -63,44 +58,6 @@ class BindUsingSpec extends Specification { obj.leaveIt == 30 } - void 'Test legacy BindUsing for specific property'() { - given: - def binder = new SimpleDataBinder() - def obj = new ClassWithLegacyBindUsingOnProperty() - - when: - binder.bind(obj, new SimpleMapDataBindingSource([name: 'Jeff Was Here'])) - - then: - 'JEFF WAS HERE' == obj.name - } - - @Issue('GRAILS-11048') - void 'Test legacy inheriting a property marked with BindUsing'() { - given: - def binder = new SimpleDataBinder() - def obj = new SubclassOfClassWithLegacyBindUsingOnProperty() - - when: - binder.bind(obj, new SimpleMapDataBindingSource([name: 'Jeff Was Here'])) - - then: - 'JEFF WAS HERE' == obj.name - } - - void 'Test legacy BindUsing on the class'() { - given: - def binder = new SimpleDataBinder() - def obj = new ClassWithLegacyBindUsing() - - when: - binder.bind(obj, new SimpleMapDataBindingSource([doubleIt: 9, tripleIt: 20, leaveIt: 30])) - - then: - obj.doubleIt == 18 - obj.tripleIt == 60 - obj.leaveIt == 30 - } } class ClassWithBindUsingOnProperty { @@ -134,22 +91,4 @@ class MultiplyingBindingHelper implements BindingHelper { } convertedValue } -} - - -class ClassWithLegacyBindUsingOnProperty { - @LegacyBindUsing({ - obj, source -> source['name']?.toUpperCase() - }) - String name -} - -class SubclassOfClassWithLegacyBindUsingOnProperty extends ClassWithLegacyBindUsingOnProperty { -} - -@LegacyBindUsing(MultiplyingBindingHelper) -class ClassWithLegacyBindUsing { - Integer leaveIt - Integer doubleIt - Integer tripleIt -} +} \ No newline at end of file diff --git a/grails-databinding/src/test/groovy/grails/databinding/SimpleDataBinderSpec.groovy b/grails-databinding/src/test/groovy/grails/databinding/SimpleDataBinderSpec.groovy index 402fa409ecc..9acf96f853a 100755 --- a/grails-databinding/src/test/groovy/grails/databinding/SimpleDataBinderSpec.groovy +++ b/grails-databinding/src/test/groovy/grails/databinding/SimpleDataBinderSpec.groovy @@ -14,14 +14,9 @@ */ package grails.databinding -import grails.databinding.SimpleDataBinder -import grails.databinding.SimpleMapDataBindingSource + import grails.databinding.errors.BindingError import grails.databinding.events.DataBindingListenerAdapter - -import grails.databinding.BindUsing -import org.grails.databinding.BindingFormat as LegacyBindingFormat -import grails.databinding.BindingFormat import org.grails.databinding.converters.DateConversionHelper import spock.lang.Ignore @@ -159,20 +154,6 @@ class SimpleDataBinderSpec extends Specification { obj.formattedUtilDate == nowDate } - @Issue('GRAILS-10925') - void 'Test binding a Date to a Date property marked with the legacy @BindingFormat'() { - given: - def binder = new SimpleDataBinder() - def obj = new DateContainer() - def nowDate = new Date() - - when: - binder.bind obj, [legacyFormattedUtilDate: nowDate] as SimpleMapDataBindingSource - - then: - obj.legacyFormattedUtilDate == nowDate - } - void 'Test listener is notified for properties in nested maps'() { given: def binder = new SimpleDataBinder() @@ -603,9 +584,6 @@ class DateContainer { @BindingFormat('MMddyyyy') Date formattedUtilDate - - @LegacyBindingFormat('MMddyyyy') - Date legacyFormattedUtilDate } enum Role { diff --git a/grails-databinding/src/test/groovy/org/grails/databinding/compiler/BindingFormatCompilationErrorsSpec.groovy b/grails-databinding/src/test/groovy/org/grails/databinding/compiler/BindingFormatCompilationErrorsSpec.groovy index b80367bea4f..79e5febae1f 100644 --- a/grails-databinding/src/test/groovy/org/grails/databinding/compiler/BindingFormatCompilationErrorsSpec.groovy +++ b/grails-databinding/src/test/groovy/org/grails/databinding/compiler/BindingFormatCompilationErrorsSpec.groovy @@ -20,24 +20,6 @@ class SomeClass { @grails.databinding.BindingFormat String someProperty } -''' - then: - MultipleCompilationErrorsException e = thrown() - e.message.contains 'The @BindingFormat annotation on the field [someProperty] in class [com.demo.SomeClass] must provide a value for either the value() or code() attribute.' - } - - void 'Test compiling with legacy @BindingFormat with no code and no value'() { - given: - def gcl = new GroovyClassLoader() - - when: - gcl.parseClass ''' -package com.demo - -class SomeClass { - @org.grails.databinding.BindingFormat - String someProperty -} ''' then: MultipleCompilationErrorsException e = thrown() diff --git a/grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java b/grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java index d678ecdbaab..c45397216b3 100644 --- a/grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java +++ b/grails-encoder/src/main/groovy/org/grails/buffer/StreamCharBuffer.java @@ -668,28 +668,6 @@ protected void emptyAfterReading() { allocBuffer.clear(); } - /** - * Reads the buffer to a char[]. - * - * @return the chars - * @deprecated use toCharArray() directly - */ - @Deprecated - public char[] readAsCharArray() { - return toCharArray(); - } - - /** - * Reads the buffer to a String. - * - * @return the String - * @deprecated Use toString() directly - */ - @Deprecated - public String readAsString() { - return toString(); - } - /** * {@inheritDoc} * diff --git a/grails-plugin-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy b/grails-plugin-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy index 8d1bd05b52c..68447414454 100644 --- a/grails-plugin-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy +++ b/grails-plugin-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy @@ -33,7 +33,6 @@ import groovy.json.StreamingJsonBuilder import groovy.transform.CompileStatic import groovy.util.slurpersupport.GPathResult import groovy.xml.StreamingMarkupBuilder -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods import org.grails.gsp.GroovyPageTemplate import org.grails.io.support.SpringIOUtils import org.grails.web.converters.Converter @@ -46,7 +45,6 @@ import org.grails.web.servlet.view.GroovyPageView import org.grails.web.sitemesh.GrailsLayoutDecoratorMapper import org.grails.web.sitemesh.GrailsLayoutView import org.grails.web.sitemesh.GroovyPageLayoutFinder -import org.grails.web.sitemesh.SitemeshLayoutView import org.grails.web.util.GrailsApplicationAttributes import org.springframework.beans.factory.NoSuchBeanDefinitionException import org.springframework.beans.factory.annotation.Autowired @@ -287,7 +285,7 @@ trait ResponseRenderer extends WebAttributes { model = [:] } - ((GroovyObject)this).setProperty ControllerDynamicMethods.MODEL_AND_VIEW_PROPERTY, new ModelAndView(viewUri, model) + ((GroovyObject)this).setProperty "modelAndView", new ModelAndView(viewUri, model) applySiteMeshLayout webRequest.currentRequest, true, explicitSiteMeshLayout } else if (argMap.containsKey(ARGUMENT_TEMPLATE)) { diff --git a/grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/metaclass/ForwardMethod.groovy b/grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/metaclass/ForwardMethod.groovy deleted file mode 100644 index 6181de8a731..00000000000 --- a/grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/metaclass/ForwardMethod.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.web.controllers.metaclass - -import groovy.transform.CompileStatic -import org.grails.web.util.GrailsApplicationAttributes - -/** - * Implements performing a forward. - * - * @author Graeme Rocher - * @since 1.1 - * - * @deprecated Use {@link GrailsApplicationAttributes} instead - */ -@CompileStatic -@Deprecated -class ForwardMethod { - public static final String IN_PROGRESS = GrailsApplicationAttributes.FORWARD_IN_PROGRESS - public static final String CALLED = GrailsApplicationAttributes.FORWARD_ISSUED -} diff --git a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy similarity index 97% rename from grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy rename to grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy index a6dc8153bc6..374711c5924 100644 --- a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy +++ b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerClosureActionOverridingSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.compiler.web +package org.grails.compiler.web import grails.compiler.ast.ClassInjector import grails.compiler.traits.ControllerTraitInjector diff --git a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy similarity index 97% rename from grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy rename to grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy index 5eff614c95d..d379c33291d 100644 --- a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy +++ b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerCompilationErrorsSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.compiler.web +package org.grails.compiler.web import grails.compiler.ast.ClassInjector diff --git a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerSpec.groovy b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerSpec.groovy similarity index 99% rename from grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerSpec.groovy rename to grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerSpec.groovy index d09bf9b30d1..cd50d02653d 100644 --- a/grails-plugin-controllers/src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerSpec.groovy +++ b/grails-plugin-controllers/src/test/groovy/org/grails/compiler/web/ControllerActionTransformerSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.compiler.web +package org.grails.compiler.web import grails.compiler.ast.ClassInjector import grails.compiler.traits.ControllerTraitInjector diff --git a/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java b/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java index 25f739b8a70..d312b947642 100644 --- a/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java +++ b/grails-plugin-converters/src/main/groovy/org/grails/web/converters/configuration/ConvertersConfigurationInitializer.java @@ -17,7 +17,6 @@ import grails.config.Config; import org.grails.config.PropertySourcesConfig; -import org.grails.core.cfg.DeprecatedGrailsConfig; import grails.converters.JSON; import grails.converters.XML; import grails.core.GrailsApplication; diff --git a/grails-plugin-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/DomainClassMarshaller.java b/grails-plugin-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/DomainClassMarshaller.java index c7d1d52e973..32ad42c1958 100644 --- a/grails-plugin-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/DomainClassMarshaller.java +++ b/grails-plugin-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/DomainClassMarshaller.java @@ -135,7 +135,7 @@ else if (referenceObject instanceof Collection) { GrailsDomainClass referencedDomainClass = property.getReferencedDomainClass(); // Embedded are now always fully rendered - if (referencedDomainClass == null || property.isEmbedded() || GrailsClassUtils.isJdk5Enum(property.getType())) { + if (referencedDomainClass == null || property.isEmbedded() || property.getType().isEnum()) { xml.convertAnother(referenceObject); } else if (property.isOneToOne() || property.isManyToOne() || property.isEmbedded()) { diff --git a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/CircularBidirectionalMapBySpec.groovy b/grails-plugin-domain-class/src/test/groovy/grails/persistence/CircularBidirectionalMapBySpec.groovy similarity index 96% rename from grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/CircularBidirectionalMapBySpec.groovy rename to grails-plugin-domain-class/src/test/groovy/grails/persistence/CircularBidirectionalMapBySpec.groovy index 31c6a92f183..8a5d208f21a 100644 --- a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/CircularBidirectionalMapBySpec.groovy +++ b/grails-plugin-domain-class/src/test/groovy/grails/persistence/CircularBidirectionalMapBySpec.groovy @@ -1,6 +1,5 @@ -package org.codehaus.groovy.grails.domain +package grails.persistence -import grails.persistence.Entity import grails.core.DefaultGrailsApplication import grails.core.GrailsDomainClass import spock.lang.Specification diff --git a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/DomainClassTraitSpec.groovy b/grails-plugin-domain-class/src/test/groovy/grails/persistence/DomainClassTraitSpec.groovy similarity index 95% rename from grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/DomainClassTraitSpec.groovy rename to grails-plugin-domain-class/src/test/groovy/grails/persistence/DomainClassTraitSpec.groovy index d133bb0bf5a..0374f06a600 100644 --- a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/DomainClassTraitSpec.groovy +++ b/grails-plugin-domain-class/src/test/groovy/grails/persistence/DomainClassTraitSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.domain +package grails.persistence import grails.core.DefaultGrailsApplication import grails.persistence.Entity diff --git a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/EntityTransformIncludesGormApiSpec.groovy b/grails-plugin-domain-class/src/test/groovy/grails/persistence/EntityTransformIncludesGormApiSpec.groovy similarity index 93% rename from grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/EntityTransformIncludesGormApiSpec.groovy rename to grails-plugin-domain-class/src/test/groovy/grails/persistence/EntityTransformIncludesGormApiSpec.groovy index b3acd9fbdde..58b68509df9 100644 --- a/grails-plugin-domain-class/src/test/groovy/org/codehaus/groovy/grails/domain/EntityTransformIncludesGormApiSpec.groovy +++ b/grails-plugin-domain-class/src/test/groovy/grails/persistence/EntityTransformIncludesGormApiSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.domain +package grails.persistence import spock.lang.Specification diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/JavascriptTagLib.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/JavascriptTagLib.groovy index 509eba09d4c..d7fe839d7a3 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/JavascriptTagLib.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/JavascriptTagLib.groovy @@ -98,7 +98,7 @@ class JavascriptTagLib implements ApplicationContextAware, TagLibrary { if (attrs.base) { attrs.uri = attrs.remove('base') + attrs.remove('src') } else { - def appBase = grailsAttributes.getApplicationUri(request) + def appBase = request.contextPath if (!appBase.endsWith('/')) { appBase += '/' } diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/UrlMappingTagLib.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/UrlMappingTagLib.groovy index 9205b7d8147..bbdbbd1040e 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/UrlMappingTagLib.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/UrlMappingTagLib.groovy @@ -5,7 +5,6 @@ import grails.gsp.TagLib import grails.util.TypeConvertingMap import grails.web.mapping.UrlMapping import groovy.transform.CompileStatic -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods import org.grails.encoder.CodecLookup import org.grails.encoder.Encoder import org.grails.taglib.TagOutput @@ -44,7 +43,7 @@ class UrlMappingTagLib implements TagLibrary{ Closure include = { Map attrs, body -> if (attrs.action && !attrs.controller) { def controller = request?.getAttribute(GrailsApplicationAttributes.CONTROLLER) - def controllerName = ((GroovyObject)controller)?.getProperty(ControllerDynamicMethods.CONTROLLER_NAME_PROPERTY) + def controllerName = ((GroovyObject)controller)?.getProperty("controllerName") attrs.controller = controllerName } diff --git a/grails-plugin-mimetypes/src/main/groovy/org/grails/web/mime/DefaultMimeTypeResolver.groovy b/grails-plugin-mimetypes/src/main/groovy/org/grails/web/mime/DefaultMimeTypeResolver.groovy index 73da8086da0..ae6f11d7c2d 100644 --- a/grails-plugin-mimetypes/src/main/groovy/org/grails/web/mime/DefaultMimeTypeResolver.groovy +++ b/grails-plugin-mimetypes/src/main/groovy/org/grails/web/mime/DefaultMimeTypeResolver.groovy @@ -25,7 +25,7 @@ import org.grails.web.servlet.mvc.GrailsWebRequest * @author Graeme Rocher * @since 2.3 */ -class DefaultMimeTypeResolver implements MimeTypeResolver, org.codehaus.groovy.grails.web.mime.MimeTypeResolver { +class DefaultMimeTypeResolver implements MimeTypeResolver { /** * Resolve the {@link grails.web.mime.MimeType} to be used for the response, typically established from the ACCEPT header diff --git a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/MimeUtilitySpec.groovy b/grails-plugin-mimetypes/src/test/groovy/grails/web/mime/MimeUtilitySpec.groovy similarity index 98% rename from grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/MimeUtilitySpec.groovy rename to grails-plugin-mimetypes/src/test/groovy/grails/web/mime/MimeUtilitySpec.groovy index 58ff7ff862b..a99fd378b86 100644 --- a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/MimeUtilitySpec.groovy +++ b/grails-plugin-mimetypes/src/test/groovy/grails/web/mime/MimeUtilitySpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mime +package grails.web.mime import grails.web.mime.MimeUtility import grails.core.DefaultGrailsApplication diff --git a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/AcceptHeaderParserTests.groovy b/grails-plugin-mimetypes/src/test/groovy/org/grails/web/mime/AcceptHeaderParserTests.groovy similarity index 99% rename from grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/AcceptHeaderParserTests.groovy rename to grails-plugin-mimetypes/src/test/groovy/org/grails/web/mime/AcceptHeaderParserTests.groovy index 17d864cacc3..4169c77d14d 100644 --- a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/web/mime/AcceptHeaderParserTests.groovy +++ b/grails-plugin-mimetypes/src/test/groovy/org/grails/web/mime/AcceptHeaderParserTests.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mime +package org.grails.web.mime import grails.util.Holders import grails.core.DefaultGrailsApplication diff --git a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/plugins/web/api/RequestAndResponseMimeTypesApiSpec.groovy b/grails-plugin-mimetypes/src/test/groovy/org/grails/web/servlet/mvc/RequestAndResponseMimeTypesApiSpec.groovy similarity index 99% rename from grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/plugins/web/api/RequestAndResponseMimeTypesApiSpec.groovy rename to grails-plugin-mimetypes/src/test/groovy/org/grails/web/servlet/mvc/RequestAndResponseMimeTypesApiSpec.groovy index fa0b19f7f2e..b697c3b5690 100644 --- a/grails-plugin-mimetypes/src/test/groovy/org/codehaus/groovy/grails/plugins/web/api/RequestAndResponseMimeTypesApiSpec.groovy +++ b/grails-plugin-mimetypes/src/test/groovy/org/grails/web/servlet/mvc/RequestAndResponseMimeTypesApiSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.plugins.web.api +package org.grails.web.servlet.mvc import grails.config.Config import grails.core.DefaultGrailsApplication import grails.core.GrailsApplication diff --git a/grails-plugin-rest/build.gradle b/grails-plugin-rest/build.gradle index b41ddd4057c..b7192a23807 100644 --- a/grails-plugin-rest/build.gradle +++ b/grails-plugin-rest/build.gradle @@ -4,5 +4,6 @@ dependencies { project(":grails-plugin-controllers"), project(":grails-plugin-datasource") - testCompile project(":grails-plugin-url-mappings") + testCompile project(":grails-plugin-url-mappings"), + project(":grails-test-suite-base") } diff --git a/grails-plugin-rest/src/main/groovy/grails/rest/RestfulController.groovy b/grails-plugin-rest/src/main/groovy/grails/rest/RestfulController.groovy index a7c89927314..dbed5afdaea 100644 --- a/grails-plugin-rest/src/main/groovy/grails/rest/RestfulController.groovy +++ b/grails-plugin-rest/src/main/groovy/grails/rest/RestfulController.groovy @@ -213,18 +213,6 @@ class RestfulController { return false } } - - /** - * This method is no longer used. - * - * @see #getObjectToBind - * @return The parameters - * @deprecated - */ - @Deprecated - protected Map getParametersToBind() { - params - } /** * The object that can be bound to a domain instance. Defaults to the request. Subclasses may override this diff --git a/grails-plugin-rest/src/main/groovy/grails/rest/render/Renderer.groovy b/grails-plugin-rest/src/main/groovy/grails/rest/render/Renderer.groovy index f4d52c7eb3d..96419d4aed5 100644 --- a/grails-plugin-rest/src/main/groovy/grails/rest/render/Renderer.groovy +++ b/grails-plugin-rest/src/main/groovy/grails/rest/render/Renderer.groovy @@ -23,7 +23,7 @@ import grails.web.mime.MimeTypeProvider * @author Graeme Rocher * @since 2.3 */ -interface Renderer extends MimeTypeProvider, org.codehaus.groovy.grails.web.mime.MimeTypeProvider{ +interface Renderer extends MimeTypeProvider { /** * @return The target type diff --git a/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/VndErrorRenderingSpec.groovy b/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/VndErrorRenderingSpec.groovy index 9413d04d3d6..a6266607526 100644 --- a/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/VndErrorRenderingSpec.groovy +++ b/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/VndErrorRenderingSpec.groovy @@ -1,5 +1,7 @@ package org.grails.plugins.web.rest.render +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.persistence.Entity import grails.rest.render.errors.VndErrorJsonRenderer import grails.rest.render.errors.VndErrorXmlRenderer @@ -9,7 +11,8 @@ import grails.web.CamelCaseUrlConverter import grails.web.mapping.LinkGenerator import grails.web.mapping.UrlMappingsHolder import grails.web.mime.MimeType - +import org.grails.spring.GrailsApplicationContext +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -19,7 +22,7 @@ import org.springframework.mock.web.MockServletContext import org.springframework.validation.BeanPropertyBindingResult import org.springframework.validation.Errors import org.springframework.web.context.request.RequestContextHolder - +import org.springframework.web.context.support.GenericWebApplicationContext import spock.lang.Specification /** @@ -112,7 +115,9 @@ class VndErrorRenderingSpec extends Specification{ return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalJsonRendererSpec.groovy b/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalJsonRendererSpec.groovy index 5ee3fb81667..52b9bc27e73 100644 --- a/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalJsonRendererSpec.groovy +++ b/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalJsonRendererSpec.groovy @@ -38,6 +38,7 @@ import org.grails.datastore.mapping.model.MappingContext import org.grails.datastore.mapping.model.PropertyMapping import org.grails.plugins.web.mime.MimeTypesFactoryBean import org.grails.plugins.web.rest.render.ServletRenderContext +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -810,7 +811,9 @@ class HalJsonRendererSpec extends Specification{ return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-plugin-testing/src/main/groovy/grails/test/mixin/web/ControllerUnitTestMixin.groovy b/grails-plugin-testing/src/main/groovy/grails/test/mixin/web/ControllerUnitTestMixin.groovy index 410a707cf60..24068640e74 100644 --- a/grails-plugin-testing/src/main/groovy/grails/test/mixin/web/ControllerUnitTestMixin.groovy +++ b/grails-plugin-testing/src/main/groovy/grails/test/mixin/web/ControllerUnitTestMixin.groovy @@ -27,7 +27,7 @@ import groovy.transform.TypeCheckingMode import org.grails.core.artefact.ControllerArtefactHandler import org.grails.plugins.testing.GrailsMockHttpServletRequest import org.grails.plugins.testing.GrailsMockHttpServletResponse -import org.grails.web.pages.GroovyPageUtils +import org.grails.web.pages.GroovyPagesUriSupport import org.grails.web.servlet.mvc.GrailsWebRequest import org.grails.web.util.GrailsApplicationAttributes import org.springframework.beans.factory.config.AutowireCapableBeanFactory @@ -131,7 +131,7 @@ class ControllerUnitTestMixin extends GrailsUnitTestMixin { } if (webRequest.controllerName && webRequest.actionName) { - GroovyPageUtils.getViewURI(webRequest.controllerName, webRequest.actionName) + new GroovyPagesUriSupport().getViewURI(webRequest.controllerName, webRequest.actionName) } else { return null diff --git a/grails-plugin-testing/src/main/groovy/org/grails/compiler/injection/test/DirtiesRuntimeTransformation.java b/grails-plugin-testing/src/main/groovy/org/grails/compiler/injection/test/DirtiesRuntimeTransformation.java index 8773f07b884..d556bf82a69 100644 --- a/grails-plugin-testing/src/main/groovy/org/grails/compiler/injection/test/DirtiesRuntimeTransformation.java +++ b/grails-plugin-testing/src/main/groovy/org/grails/compiler/injection/test/DirtiesRuntimeTransformation.java @@ -26,9 +26,9 @@ import org.codehaus.groovy.ast.MethodNode; import org.codehaus.groovy.control.CompilePhase; import org.codehaus.groovy.control.SourceUnit; -import org.codehaus.groovy.grails.compiler.injection.GrailsASTUtils; import org.codehaus.groovy.transform.ASTTransformation; import org.codehaus.groovy.transform.GroovyASTTransformation; +import org.grails.compiler.injection.GrailsASTUtils; /** * diff --git a/grails-shell/src/main/groovy/org/grails/cli/profile/codegen/ModelBuilder.groovy b/grails-shell/src/main/groovy/org/grails/cli/profile/codegen/ModelBuilder.groovy deleted file mode 100644 index 9dc72ddc5b9..00000000000 --- a/grails-shell/src/main/groovy/org/grails/cli/profile/codegen/ModelBuilder.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014 original authors - * - * 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.cli.profile.codegen - -import groovy.transform.CompileStatic -/** - * Used to build a Model for the purposes of codegen - * - * @author Graeme Rocher - * @since 3.0 - * @deprecated Use {@link grails.codegen.model.ModelBuilder} instead - */ -@CompileStatic -@Deprecated -trait ModelBuilder extends grails.codegen.model.ModelBuilder { - - -} diff --git a/grails-test/src/main/groovy/org/grails/support/MockApplicationContext.java b/grails-test-suite-base/src/main/groovy/org/grails/support/MockApplicationContext.java similarity index 99% rename from grails-test/src/main/groovy/org/grails/support/MockApplicationContext.java rename to grails-test-suite-base/src/main/groovy/org/grails/support/MockApplicationContext.java index 67976875fd8..b74b7db4fae 100644 --- a/grails-test/src/main/groovy/org/grails/support/MockApplicationContext.java +++ b/grails-test-suite-base/src/main/groovy/org/grails/support/MockApplicationContext.java @@ -42,12 +42,6 @@ import java.lang.annotation.Annotation; import java.util.*; -/** - * - * - * @deprecated Will be removed in a future version of Grails. Do not use - */ -@Deprecated public class MockApplicationContext extends GroovyObjectSupport implements WebApplicationContext { Date startupDate = new Date(); diff --git a/grails-test-suite-base/src/main/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy b/grails-test-suite-base/src/main/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy index b956f6e248f..c1f582c7c9a 100644 --- a/grails-test-suite-base/src/main/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy +++ b/grails-test-suite-base/src/main/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy @@ -244,7 +244,7 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase { messageSource = new StaticMessageSource() ctx.registerMockBean("manager", mockManager) ctx.registerMockBean("messageSource", messageSource) - ctx.registerMockBean("grailsApplication", grailsApplication) + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, grailsApplication) ctx.registerMockBean("conversionService", new DefaultConversionService()) ctx.registerMockBean(GroovyPagesUriService.BEAN_ID, new DefaultGroovyPagesUriService()) diff --git a/grails-test-suite-persistence/src/test/groovy/grails/web/databinding/GrailsWebDataBinderSpec.groovy b/grails-test-suite-persistence/src/test/groovy/grails/web/databinding/GrailsWebDataBinderSpec.groovy index 28162bc9250..6afa38565bc 100644 --- a/grails-test-suite-persistence/src/test/groovy/grails/web/databinding/GrailsWebDataBinderSpec.groovy +++ b/grails-test-suite-persistence/src/test/groovy/grails/web/databinding/GrailsWebDataBinderSpec.groovy @@ -27,7 +27,6 @@ import grails.test.mixin.domain.DomainClassUnitTestMixin import grails.validation.DeferredBindingActions import grails.validation.Validateable import org.apache.commons.lang.builder.CompareToBuilder -import org.grails.databinding.BindingFormat as LegacyBindingFormat import spock.lang.Ignore import spock.lang.Issue import spock.lang.Specification @@ -1259,27 +1258,6 @@ class GrailsWebDataBinderSpec extends Specification { !obj.hasErrors() } - @Issue('GRAILS-11174') - void 'Test binding null to a Date marked with the legacy @BindingFormat'() { - given: - def obj = new DataBindingBook() - - when: - binder.bind obj, [legacyDatePublished: null] as SimpleMapDataBindingSource - - then: - obj.legacyDatePublished == null - !obj.hasErrors() - - when: - obj.legacyDatePublished = new Date() - binder.bind obj, [legacyDatePublished: null] as SimpleMapDataBindingSource - - then: - obj.legacyDatePublished == null - !obj.hasErrors() - } - @Issue('GRAILS-11238') void 'Test binding to a property that hides a field of a different type'() { when: @@ -1327,29 +1305,6 @@ class GrailsWebDataBinderSpec extends Specification { !book.hasErrors() } - @Issue('GRAILS-11472') - void 'test binding an empty string to a Date marked with the legacy @BindingFormat'() { - given: - def book = new DataBindingBook() - - when: 'a valid date string is bound' - binder.bind book, [legacyDatePublished: '11151969'] as SimpleMapDataBindingSource - - then: 'the date is initialized' - !book.hasErrors() - book.legacyDatePublished - Calendar.NOVEMBER == book.legacyDatePublished.month - 15 == book.legacyDatePublished.date - 69 == book.legacyDatePublished.year - - when: 'an empty string is bound' - binder.bind book, [legacyDatePublished: ''] as SimpleMapDataBindingSource - - then: 'the date is null' - book.legacyDatePublished == null - !book.hasErrors() - } - void 'Test binding String to currency in a domain class'() { given: def publisher = new Publisher() @@ -1497,8 +1452,6 @@ class DataBindingBook { List topics @BindingFormat("MMddyyyy") Date datePublished - @LegacyBindingFormat("MMddyyyy") - Date legacyDatePublished static hasMany = [topics: String, importantPageNumbers: Integer] } diff --git a/grails-test-suite-uber/src/test/groovy/grails/test/mixin/support/GrailsUnitTestMixinGrailsApplicationAwareSpec.groovy b/grails-test-suite-uber/src/test/groovy/grails/test/mixin/support/GrailsUnitTestMixinGrailsApplicationAwareSpec.groovy index b34cecfb8a6..d01c4a214af 100644 --- a/grails-test-suite-uber/src/test/groovy/grails/test/mixin/support/GrailsUnitTestMixinGrailsApplicationAwareSpec.groovy +++ b/grails-test-suite-uber/src/test/groovy/grails/test/mixin/support/GrailsUnitTestMixinGrailsApplicationAwareSpec.groovy @@ -9,7 +9,6 @@ import spock.lang.Specification class GrailsUnitTestMixinGrailsApplicationAwareSpec extends Specification { static doWithSpring = { - someLegacyBean SomeLegacyBean someBean SomeBean } @@ -19,19 +18,9 @@ class GrailsUnitTestMixinGrailsApplicationAwareSpec extends Specification { then: 'the grailsApplication property is properly initialized' someBean.grailsApplication - - when: 'when a test registers a bean which implements the legacy GrailsApplicationAware' - someBean = applicationContext.someLegacyBean - - then: 'the grailsApplication property is properly initialized' - someBean.grailsApplication } } class SomeBean implements GrailsApplicationAware { GrailsApplication grailsApplication -} - -class SomeLegacyBean implements org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware { - org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication -} +} \ No newline at end of file diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/commons/GrailsPluginManagerTests.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/commons/GrailsPluginManagerTests.groovy index 77ae0857234..bb46eea015a 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/commons/GrailsPluginManagerTests.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/commons/GrailsPluginManagerTests.groovy @@ -1,5 +1,6 @@ package org.grails.commons +import grails.core.GrailsApplication import grails.plugins.GrailsPlugin import grails.plugins.GrailsPluginManager import org.grails.commons.test.AbstractGrailsMockTests @@ -143,7 +144,7 @@ hibernate { manager.loadPlugins() def parent = createMockApplicationContext() - parent.registerMockBean("grailsApplication", ga) + parent.registerMockBean(GrailsApplication.APPLICATION_ID, ga) def springConfig = new WebRuntimeSpringConfiguration(parent) springConfig.servletContext = createMockServletContext() @@ -160,7 +161,7 @@ hibernate { manager.loadPlugins() def parent = createMockApplicationContext() - parent.registerMockBean("grailsApplication", ga) + parent.registerMockBean(GrailsApplication.APPLICATION_ID, ga) def springConfig = new WebRuntimeSpringConfiguration(parent) springConfig.servletContext = createMockServletContext() diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/atom/AtomDomainClassRendererSpec.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/atom/AtomDomainClassRendererSpec.groovy index 392c6097391..fece55d9e9e 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/atom/AtomDomainClassRendererSpec.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/atom/AtomDomainClassRendererSpec.groovy @@ -17,6 +17,7 @@ import org.grails.plugins.web.mime.MimeTypesFactoryBean import org.grails.plugins.web.rest.render.ServletRenderContext import org.grails.plugins.web.rest.render.hal.Author import org.grails.plugins.web.rest.render.hal.Book +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -122,7 +123,9 @@ class AtomDomainClassRendererSpec extends Specification { return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassJsonRendererSpec.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassJsonRendererSpec.groovy index 8c4376f29c1..ee7a0b234f9 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassJsonRendererSpec.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassJsonRendererSpec.groovy @@ -18,6 +18,7 @@ import org.grails.datastore.mapping.keyvalue.mapping.config.KeyValueMappingConte import org.grails.datastore.mapping.model.MappingContext import org.grails.plugins.web.mime.MimeTypesFactoryBean import org.grails.plugins.web.rest.render.ServletRenderContext +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -145,7 +146,9 @@ class HalDomainClassJsonRendererSpec extends Specification { return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassXmlRendererSpec.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassXmlRendererSpec.groovy index a0c9ebf4260..e7b2d2124b6 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassXmlRendererSpec.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/plugins/web/rest/render/hal/HalDomainClassXmlRendererSpec.groovy @@ -15,6 +15,7 @@ import org.grails.datastore.mapping.keyvalue.mapping.config.KeyValueMappingConte import org.grails.datastore.mapping.model.MappingContext import org.grails.plugins.web.mime.MimeTypesFactoryBean import org.grails.plugins.web.rest.render.ServletRenderContext +import org.grails.support.MockApplicationContext import org.grails.web.converters.configuration.ConvertersConfigurationHolder import org.grails.web.converters.configuration.ConvertersConfigurationInitializer import org.grails.web.mapping.DefaultLinkGenerator @@ -149,7 +150,9 @@ class HalDomainClassXmlRendererSpec extends Specification { return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/validation/ConstraintsEvaluatingPropertyTests.java b/grails-test-suite-uber/src/test/groovy/org/grails/validation/ConstraintsEvaluatingPropertyTests.java index 8416fc24a1e..51d775aaccf 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/validation/ConstraintsEvaluatingPropertyTests.java +++ b/grails-test-suite-uber/src/test/groovy/org/grails/validation/ConstraintsEvaluatingPropertyTests.java @@ -32,12 +32,12 @@ protected void tearDown() throws Exception { } /* - * Test method for 'org.codehaus.groovy.grails.validation.metaclass.ConstraintsDynamicProperty.get(Object)' + * Test method for 'ConstraintsDynamicProperty.get(Object)' */ @SuppressWarnings("rawtypes") public void testGet() throws Exception { GroovyClassLoader gcl = new GroovyClassLoader(); - Class groovyClass = gcl.parseClass("package org.codehaus.groovy.grails.validation\n" + + Class groovyClass = gcl.parseClass("package org.grails.validation\n" + "class Test {\n" + " Long id\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app " Long version\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app @@ -56,7 +56,7 @@ public void testGet() throws Exception { * Test that static constraints work */ public void testStaticConstraints() throws Exception { - String classSource = "package org.codehaus.groovy.grails.validation\n" + + String classSource = "package org.grails.validation\n" + "class Test {\n" + " Long id\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app " Long version\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app @@ -74,7 +74,7 @@ public void testStaticConstraints() throws Exception { @SuppressWarnings("rawtypes") public void testNullableConstraint() throws Exception { String bookClassSource = - "package org.codehaus.groovy.grails.validation\n" + + "package org.grails.validation\n" + "class Book {\n" + " Long id\n" + " Long version\n" + @@ -125,7 +125,7 @@ public void testNullableConstraint() throws Exception { * Test that static constraints work */ public void testInheritedConstraints() throws Exception { - String classSource = "package org.codehaus.groovy.grails.validation\n" + + String classSource = "package org.grails.validation\n" + "class Test {\n" + " Long id\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app " Long version\n"+ // WE NEED this even though GORM 2 doesn't, as we're not a "domain" class within grails-app @@ -134,7 +134,7 @@ public void testInheritedConstraints() throws Exception { " name(nullable: false, validator : { 'called' })\n" + " }" + "}"; - String descendentSource = "package org.codehaus.groovy.grails.validation\n" + + String descendentSource = "package org.grails.validation\n" + "class TestB extends Test {\n" + " static constraints = {\n" + " name(size:5..20)\n" + diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/web/codecs/HTMLJSCodecIntegrationSpec.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/web/codecs/HTMLJSCodecIntegrationSpec.groovy index a57160f8331..f18dc168fd2 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/web/codecs/HTMLJSCodecIntegrationSpec.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/web/codecs/HTMLJSCodecIntegrationSpec.groovy @@ -1,8 +1,8 @@ -package org.grails.web.codecs; +package org.grails.web.codecs +import grails.core.GrailsApplication; import grails.util.GrailsWebMockUtil -import org.codehaus.groovy.grails.commons.GrailsApplication import org.grails.buffer.FastStringWriter import org.grails.commons.DefaultGrailsCodecClass import org.grails.commons.GrailsCodecClass diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/web/errors/GrailsExceptionResolverTests.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/web/errors/GrailsExceptionResolverTests.groovy index f87757e7c7a..3b7e8721080 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/web/errors/GrailsExceptionResolverTests.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/web/errors/GrailsExceptionResolverTests.groovy @@ -40,6 +40,7 @@ class GrailsExceptionResolverTests extends GroovyTestCase { @Override protected void setUp() throws Exception { + mockCtx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) super.setUp(); def mainContext = new MockApplicationContext(); mainContext.registerMockBean(UrlConverter.BEAN_NAME, new CamelCaseUrlConverter()); @@ -63,7 +64,7 @@ class GrailsExceptionResolverTests extends GroovyTestCase { } void testResolveExceptionToView() { - def mappings = new DefaultUrlMappingEvaluator(mockContext).evaluateMappings { + def mappings = new DefaultUrlMappingEvaluator(mockCtx).evaluateMappings { "500"(view:"myView") } @@ -91,7 +92,7 @@ class GrailsExceptionResolverTests extends GroovyTestCase { } void testResolveExceptionToController() { - def mappings = new DefaultUrlMappingEvaluator(mockContext).evaluateMappings { + def mappings = new DefaultUrlMappingEvaluator(mockCtx).evaluateMappings { "500"(controller:"foo", action:"bar") } @@ -121,7 +122,7 @@ class GrailsExceptionResolverTests extends GroovyTestCase { } void testResolveExceptionToControllerWhenResponseCommitted() { - def mappings = new DefaultUrlMappingEvaluator(mockContext).evaluateMappings { + def mappings = new DefaultUrlMappingEvaluator(mockCtx).evaluateMappings { "500"(controller:"foo", action:"bar") } diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy b/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy index da5c243e810..7c8b8049661 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy +++ b/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy @@ -2,7 +2,6 @@ package org.grails.web.servlet import org.grails.web.util.GrailsApplicationAttributes import org.springframework.mock.web.MockHttpServletRequest -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods import org.grails.buffer.StreamCharBuffer class DefaultGrailsApplicationAttributesTests extends GroovyTestCase { @@ -13,8 +12,8 @@ class DefaultGrailsApplicationAttributesTests extends GroovyTestCase { void setUp() { grailsApplicationAttributes = new DefaultGrailsApplicationAttributes(null) def controller = new Expando() - controller."${ControllerDynamicMethods.CONTROLLER_URI_PROPERTY}" = '/mycontroller' - controller."${ControllerDynamicMethods.CONTROLLER_NAME_PROPERTY}" = 'mycontroller' + controller.controllerUri = '/mycontroller' + controller.controllerName = 'mycontroller' request = new MockHttpServletRequest() request.setAttribute(GrailsApplicationAttributes.CONTROLLER, controller) } diff --git a/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/GrailsApplicationAttributesTests.java b/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/GrailsApplicationAttributesTests.java index 2e8cfb61f01..596b8a471e3 100644 --- a/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/GrailsApplicationAttributesTests.java +++ b/grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/GrailsApplicationAttributesTests.java @@ -10,7 +10,6 @@ import grails.core.GrailsClass; import org.grails.core.artefact.TagLibArtefactHandler; import org.grails.support.MockApplicationContext; -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockServletContext; @@ -33,8 +32,8 @@ public void testGetViewUri() throws Exception { GrailsApplicationAttributes attrs = new DefaultGrailsApplicationAttributes(new MockServletContext()); GroovyClassLoader gcl = new GroovyClassLoader(); Class controllerClass = gcl.parseClass("class TestController {\n" + - "def "+ControllerDynamicMethods.CONTROLLER_URI_PROPERTY+" = '/test'\n" + - "def "+ControllerDynamicMethods.CONTROLLER_NAME_PROPERTY+" = 'test'\n" + + "def controllerUri = '/test'\n" + + "def controllerName = 'test'\n" + "}"); MockHttpServletRequest request = new MockHttpServletRequest(); diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/binding/DataBindingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/binding/DataBindingTests.groovy index 493a4c8193c..f15fb657c88 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/binding/DataBindingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/binding/DataBindingTests.groovy @@ -1,6 +1,7 @@ package org.grails.web.binding import grails.artefact.Artefact +import grails.databinding.BindingFormat import grails.persistence.Entity import grails.test.mixin.Mock import grails.test.mixin.TestFor @@ -426,7 +427,7 @@ class BookReview { @Entity class MyBean { - @org.grails.databinding.BindingFormat('MMddyyyy') + @BindingFormat('MMddyyyy') Date formattedDate Integer someIntProperty Integer someOtherIntProperty diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/AbstractGrailsMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/AbstractGrailsMappingTests.groovy index 6fc25833ea7..cb84ce06928 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/AbstractGrailsMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/AbstractGrailsMappingTests.groovy @@ -10,7 +10,7 @@ abstract class AbstractGrailsMappingTests extends AbstractGrailsControllerTests protected void setUp() { super.setUp() - servletContext.setAttribute(GrailsApplication.APPLICATION_ID, ga) - evaluator = new DefaultUrlMappingEvaluator(servletContext) + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, ga) + evaluator = new DefaultUrlMappingEvaluator(ctx) } } diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluatorTests.java b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluatorTests.java index 893b67b1756..78d2dbba53f 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluatorTests.java +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluatorTests.java @@ -110,27 +110,6 @@ public void testNewMethod() throws Exception { assertEquals("234", mapping.match("/blog/test/234").getId()); } - public void testOldMethod() throws Exception { - GroovyShell shell = new GroovyShell(); - Script script = shell.parse ( - "mappings {\n" + - " \"/$controller/$action?/$id?\" { \n" + - " constraints {\n" + - " id(matches:/\\d+/)\n" + - " }\n" + - " }\n" + - "}\n"); - - DefaultUrlMappingEvaluator evaluator = new DefaultUrlMappingEvaluator(new MockServletContext("/test")); - List mappings = evaluator.evaluateMappings(script.getClass()); - assertEquals(1, mappings.size()); - assertNull(((UrlMapping) mappings.get(0)).getActionName()); - assertNull(((UrlMapping) mappings.get(0)).getControllerName()); - assertEquals("(*)",((UrlMapping) mappings.get(0)).getUrlData().getTokens()[0]); - assertEquals("(*)?",((UrlMapping) mappings.get(0)).getUrlData().getTokens()[1]); - assertEquals("(*)?",((UrlMapping) mappings.get(0)).getUrlData().getTokens()[2]); - } - public void testResourceMappingsWithVersionAndNamespace() throws Exception { GroovyShell shell = new GroovyShell(); Binding binding = new Binding(); diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DynamicActionNameEvaluatingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DynamicActionNameEvaluatingTests.groovy index 4a0e90228f6..b34133602a4 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DynamicActionNameEvaluatingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/DynamicActionNameEvaluatingTests.groovy @@ -1,7 +1,6 @@ package org.grails.web.mapping import org.springframework.core.io.* -import org.codehaus.groovy.grails.web.servlet.mvc.* class DynamicActionNameEvaluatingTests extends AbstractGrailsMappingTests { diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/IdUrlMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/IdUrlMappingTests.groovy index d65aeb5d09c..2afbf06f7dc 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/IdUrlMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/IdUrlMappingTests.groovy @@ -59,7 +59,6 @@ class ContentController { def res = new ByteArrayResource(mappingScript.bytes) - def evaluator = new DefaultUrlMappingEvaluator(servletContext) def mappings = evaluator.evaluateMappings(res) def holder = new DefaultUrlMappingsHolder(mappings) diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy index 6692d485d50..00fd015b65a 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy @@ -234,7 +234,7 @@ mappings { // mapping would be "/foo/$hello/bar def parser = new DefaultUrlMappingParser() - def m = new RegexUrlMapping(parser.parse('/foo/(*)/bar'), "test", "action", null, null, null, null,UrlMapping.ANY_VERSION, [cp] as ConstrainedProperty[], servletContext) + def m = new RegexUrlMapping(parser.parse('/foo/(*)/bar'), "test", "action", null, null, null, null,UrlMapping.ANY_VERSION, [cp] as ConstrainedProperty[], ga) def info = m.match("/foo/world/bar") assert info @@ -250,7 +250,7 @@ mappings { // mapping would be "/foo/$hello/bar def parser = new DefaultUrlMappingParser() - def m = new RegexUrlMapping(parser.parse('/foo/(*)/bar'), "test", "action", null, null, null, null, UrlMapping.ANY_VERSION,[cp] as ConstrainedProperty[], servletContext) + def m = new RegexUrlMapping(parser.parse('/foo/(*)/bar'), "test", "action", null, null, null, null, UrlMapping.ANY_VERSION,[cp] as ConstrainedProperty[], ga) def info = m.match("/foo/2007/bar") assert info @@ -295,12 +295,12 @@ mappings { void testInit() { def parser = new DefaultUrlMappingParser() - def m = new RegexUrlMapping(parser.parse("/(*)/hello"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,[] as ConstrainedProperty[], servletContext) + def m = new RegexUrlMapping(parser.parse("/(*)/hello"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,[] as ConstrainedProperty[], ga) } void testMatchUriNoConstraints() { def parser = new DefaultUrlMappingParser() - def m = new RegexUrlMapping(parser.parse("/foo/(*)/bar"), "test", null, null, null, null, null,UrlMapping.ANY_VERSION, [] as ConstrainedProperty[], servletContext) + def m = new RegexUrlMapping(parser.parse("/foo/(*)/bar"), "test", null, null, null, null, null,UrlMapping.ANY_VERSION, [] as ConstrainedProperty[], ga) def info = m.match("/foo/test/bar") assert info diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UriUrlMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UriUrlMappingTests.groovy index 35ee6be43af..d18eea6ee96 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UriUrlMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UriUrlMappingTests.groovy @@ -1,8 +1,11 @@ package org.grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.mapping.UrlMappingInfo import grails.web.mapping.UrlMappingsHolder import grails.web.mapping.exceptions.UrlMappingException +import org.grails.support.MockApplicationContext import org.springframework.core.io.ByteArrayResource import org.springframework.mock.web.MockServletContext import spock.lang.Shared @@ -21,7 +24,9 @@ class UriUrlMappingTests extends Specification { '''.bytes ByteArrayResource res = new ByteArrayResource(mapping) - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext("/test")) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def mappings = evaluator.evaluateMappings(res) holder = new DefaultUrlMappingsHolder(mappings) diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingEvaluatorTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingEvaluatorTests.groovy index 1301e133f3d..0c03afcf192 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingEvaluatorTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingEvaluatorTests.groovy @@ -51,7 +51,7 @@ mappings { void testEvaluateMappings() { def res = new ByteArrayResource(mappingScript.bytes) - def evaluator = new DefaultUrlMappingEvaluator(servletContext) + def evaluator = new DefaultUrlMappingEvaluator(applicationContext) def mappings = evaluator.evaluateMappings(res) assert mappings diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingTests.groovy index 902318be088..090cb202f29 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingTests.groovy @@ -27,7 +27,6 @@ mappings { void testReverseTopLevelMapping() { def res = new ByteArrayResource(topLevelMapping.bytes) - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext("/test")) def mappings = evaluator.evaluateMappings(res) def holder = new DefaultUrlMappingsHolder(mappings) diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingWithCustomValidatorTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingWithCustomValidatorTests.groovy index 08419a4e907..4e1c54990ca 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingWithCustomValidatorTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingWithCustomValidatorTests.groovy @@ -30,7 +30,7 @@ mappings { void setUp() { def res = new ByteArrayResource(topLevelMapping.bytes) - def evaluator = new DefaultUrlMappingEvaluator(servletContext) + def evaluator = new DefaultUrlMappingEvaluator(applicationContext) def mappings = evaluator.evaluateMappings(res) holder = new DefaultUrlMappingsHolder(mappings) diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderTests.groovy index 08bba07c2b2..636b62683d5 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderTests.groovy @@ -1,12 +1,9 @@ package org.grails.web.mapping -import org.grails.web.mapping.DefaultUrlMappingEvaluator -import org.grails.web.mapping.DefaultUrlMappingsHolder; import org.springframework.core.io.* import grails.test.mixin.TestMixin import grails.test.mixin.web.ControllerUnitTestMixin -import org.codehaus.groovy.grails.web.servlet.mvc.* import org.junit.Test import static org.junit.Assert.* diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/ViewUrlMappingTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/ViewUrlMappingTests.groovy index 2afaa7fe201..e617b87aa17 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/ViewUrlMappingTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/mapping/ViewUrlMappingTests.groovy @@ -31,7 +31,7 @@ mappings { void setUp() { def res = new ByteArrayResource(topLevelMapping.bytes) - def evaluator = new DefaultUrlMappingEvaluator(servletContext) + def evaluator = new DefaultUrlMappingEvaluator(applicationContext) def mappings = evaluator.evaluateMappings(res) holder = new DefaultUrlMappingsHolder(mappings) diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/pages/ParseTests.java b/grails-test-suite-web/src/test/groovy/org/grails/web/pages/ParseTests.java index 48d3c76a0de..32b1266628f 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/pages/ParseTests.java +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/pages/ParseTests.java @@ -1,5 +1,6 @@ package org.grails.web.pages; +import grails.config.Config; import grails.core.DefaultGrailsApplication; import grails.core.GrailsApplication; import grails.util.GrailsWebMockUtil; @@ -148,7 +149,6 @@ private GrailsWebRequest buildMockRequest(ConfigObject config) throws Exception DefaultGrailsApplication grailsApplication = new DefaultGrailsApplication(); grailsApplication.setConfig(config); - Holders.setConfig(new PropertySourcesConfig().merge(config)); appCtx.registerMockBean(GrailsApplication.APPLICATION_ID, grailsApplication); appCtx.getServletContext().setAttribute(GrailsApplicationAttributes.APPLICATION_CONTEXT, appCtx); appCtx.getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, appCtx); @@ -194,7 +194,7 @@ public String trimAndRemoveCR(String s) { public ParsedResult parseCode(String uri, String gsp) throws IOException { // Simulate what the parser does so we get it in the encoding expected - Object enc = GrailsWebUtil.currentFlatConfiguration().get("grails.views.gsp.encoding"); + Object enc = GrailsWebUtil.currentConfiguration().get("grails.views.gsp.encoding"); if ((enc == null) || (enc.toString().trim().length() == 0)) { enc = System.getProperty("file.encoding", "us-ascii"); } diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/ApplicationTagLibTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/ApplicationTagLibTests.groovy index eaa9ec12996..4d4fd836195 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/ApplicationTagLibTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/ApplicationTagLibTests.groovy @@ -344,7 +344,7 @@ class ApplicationTagLibTests extends AbstractGrailsTagTests { } void testSetTagWithBeanType() { - def template = '<%@ page import="org.codehaus.groovy.grails.commons.*" %>${request.myRequestVar.initialised}' + def template = '<%@ page import="grails.core.*" %>${request.myRequestVar.initialised}' assertOutputEquals('true', template) } diff --git a/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/JavascriptTagLibTests.groovy b/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/JavascriptTagLibTests.groovy index daa766806a0..06ebacc865c 100644 --- a/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/JavascriptTagLibTests.groovy +++ b/grails-test-suite-web/src/test/groovy/org/grails/web/taglib/JavascriptTagLibTests.groovy @@ -136,8 +136,8 @@ class TestUrlMappings { setRequestContext("/myapp") } - def setRequestContext(path) { - request.setAttribute(WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE, path) + def setRequestContext(String path) { + request.setContextPath(path) } def setupPluginController(tag) { @@ -169,7 +169,7 @@ class TestUrlMappings { assertOutputEquals('''\r\n''', template) } - void testJavascriptExpressionEncodeAsRaw() { + void testJavascriptExpressionEncodeAsRaw() { def template = '''var value='${'<>'.encodeAsRaw()}';''' assertOutputEquals('''\r\n''', template) } diff --git a/grails-validation/src/main/groovy/org/grails/validation/DefaultConstraintEvaluator.java b/grails-validation/src/main/groovy/org/grails/validation/DefaultConstraintEvaluator.java index 9cd50bbfebc..592af9f8f43 100644 --- a/grails-validation/src/main/groovy/org/grails/validation/DefaultConstraintEvaluator.java +++ b/grails-validation/src/main/groovy/org/grails/validation/DefaultConstraintEvaluator.java @@ -56,7 +56,7 @@ * @author Graeme Rocher * @since 2.0 */ -public class DefaultConstraintEvaluator implements ConstraintsEvaluator, org.codehaus.groovy.grails.validation.ConstraintsEvaluator { +public class DefaultConstraintEvaluator implements ConstraintsEvaluator { private static final Log LOG = LogFactory.getLog(DefaultConstraintEvaluator.class); private final Map defaultConstraints; diff --git a/grails-web-common/src/main/groovy/grails/util/GrailsWebUtil.java b/grails-web-common/src/main/groovy/grails/util/GrailsWebUtil.java index c18760a1a9b..07678ab5efd 100644 --- a/grails-web-common/src/main/groovy/grails/util/GrailsWebUtil.java +++ b/grails-web-common/src/main/groovy/grails/util/GrailsWebUtil.java @@ -96,17 +96,6 @@ public static Map currentConfiguration() { return application == null ? Collections.emptyMap() : application.getConfig(); } - /** - * @return The currently bound GrailsApplication instance - * @since 2.0 - * @deprecated Do not use the flat config - */ - @Deprecated - public static Map currentFlatConfiguration() { - GrailsApplication application = currentApplication(); - return application == null ? Collections.emptyMap() : application.getConfig(); - } - /** * Retrieves the URI from the request from either the include attribute or the request.getRequestURI() method. * diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/binding/bindingsource/DataBindingSourceRegistry.java b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/binding/bindingsource/DataBindingSourceRegistry.java deleted file mode 100644 index 4170a1c3b7b..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/binding/bindingsource/DataBindingSourceRegistry.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.binding.bindingsource; - -/** - * @deprecated Use {@link org.grails.web.databinding.bindingsource.DataBindingSourceRegistry} instead - */ -@Deprecated -interface DataBindingSourceRegistry extends org.grails.web.databinding.bindingsource.DataBindingSourceRegistry { -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ControllerDynamicMethods.groovy b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ControllerDynamicMethods.groovy deleted file mode 100644 index 52d1504b572..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ControllerDynamicMethods.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.metaclass -/** - * Holds constants that refer to the names of dynamic methods and properties within controllers - * - * TODO: Get rid of references to this class - * - * @author Graeme Rocher - * @since Oct 24, 2005 - * - * - * @deprecated - */ -@Deprecated -class ControllerDynamicMethods{ - - public static final String REQUEST_PROPERTY = "request"; - public static final String SERVLET_CONTEXT = "servletContext"; - public static final String FLASH_SCOPE_PROPERTY = "flash"; - public static final String GRAILS_ATTRIBUTES = "grailsAttributes"; - public static final String GRAILS_APPLICATION = "grailsApplication"; - public static final String RESPONSE_PROPERTY = "response"; - public static final String RENDER_VIEW_PROPERTY = "renderView"; - public static final String ERRORS_PROPERTY = "errors"; - public static final String HAS_ERRORS_METHOD = "hasErrors"; - public static final String MODEL_AND_VIEW_PROPERTY = "modelAndView"; - public static final String ACTION_URI_PROPERTY = "actionUri"; - public static final String CONTROLLER_URI_PROPERTY = "controllerUri"; - public static final String ACTION_NAME_PROPERTY = "actionName"; - public static final String CONTROLLER_NAME_PROPERTY = "controllerName"; - public static final String GET_VIEW_URI = "getViewUri"; - public static final String GET_TEMPLATE_URI = "getTemplateUri"; -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeType.java b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeType.java deleted file mode 100644 index 4659784f0d7..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeType.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.groovy.grails.web.mime; - -import java.util.Map; - -/** - * @deprecated Use {@link grails.web.mime.MimeType} instead - */ -@Deprecated -public class MimeType extends grails.web.mime.MimeType { - public MimeType(String name, Map params) { - super(name, params); - } - - public MimeType(String name) { - super(name); - } - - public MimeType(String name, String extension, Map params) { - super(name, extension, params); - } - - public MimeType(String name, String extension) { - super(name, extension); - } -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeProvider.java b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeProvider.java deleted file mode 100644 index 971cbf467a6..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeProvider.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mime; - -/** - * @deprecated Use {@link grails.web.mime.MimeTypeProvider} instead - */ -@Deprecated -public interface MimeTypeProvider extends grails.web.mime.MimeTypeProvider{ -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeResolver.java b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeResolver.java deleted file mode 100644 index 93df2010fbe..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeResolver.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mime; - -/** - * @deprecated Use {@link grails.web.mime.MimeTypeResolver} instead - */ -@Deprecated -public interface MimeTypeResolver extends grails.web.mime.MimeTypeResolver{ -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeUtils.java b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeUtils.java deleted file mode 100644 index eb140d76128..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/mime/MimeTypeUtils.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mime; - -/** - * @deprecated Use {@link grails.web.mime.MimeTypeUtils} instead - */ -@Deprecated -public class MimeTypeUtils extends grails.web.mime.MimeTypeUtils { -} diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesUriService.groovy b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesUriService.groovy deleted file mode 100644 index 5728f27436d..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesUriService.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.groovy.grails.web.pages - -/** - * @deprecated Use {@link grails.web.pages.GroovyPagesUriService} instead - */ -@Deprecated -public interface GroovyPagesUriService extends grails.web.pages.GroovyPagesUriService{ - -} \ No newline at end of file diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/FlashScope.groovy b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/FlashScope.groovy deleted file mode 100644 index 6950b0831c2..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/FlashScope.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet - -/** - * @author Graeme Rocher - * @deprecated Use {@link grails.web.mvc.FlashScope} instead - */ -public interface FlashScope extends grails.web.mvc.FlashScope{ - -} \ No newline at end of file diff --git a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsApplicationAttributes.groovy b/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsApplicationAttributes.groovy deleted file mode 100644 index 6232a2d9ecd..00000000000 --- a/grails-web-common/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsApplicationAttributes.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2004-2005 the original author or authors. - * - * 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.codehaus.groovy.grails.web.servlet - -/** - * @deprecated Use {@link org.grails.web.util.GrailsApplicationAttributes} instead - */ -public interface GrailsApplicationAttributes extends org.grails.web.util.GrailsApplicationAttributes { - -} \ No newline at end of file diff --git a/grails-web-common/src/main/groovy/org/grails/databinding/bindingsource/DataBindingSourceCreator.groovy b/grails-web-common/src/main/groovy/org/grails/databinding/bindingsource/DataBindingSourceCreator.groovy index 8e9bf0fc1b3..9ef57bbc754 100644 --- a/grails-web-common/src/main/groovy/org/grails/databinding/bindingsource/DataBindingSourceCreator.groovy +++ b/grails-web-common/src/main/groovy/org/grails/databinding/bindingsource/DataBindingSourceCreator.groovy @@ -25,10 +25,9 @@ import grails.web.mime.MimeTypeProvider * A factory for DataBindingSource instances * * @since 2.3 - * @see DataBindingSourceRegistry * @see DataBindingSource */ -interface DataBindingSourceCreator extends MimeTypeProvider, org.codehaus.groovy.grails.web.mime.MimeTypeProvider { +interface DataBindingSourceCreator extends MimeTypeProvider { /** * @return The target type of this creator diff --git a/grails-web-common/src/main/groovy/org/grails/web/json/parser/SimpleCharStream.java b/grails-web-common/src/main/groovy/org/grails/web/json/parser/SimpleCharStream.java index d33fdb945cb..cc925a691e8 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/json/parser/SimpleCharStream.java +++ b/grails-web-common/src/main/groovy/org/grails/web/json/parser/SimpleCharStream.java @@ -191,24 +191,6 @@ public char readChar() throws java.io.IOException { return c; } - /** - * @see #getEndColumn - * @deprecated - */ - @Deprecated - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @see #getEndLine - * @deprecated - */ - @Deprecated - public int getLine() { - return bufline[bufpos]; - } - /** * Get token end column number. */ diff --git a/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java b/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java index c4765244d82..382706d6850 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java +++ b/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java @@ -29,7 +29,7 @@ * @author Graeme Rocher * @since 1.2 */ -public class GroovyPagesUriSupport implements GroovyPagesUriService, org.codehaus.groovy.grails.web.pages.GroovyPagesUriService { +public class GroovyPagesUriSupport implements GroovyPagesUriService { public static final String PATH_TO_VIEWS = "/WEB-INF/grails-app/views"; private static final char SLASH = '/'; diff --git a/grails-web-common/src/main/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributes.java b/grails-web-common/src/main/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributes.java index ff5e093f431..2b1c9f53f22 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributes.java +++ b/grails-web-common/src/main/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributes.java @@ -24,7 +24,6 @@ import groovy.lang.GroovyObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods; import org.grails.gsp.ResourceAwareTemplateEngine; import org.grails.web.pages.DefaultGroovyPagesUriService; import org.grails.web.util.GrailsApplicationAttributes; @@ -50,7 +49,7 @@ * @author Graeme Rocher * @since 0.3 */ -public class DefaultGrailsApplicationAttributes implements GrailsApplicationAttributes, org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes { +public class DefaultGrailsApplicationAttributes implements GrailsApplicationAttributes { protected static final String DEFAULT_NAMESPACE = "g"; private static Log LOG = LogFactory.getLog(DefaultGrailsApplicationAttributes.class); @@ -129,7 +128,7 @@ private String getControllerName(ServletRequest request) { if (controllerName == null || controllerName.length() == 0) { GroovyObject controller = getController(request); if (controller != null) { - controllerName = (String)controller.getProperty(ControllerDynamicMethods.CONTROLLER_NAME_PROPERTY); + controllerName = (String)controller.getProperty("controllerName"); request.setAttribute(GrailsApplicationAttributes.CONTROLLER_NAME_ATTRIBUTE, controllerName); if(controller instanceof GrailsControllerClass) { String namespace = ((GrailsControllerClass)controller).getNamespace(); @@ -199,7 +198,7 @@ public String getViewUri(String viewName, HttpServletRequest request) { public String getControllerActionUri(ServletRequest request) { GroovyObject controller = getController(request); - return (String)controller.getProperty(ControllerDynamicMethods.ACTION_URI_PROPERTY); + return (String)controller.getProperty("actionUri"); } public Errors getErrors(ServletRequest request) { diff --git a/grails-web-common/src/main/groovy/org/grails/web/servlet/GrailsFlashScope.java b/grails-web-common/src/main/groovy/org/grails/web/servlet/GrailsFlashScope.java index fa841b39944..f4513779f37 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/servlet/GrailsFlashScope.java +++ b/grails-web-common/src/main/groovy/org/grails/web/servlet/GrailsFlashScope.java @@ -39,7 +39,7 @@ * @author Graeme Rocher */ @SuppressWarnings({"unchecked","rawtypes"}) -public class GrailsFlashScope implements FlashScope, org.codehaus.groovy.grails.web.servlet.FlashScope { +public class GrailsFlashScope implements FlashScope { private static final long serialVersionUID = 1457772347769500476L; private Map current = new ConcurrentHashMap(); diff --git a/grails-web-common/src/main/groovy/org/grails/web/servlet/mvc/GrailsWebRequest.java b/grails-web-common/src/main/groovy/org/grails/web/servlet/mvc/GrailsWebRequest.java index e51720aa8e2..dbe0b8c6913 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/servlet/mvc/GrailsWebRequest.java +++ b/grails-web-common/src/main/groovy/org/grails/web/servlet/mvc/GrailsWebRequest.java @@ -442,17 +442,6 @@ public static GrailsWebRequest lookup() { return webRequest; } - /** - * Looks up the GrailsApplication from the current request. - - * @return The GrailsWebRequest - * @deprecated Use {@link grails.util.Holders#findApplication()} instead - */ - @Deprecated - public static GrailsApplication lookupApplication() { - return Holders.findApplication(); - } - /** * Sets the id of the request. * @param id The id diff --git a/grails-web-common/src/main/groovy/org/grails/web/util/CacheEntry.java b/grails-web-common/src/main/groovy/org/grails/web/util/CacheEntry.java deleted file mode 100644 index cf8ff1ca250..00000000000 --- a/grails-web-common/src/main/groovy/org/grails/web/util/CacheEntry.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 the original author or authors. - * - * 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.web.util; - -import java.security.PrivilegedAction; -import java.util.concurrent.Callable; - - -/** - * Wrapper for a value inside a cache that adds timestamp information - * for expiration and prevents "cache storms" with a Lock. - * - * JMM happens-before is ensured with AtomicReference. - * - * Objects in cache are assumed to not change after publication. - * - * @author Lari Hotari - * @deprecated Use grails.util.CacheEntry - * @see grails.util.CacheEntry - */ -public class CacheEntry extends grails.util.CacheEntry { - public CacheEntry(T value) { - super(value); - } - - @Deprecated - public T getValue(long timeout, final PrivilegedAction updater) { - return super.getValue(timeout, new Callable() { - @Override - public T call() throws Exception { - return updater.run(); - } - }, false, null); - } -} diff --git a/grails-web-common/src/main/groovy/org/grails/web/util/GrailsApplicationAttributes.java b/grails-web-common/src/main/groovy/org/grails/web/util/GrailsApplicationAttributes.java index 436ca2dacf8..8a33fa03a66 100644 --- a/grails-web-common/src/main/groovy/org/grails/web/util/GrailsApplicationAttributes.java +++ b/grails-web-common/src/main/groovy/org/grails/web/util/GrailsApplicationAttributes.java @@ -33,7 +33,7 @@ * * @author Graeme Rocher */ -public interface GrailsApplicationAttributes extends ApplicationAttributes, org.codehaus.groovy.grails.commons.ApplicationAttributes { +public interface GrailsApplicationAttributes extends ApplicationAttributes { String PATH_TO_VIEWS = "/WEB-INF/grails-app/views"; String GSP_TEMPLATE_ENGINE = "org.grails.GSP_TEMPLATE_ENGINE"; @@ -94,9 +94,11 @@ public interface GrailsApplicationAttributes extends ApplicationAttributes, org. String getControllerUri(ServletRequest request); /** + * @deprecated Use {@link org.grails.web.servlet.mvc.GrailsWebRequest#getContextPath() instead} * @param request * @return The uri of the application relative to the server root */ + @Deprecated String getApplicationUri(ServletRequest request); /** diff --git a/grails-web-common/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy b/grails-web-common/src/test/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy similarity index 99% rename from grails-web-common/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy rename to grails-web-common/src/test/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy index ed2b20abed0..49a92ac758d 100644 --- a/grails-web-common/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy +++ b/grails-web-common/src/test/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.servlet.mvc +package grails.web.servlet.mvc import grails.web.servlet.mvc.GrailsParameterMap diff --git a/grails-web-databinding/src/main/groovy/grails/web/databinding/DataBindingUtils.java b/grails-web-databinding/src/main/groovy/grails/web/databinding/DataBindingUtils.java index 1e6c5f972c1..0d474239dcc 100644 --- a/grails-web-databinding/src/main/groovy/grails/web/databinding/DataBindingUtils.java +++ b/grails-web-databinding/src/main/groovy/grails/web/databinding/DataBindingUtils.java @@ -163,7 +163,7 @@ public static BindingResult bindObjectToDomainInstance(GrailsDomainClass domain, * @since 2.3 */ public static void bindToCollection(final Class targetType, final Collection collectionToPopulate, final CollectionDataBindingSource collectionBindingSource) throws InstantiationException, IllegalAccessException { - final GrailsApplication application = GrailsWebRequest.lookupApplication(); + final GrailsApplication application = Holders.findApplication(); GrailsDomainClass domain = null; if (application != null) { domain = (GrailsDomainClass) application.getArtefact(DomainClassArtefactHandler.TYPE,targetType.getName()); @@ -177,7 +177,7 @@ public static void bindToCollection(final Class targetType, final Collect } public static void bindToCollection(final Class targetType, final Collection collectionToPopulate, final ServletRequest request) throws InstantiationException, IllegalAccessException { - final GrailsApplication grailsApplication = GrailsWebRequest.lookupApplication(); + final GrailsApplication grailsApplication = Holders.findApplication(); final CollectionDataBindingSource collectionDataBindingSource = createCollectionDataBindingSource(grailsApplication, targetType, request); bindToCollection(targetType, collectionToPopulate, collectionDataBindingSource); } diff --git a/grails-web-databinding/src/main/groovy/grails/web/databinding/GrailsWebDataBinder.groovy b/grails-web-databinding/src/main/groovy/grails/web/databinding/GrailsWebDataBinder.groovy index 4128deda6e0..283fadb6af8 100644 --- a/grails-web-databinding/src/main/groovy/grails/web/databinding/GrailsWebDataBinder.groovy +++ b/grails-web-databinding/src/main/groovy/grails/web/databinding/GrailsWebDataBinder.groovy @@ -36,7 +36,6 @@ import org.codehaus.groovy.runtime.MetaClassHelper import org.codehaus.groovy.runtime.metaclass.ThreadManagedMetaBeanProperty import org.grails.core.artefact.AnnotationDomainClassArtefactHandler import org.grails.core.artefact.DomainClassArtefactHandler -import org.grails.databinding.BindingFormat as LegacyBindingFormat import org.grails.databinding.IndexedPropertyReferenceDescriptor import org.grails.databinding.xml.GPathResultMap import org.grails.web.databinding.DataBindingEventMulticastListener @@ -645,12 +644,10 @@ class GrailsWebDataBinder extends SimpleDataBinder { @Override protected String getFormatString(Annotation annotation) { - assert annotation instanceof BindingFormat || annotation instanceof LegacyBindingFormat + assert annotation instanceof BindingFormat def code if(annotation instanceof BindingFormat) { code = ((BindingFormat)annotation).code() - } else { - code = ((LegacyBindingFormat)annotation).code() } def formatString if(code) { diff --git a/grails-web-gsp/src/main/groovy/org/grails/web/pages/GroovyPageUtils.java b/grails-web-gsp/src/main/groovy/org/grails/web/pages/GroovyPageUtils.java deleted file mode 100644 index eb9be1143a3..00000000000 --- a/grails-web-gsp/src/main/groovy/org/grails/web/pages/GroovyPageUtils.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004-2005 Graeme Rocher - * - * 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.web.pages; - -import groovy.lang.GroovyObject; - -import org.grails.web.servlet.mvc.GrailsWebRequest; -import org.grails.web.pages.GroovyPagesUriSupport; -import org.springframework.web.context.request.RequestContextHolder; - -/** - * Methods to establish template names, paths and so on. - * - * Replaced by GroovyPagesUriService / GroovyPagesUriSupport - * - * @author Graeme Rocher - * @since 1.1.1 - * @deprecated - * @see org.grails.web.pages.DefaultGroovyPagesUriService - * @see GroovyPagesUriSupport - */ -@Deprecated -public class GroovyPageUtils { - - public static final String PATH_TO_VIEWS = GroovyPagesUriSupport.PATH_TO_VIEWS; - - private GroovyPageUtils() { - } - - private static GroovyPagesUriSupport getInstance() { - try { - GrailsWebRequest webRequest = (GrailsWebRequest)RequestContextHolder.currentRequestAttributes(); - return (GroovyPagesUriSupport)webRequest.getAttributes().getGroovyPagesUriService(); - } - catch (IllegalStateException e) { - // returning non cached version, just for backwards compatibility - return new GroovyPagesUriSupport(); - } - } - - /** - * Obtains a template URI for the given controller instance and template name - * @param controller The controller instance - * @param templateName The template name - * @return The template URI - */ - public static String getTemplateURI(GroovyObject controller, String templateName) { - return getInstance().getTemplateURI(controller, templateName); - } - - /** - * Obtains a view URI of the given controller and view name - * @param controller The name of the controller - * @param viewName The name of the view - * @return The view URI - */ - public static String getViewURI(GroovyObject controller, String viewName) { - return getInstance().getViewURI(controller, viewName); - } - - /** - * Obtains a view URI of the given controller and view name without the suffix - * @param controller The name of the controller - * @param viewName The name of the view - * @return The view URI - */ - public static String getNoSuffixViewURI(GroovyObject controller, String viewName) { - return getInstance().getNoSuffixViewURI(controller, viewName); - } - - /** - * Obtains the URI to a template using the controller name and template name - * @param controllerName The controller name - * @param templateName The template name - * @return The template URI - */ - public static String getTemplateURI(String controllerName, String templateName) { - return getInstance().getTemplateURI(controllerName, templateName); - } - - /** - * Obtains a view URI of the given controller name and view name - * @param controllerName The name of the controller - * @param viewName The name of the view - * @return The view URI - */ - public static String getViewURI(String controllerName, String viewName) { - return getInstance().getViewURI(controllerName, viewName); - } - - /** - * Obtains a view URI of the given controller name and view name without the suffix - * @param controllerName The name of the controller - * @param viewName The name of the view - * @return The view URI - */ - public static String getNoSuffixViewURI(String controllerName, String viewName) { - return getInstance().getNoSuffixViewURI(controllerName, viewName); - } - - /** - * Obtains a view URI when deployed within the /WEB-INF/grails-app/views context - * @param controllerName The name of the controller - * @param viewName The name of the view - * @return The view URI - */ - public static String getDeployedViewURI(String controllerName, String viewName) { - return getInstance().getDeployedViewURI(controllerName, viewName); - } -} diff --git a/grails-web-sitemesh/src/main/groovy/org/grails/web/sitemesh/GroovyPageLayoutFinder.java b/grails-web-sitemesh/src/main/groovy/org/grails/web/sitemesh/GroovyPageLayoutFinder.java index eefe2fd7889..9759e423506 100644 --- a/grails-web-sitemesh/src/main/groovy/org/grails/web/sitemesh/GroovyPageLayoutFinder.java +++ b/grails-web-sitemesh/src/main/groovy/org/grails/web/sitemesh/GroovyPageLayoutFinder.java @@ -24,13 +24,10 @@ import javax.servlet.http.HttpServletRequest; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import grails.util.GrailsClassUtils; import grails.util.GrailsStringUtils; import org.grails.core.artefact.ControllerArtefactHandler; import org.grails.io.support.GrailsResourceUtils; -import org.codehaus.groovy.grails.web.metaclass.ControllerDynamicMethods; import org.grails.web.servlet.mvc.GrailsWebRequest; import org.grails.web.util.GrailsApplicationAttributes; import org.grails.web.servlet.view.AbstractGrailsView; diff --git a/grails-web-url-mappings/build.gradle b/grails-web-url-mappings/build.gradle index 186c80c7bfa..10069e59613 100644 --- a/grails-web-url-mappings/build.gradle +++ b/grails-web-url-mappings/build.gradle @@ -28,4 +28,6 @@ dependencies { provided "org.fusesource.jansi:jansi:$jansiVersion" provided "jline:jline:$jlineVersion" + + testCompile project(":grails-test-suite-base") } diff --git a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/LinkGenerator.groovy b/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/LinkGenerator.groovy deleted file mode 100644 index fd85f501f72..00000000000 --- a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/LinkGenerator.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mapping - -/** - * @deprecated Use {@link grails.web.mapping.LinkGenerator} instead - */ -@Deprecated -public interface LinkGenerator extends grails.web.mapping.LinkGenerator{ -} \ No newline at end of file diff --git a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/ResponseRedirector.groovy b/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/ResponseRedirector.groovy deleted file mode 100644 index 83a3fbf0f24..00000000000 --- a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/ResponseRedirector.groovy +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.groovy.grails.web.mapping - -/** - * @deprecated Use {@link grails.web.mapping.ResponseRedirector} instead - */ -@Deprecated -class ResponseRedirector extends grails.web.mapping.ResponseRedirector{ - ResponseRedirector(grails.web.mapping.LinkGenerator linkGenerator) { - super(linkGenerator) - } -} diff --git a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappings.groovy b/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappings.groovy deleted file mode 100644 index 6ec1973bb9b..00000000000 --- a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappings.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mapping - -/** - * @deprecated Use {@link grails.web.mapping.UrlMappings} instead - */ -@Deprecated -public interface UrlMappings extends grails.web.mapping.UrlMappings, UrlMappingsHolder{ -} \ No newline at end of file diff --git a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolder.groovy b/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolder.groovy deleted file mode 100644 index accf0b7ecc3..00000000000 --- a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolder.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mapping - -/** - * @deprecated Use {@link grails.web.mapping.UrlMappingsHolder} instead - */ -@Deprecated -public interface UrlMappingsHolder extends grails.web.mapping.UrlMappingsHolder { -} \ No newline at end of file diff --git a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/mvc/RedirectEventListener.groovy b/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/mvc/RedirectEventListener.groovy deleted file mode 100644 index 38389f3091f..00000000000 --- a/grails-web-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/mvc/RedirectEventListener.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.groovy.grails.web.mapping.mvc - -/** - * @deprecated Use {@link grails.web.mapping.mvc.RedirectEventListener} instead - */ -@Deprecated -interface RedirectEventListener extends grails.web.mapping.mvc.RedirectEventListener{ -} diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/AbstractUrlMapping.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/AbstractUrlMapping.java index 48565c52245..73ff18abb4f 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/AbstractUrlMapping.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/AbstractUrlMapping.java @@ -97,21 +97,6 @@ protected AbstractUrlMapping(URI uri, ConstrainedProperty[] constraints, GrailsA setGrailsApplication(grailsApplication); } - @Deprecated - public AbstractUrlMapping(Object redirectInfo, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(redirectInfo, controllerName, actionName, namespace, pluginName, viewName, constraints, WebUtils.findApplication(servletContext)); - } - - @Deprecated - protected AbstractUrlMapping(Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(viewName, constraints, WebUtils.findApplication(servletContext)); - } - - @Deprecated - protected AbstractUrlMapping(URI uri, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(uri, constraints, WebUtils.findApplication(servletContext)); - } - @Override public String getHttpMethod() { return httpMethod; diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy index c2f7d03b6de..6668aba2107 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy @@ -54,7 +54,7 @@ import org.springframework.http.HttpMethod * @since 2.0 */ @CompileStatic -class DefaultLinkGenerator implements LinkGenerator, org.codehaus.groovy.grails.web.mapping.LinkGenerator, PluginManagerAware { +class DefaultLinkGenerator implements LinkGenerator, PluginManagerAware { private static final Pattern absoluteUrlPattern = Pattern.compile('^[A-Za-z][A-Za-z0-9+\\-.]*:.*$') diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluator.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluator.java index ef506c4867e..e8711b57abd 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluator.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingEvaluator.java @@ -94,16 +94,6 @@ public class DefaultUrlMappingEvaluator implements UrlMappingEvaluator, ClassLoa private ApplicationContext applicationContext; private GrailsApplication grailsApplication; - - /** - * @param servletContext The servlet context - * @deprecated Used DefaultUrLMappingsEvaluator(ApplicationContext) instead - */ - @Deprecated - public DefaultUrlMappingEvaluator(ServletContext servletContext) { - this(WebApplicationContextUtils.getWebApplicationContext(servletContext)); - } - public DefaultUrlMappingEvaluator(ApplicationContext applicationContext) { this.applicationContext = applicationContext; if (applicationContext != null) { diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingInfo.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingInfo.java index ea0a19895ac..3f9e00cbf70 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingInfo.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingInfo.java @@ -140,49 +140,6 @@ public DefaultUrlMappingInfo(Object uri,String httpMethod, UrlMappingData data, Assert.notNull(uri, "Argument [uri] cannot be null or blank"); } - /** - * @deprecated Use {@link #DefaultUrlMappingInfo(Object, java.util.Map, grails.web.mapping.UrlMappingData, grails.core.GrailsApplication)} instead - */ - @SuppressWarnings("rawtypes") - @Deprecated - public DefaultUrlMappingInfo(Object viewName, Map params, UrlMappingData urlData, ServletContext servletContext) { - this(viewName, params, urlData, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #DefaultUrlMappingInfo(Object, String, grails.web.mapping.UrlMappingData, grails.core.GrailsApplication)} instead - */ - @Deprecated - public DefaultUrlMappingInfo(Object uri,String httpMethod, UrlMappingData data, ServletContext servletContext) { - this(uri, httpMethod, data, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #DefaultUrlMappingInfo(Object, grails.web.mapping.UrlMappingData, grails.core.GrailsApplication)} instead - */ - @Deprecated - public DefaultUrlMappingInfo(Object uri, UrlMappingData data, ServletContext servletContext) { - this(uri, data, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #DefaultUrlMappingInfo(Object, Object, Object, Object, Object, Object, java.util.Map, grails.web.mapping.UrlMappingData, grails.core.GrailsApplication)} instead - */ - @Deprecated - public DefaultUrlMappingInfo(Object redirectInfo, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, Map params, - UrlMappingData urlData, ServletContext servletContext) { - this(redirectInfo, controllerName, actionName, namespace, pluginName, viewName, null, UrlMapping.ANY_VERSION, params, urlData, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #DefaultUrlMappingInfo(Object, Object, Object, Object, Object, Object, String, String, java.util.Map, grails.web.mapping.UrlMappingData, grails.core.GrailsApplication)} instead - */ - @Deprecated - public DefaultUrlMappingInfo(Object redirectInfo, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, - String httpMethod, String version, Map params, UrlMappingData urlData, ServletContext servletContext) { - this(redirectInfo, controllerName, actionName, namespace, pluginName, viewName,httpMethod,version, params, urlData, WebUtils.findApplication(servletContext)); - } - @Override public String getHttpMethod() { return httpMethod; diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingsHolder.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingsHolder.java index 489abd7afcd..a220baa6657 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingsHolder.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultUrlMappingsHolder.java @@ -62,7 +62,7 @@ * @since 0.4 */ @SuppressWarnings("rawtypes") -public class DefaultUrlMappingsHolder implements UrlMappings, org.codehaus.groovy.grails.web.mapping.UrlMappings { +public class DefaultUrlMappingsHolder implements UrlMappings { private static final transient Log LOG = LogFactory.getLog(DefaultUrlMappingsHolder.class); private static final int DEFAULT_MAX_WEIGHTED_CAPACITY = 5000; diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java index 3f7848ecf51..2715631d2f5 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java @@ -127,30 +127,6 @@ public RegexUrlMapping(Object redirectInfo, UrlMappingData data, Object controll parse(data, constraints); } - /** - * @deprecated Use {@link #RegexUrlMapping(grails.web.mapping.UrlMappingData, java.net.URI, grails.validation.ConstrainedProperty[], grails.core.GrailsApplication)} instead - */ - @Deprecated - public RegexUrlMapping(UrlMappingData data, URI uri, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(data, uri, constraints, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #RegexUrlMapping(grails.web.mapping.UrlMappingData, Object, Object, Object, Object, Object, String, String, grails.validation.ConstrainedProperty[], grails.core.GrailsApplication)} instead - */ - @Deprecated - public RegexUrlMapping(UrlMappingData data, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, String httpMethod, String version, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(data, controllerName, actionName, namespace, pluginName, viewName, httpMethod, version, constraints, WebUtils.findApplication(servletContext)); - } - - /** - * @deprecated Use {@link #RegexUrlMapping(Object, grails.web.mapping.UrlMappingData, Object, Object, Object, Object, Object, String, String, grails.validation.ConstrainedProperty[], grails.core.GrailsApplication)} instead - */ - @Deprecated - public RegexUrlMapping(Object redirectInfo, UrlMappingData data, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, String httpMethod, String version, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(redirectInfo, data, controllerName, actionName, namespace, pluginName, viewName, httpMethod, version, constraints, WebUtils.findApplication(servletContext)); - } - private void parse(UrlMappingData data, ConstrainedProperty[] constraints) { Assert.notNull(data, "Argument [data] cannot be null"); @@ -319,7 +295,7 @@ private String createURLInternal(Map paramValues, String encoding, boolean inclu if (includeContextPath) { GrailsWebRequest webRequest = (GrailsWebRequest) RequestContextHolder.getRequestAttributes(); if (webRequest != null) { - contextPath = webRequest.getAttributes().getApplicationUri(webRequest.getCurrentRequest()); + contextPath = webRequest.getContextPath(); } } if (paramValues == null) paramValues = Collections.emptyMap(); diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/ResponseCodeUrlMapping.java b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/ResponseCodeUrlMapping.java index f1f51ccf1d4..a9035ce4d48 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/ResponseCodeUrlMapping.java +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/ResponseCodeUrlMapping.java @@ -50,11 +50,6 @@ public ResponseCodeUrlMapping(UrlMappingData urlData, Object controllerName, Obj "Constraints can't be used for response code url mapping"); } - @Deprecated - public ResponseCodeUrlMapping(UrlMappingData urlData, Object controllerName, Object actionName, Object namespace, Object pluginName, Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext) { - this(null, controllerName, actionName, namespace, pluginName, viewName, constraints, WebUtils.findApplication(servletContext)); - } - public UrlMappingInfo match(String uri) { return null; } diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy similarity index 94% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy index 6b057a93a73..2e4efb88e0f 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package grails.web.mapping import grails.web.CamelCaseUrlConverter import grails.web.mapping.LinkGenerator diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy similarity index 88% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy index f3442eb2159..ec3b452e6ad 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/DefaultActionUrlMappingSpec.groovy @@ -1,7 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping - -import spock.lang.Specification - +package grails.web.mapping /** * @author Graeme Rocher */ diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy similarity index 92% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy index a48101c1c09..c61ea4788f5 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/DoubleWildcardUrlMappingSpec.groovy @@ -14,10 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.web.mapping - -import org.springframework.core.io.ByteArrayResource - +package grails.web.mapping /** */ class DoubleWildcardUrlMappingSpec extends AbstractUrlMappingsSpec{ diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy similarity index 98% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy index 3ec28765e12..48f73860d35 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package grails.web.mapping import grails.web.http.HttpHeaders import spock.lang.Issue @@ -35,7 +35,7 @@ class GroupedUrlMappingSpec extends AbstractUrlMappingsSpec { "/domains"(resources: 'domain') } } - def responseRedirector = new grails.web.mapping.ResponseRedirector(linkGenerator) + def responseRedirector = new ResponseRedirector(linkGenerator) HttpServletRequest request = Mock(HttpServletRequest) HttpServletResponse response = Mock(HttpServletResponse) diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy similarity index 96% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy index c37973388a2..f3bf8dd5039 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/MandatoryParamMappingSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package grails.web.mapping import spock.lang.Issue /** diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy similarity index 96% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy index 27da5a17d69..8fc97ee1322 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/OverlappingUrlMappingsMatchingSpec.groovy @@ -14,8 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.web.mapping - +package grails.web.mapping /** */ class OverlappingUrlMappingsMatchingSpec extends AbstractUrlMappingsSpec{ diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy similarity index 90% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy index c8664f27195..7876e2d277e 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/RegisterUrlMappingsAtRuntimeSpec.groovy @@ -1,7 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping - -import grails.web.mapping.UrlMappings - +package grails.web.mapping /** * @author Graeme Rocher */ diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy similarity index 99% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy index 186fab73f67..5e7600779b7 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/RestfulResourceMappingSpec.groovy @@ -1,7 +1,10 @@ -package org.codehaus.groovy.grails.web.mapping +package grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.mapping.LinkGenerator import grails.web.mapping.UrlMappingsHolder +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -1328,7 +1331,9 @@ class RestfulResourceMappingSpec extends Specification{ return generator; } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy similarity index 96% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy index 7cb4d41bf4f..7946a89135f 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingSizeConstraintSpec.groovy @@ -14,9 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.web.mapping - - +package grails.web.mapping /** * @author graemerocher */ diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy similarity index 98% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy index 0586f6f0e8d..74e8f955012 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/UrlMappingsWithOptionalExtensionSpec.groovy @@ -14,8 +14,7 @@ * limitations under the License. */ -package org.codehaus.groovy.grails.web.mapping - +package grails.web.mapping /** */ class UrlMappingsWithOptionalExtensionSpec extends AbstractUrlMappingsSpec { diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy similarity index 94% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy index 2a0dcfb5f95..942c991a8c6 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/grails/web/mapping/VersionedResourceMappingSpec.groovy @@ -1,6 +1,5 @@ -package org.codehaus.groovy.grails.web.mapping +package grails.web.mapping -import grails.web.mapping.UrlMapping import org.springframework.http.HttpMethod /** diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGeneratorSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/CachingLinkGeneratorSpec.groovy similarity index 98% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGeneratorSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/CachingLinkGeneratorSpec.groovy index f603c8630ac..e3fd5a9ce5d 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/CachingLinkGeneratorSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/CachingLinkGeneratorSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping import grails.util.GrailsWebMockUtil import org.grails.web.mapping.CachingLinkGenerator diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlCreatorTests.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/DefaultUrlCreatorTests.groovy similarity index 96% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlCreatorTests.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/DefaultUrlCreatorTests.groovy index de3c508d68c..2f11fbf408c 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlCreatorTests.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/DefaultUrlCreatorTests.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping import grails.util.GrailsWebMockUtil diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorSpec.groovy similarity index 97% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorSpec.groovy index 549ab9eb3f3..4ddca351ece 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping import grails.core.DefaultGrailsApplication import grails.plugins.DefaultGrailsPluginManager @@ -8,8 +8,6 @@ import grails.web.mapping.UrlCreator import grails.web.mapping.UrlMappingsHolder import org.grails.plugins.CoreGrailsPlugin -import org.grails.web.mapping.CachingLinkGenerator -import org.grails.web.mapping.DefaultLinkGenerator import org.springframework.mock.web.MockHttpServletRequest import org.springframework.web.context.request.RequestContextHolder @@ -279,11 +277,11 @@ class LinkGeneratorSpec extends Specification { when: def cacheKey = cachingGenerator.makeKey('somePrefix', [resource:w1]); then: - cacheKey == "somePrefix[resource:org.codehaus.groovy.grails.web.mapping.Widget->1]" + cacheKey == "somePrefix[resource:org.grails.web.mapping.Widget->1]" when: cacheKey = cachingGenerator.makeKey('somePrefix', [resource:w2]); then: - cacheKey == "somePrefix[resource:org.codehaus.groovy.grails.web.mapping.Widget->2]" + cacheKey == "somePrefix[resource:org.grails.web.mapping.Widget->2]" } def 'link should take into affect namespace'() { diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy similarity index 78% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy index 930b0afe9d0..4f8518c12c8 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithFormatSpec.groovy @@ -1,6 +1,9 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.CamelCaseUrlConverter +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -40,7 +43,9 @@ class LinkGeneratorWithFormatSpec extends Specification { protected getGenerator() { def generator = new DefaultLinkGenerator(baseUrl, context) - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) generator.urlMappingsHolder = new DefaultUrlMappingsHolder(evaluator.evaluateMappings(mappings ?: {})) generator.grailsUrlConverter = new CamelCaseUrlConverter() generator diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy similarity index 83% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy index 03f08a33341..0d1edb12c40 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy @@ -1,10 +1,12 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.CamelCaseUrlConverter +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder -import org.springframework.mock.web.MockServletContext import spock.lang.Specification /** @@ -27,7 +29,9 @@ class LinkGeneratorWithUrlMappingsSpec extends Specification{ protected getGenerator() { def generator = new DefaultLinkGenerator(baseUrl, context) - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) generator.urlMappingsHolder = new DefaultUrlMappingsHolder(evaluator.evaluateMappings(mappings ?: {})) generator.grailsUrlConverter = new CamelCaseUrlConverter() generator diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy similarity index 84% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy index 2c957046f95..42aa33eb708 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/OverlappingParametersReverseMappingSpec.groovy @@ -1,6 +1,9 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.CamelCaseUrlConverter +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -50,7 +53,9 @@ class OverlappingParametersReverseMappingSpec extends Specification{ protected getGenerator() { def generator = new DefaultLinkGenerator(baseUrl, context) - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) generator.urlMappingsHolder = new DefaultUrlMappingsHolder(evaluator.evaluateMappings(mappings ?: {})) generator.grailsUrlConverter = new CamelCaseUrlConverter() generator diff --git a/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy index f908c6aafbd..7bf7d1337fd 100644 --- a/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/RegexUrlMappingTests.groovy @@ -1,5 +1,6 @@ package org.grails.web.mapping +import grails.core.DefaultGrailsApplication import grails.web.mapping.UrlMapping import org.junit.Test import org.springframework.mock.web.MockServletContext @@ -30,17 +31,17 @@ class RegexUrlMappingTests { @Test void testComparable() { def parser = new DefaultUrlMappingParser() - def servletContext = new MockServletContext() - def m1 = new RegexUrlMapping(parser.parse("/foo/"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m2 = new RegexUrlMapping(parser.parse("/"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m3 = new RegexUrlMapping(parser.parse("/foo/bar/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m4 = new RegexUrlMapping(parser.parse("/foo/(*)/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m5 = new RegexUrlMapping(parser.parse("/(*)/foo/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m6 = new RegexUrlMapping(parser.parse("/foo/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m7 = new RegexUrlMapping(parser.parse("/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m8 = new RegexUrlMapping(parser.parse("/foo/(*)/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m9 = new RegexUrlMapping(parser.parse("/(*)/(*)/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) - def m10 = new RegexUrlMapping(parser.parse("/(*)/(*)/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, servletContext) + def application = new DefaultGrailsApplication() + def m1 = new RegexUrlMapping(parser.parse("/foo/"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m2 = new RegexUrlMapping(parser.parse("/"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m3 = new RegexUrlMapping(parser.parse("/foo/bar/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m4 = new RegexUrlMapping(parser.parse("/foo/(*)/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m5 = new RegexUrlMapping(parser.parse("/(*)/foo/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m6 = new RegexUrlMapping(parser.parse("/foo/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m7 = new RegexUrlMapping(parser.parse("/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m8 = new RegexUrlMapping(parser.parse("/foo/(*)/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m9 = new RegexUrlMapping(parser.parse("/(*)/(*)/bar"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) + def m10 = new RegexUrlMapping(parser.parse("/(*)/(*)/(*)"), "test", null, null, null, null, null, UrlMapping.ANY_VERSION,null, application) assertTrue m1.compareTo(m2) < 0 assertTrue m1.compareTo(m3) < 0 diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/StaticAndWildcardMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/StaticAndWildcardMappingSpec.groovy similarity index 82% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/StaticAndWildcardMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/StaticAndWildcardMappingSpec.groovy index 76281f9c18a..25e87522fde 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/StaticAndWildcardMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/StaticAndWildcardMappingSpec.groovy @@ -1,8 +1,6 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping -import grails.web.CamelCaseUrlConverter -import org.springframework.mock.web.MockServletContext -import spock.lang.Specification +import grails.web.mapping.AbstractUrlMappingsSpec import spock.lang.Issue /** diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingDataTests.java b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingDataTests.java similarity index 98% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingDataTests.java rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingDataTests.java index 47ecaad20e9..84a5a8d8190 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingDataTests.java +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingDataTests.java @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.codehaus.groovy.grails.web.mapping; +package org.grails.web.mapping; import grails.web.mapping.UrlMappingData; import grails.web.mapping.UrlMappingParser; diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsBindingSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsBindingSpec.groovy similarity index 97% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsBindingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsBindingSpec.groovy index 5cd3c4ed3dc..a4343126d99 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsBindingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsBindingSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy similarity index 85% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy index 8923d158703..a0169c33f53 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsHolderComparatorSpec.groovy @@ -1,9 +1,8 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping -import org.grails.web.mapping.DefaultUrlMappingEvaluator -import org.grails.web.mapping.DefaultUrlMappingParser -import org.grails.web.mapping.DefaultUrlMappingsHolder -import org.springframework.mock.web.MockServletContext +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication +import org.grails.support.MockApplicationContext import spock.lang.Issue import spock.lang.Specification @@ -32,8 +31,10 @@ class UrlMappingsHolderComparatorSpec extends Specification { @Issue('https://github.com/grails/grails-core/issues/665') void "Test that RegexUrlMapping doesn't violate its contract"() { when:"Url mappings are parsed" - def mappings = new DefaultUrlMappingEvaluator(new MockServletContext()) - .evaluateMappings(ComplexUrlMappings.mappings) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) + def mappings = evaluator.evaluateMappings(ComplexUrlMappings.mappings) then: new DefaultUrlMappingsHolder(mappings) diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy similarity index 85% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy index e733c761965..6bfaefe81e0 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/UrlMappingsWithHttpMethodSpec.groovy @@ -1,8 +1,11 @@ -package org.codehaus.groovy.grails.web.mapping +package org.grails.web.mapping +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication import grails.web.CamelCaseUrlConverter import grails.web.mapping.LinkGenerator import grails.web.mapping.UrlMappingsHolder +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultLinkGenerator import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder @@ -26,8 +29,9 @@ class UrlMappingsWithHttpMethodSpec extends Specification{ void "Test that the http method can be used as a prefix to URL mappings"() { given:"A URL mapping evaluator" - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) - + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) when:"The mappings are evaluated" def mappings = evaluator.evaluateMappings mappings @@ -78,7 +82,9 @@ class UrlMappingsWithHttpMethodSpec extends Specification{ return generator; } UrlMappingsHolder getUrlMappingsHolder() { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def mappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(mappings) } diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/UrlMappingsHandlerMappingSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMappingSpec.groovy similarity index 90% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/UrlMappingsHandlerMappingSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMappingSpec.groovy index f3d021d3e37..0a769751ec7 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/UrlMappingsHandlerMappingSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMappingSpec.groovy @@ -1,15 +1,12 @@ -package org.codehaus.groovy.grails.web.servlet.mvc +package org.grails.web.mapping.mvc import grails.artefact.Artefact import grails.core.DefaultGrailsApplication import grails.util.GrailsWebMockUtil import grails.web.Action -import org.codehaus.groovy.grails.web.mapping.AbstractUrlMappingsSpec +import grails.web.mapping.AbstractUrlMappingsSpec import org.grails.web.mapping.DefaultUrlMappingData import org.grails.web.mapping.DefaultUrlMappingInfo -import org.grails.web.mapping.mvc.GrailsControllerUrlMappings -import org.grails.web.mapping.mvc.UrlMappingsHandlerMapping -import org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter import org.springframework.web.context.request.RequestContextHolder import org.springframework.web.servlet.view.InternalResourceView diff --git a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy similarity index 94% rename from grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy rename to grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy index a11c6cca451..bfecdef1675 100644 --- a/grails-web-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy +++ b/grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/reporting/AnsiConsoleUrlMappingsRendererSpec.groovy @@ -1,5 +1,8 @@ -package org.codehaus.groovy.grails.web.mapping.reporting +package org.grails.web.mapping.reporting +import grails.core.DefaultGrailsApplication +import grails.core.GrailsApplication +import org.grails.support.MockApplicationContext import org.grails.web.mapping.DefaultUrlMappingEvaluator import org.grails.web.mapping.DefaultUrlMappingsHolder import grails.web.mapping.UrlMappingsHolder @@ -103,7 +106,9 @@ Controller: image '''.denormalize() } UrlMappingsHolder getUrlMappingsHolder(Closure mappings) { - def evaluator = new DefaultUrlMappingEvaluator(new MockServletContext()) + def ctx = new MockApplicationContext() + ctx.registerMockBean(GrailsApplication.APPLICATION_ID, new DefaultGrailsApplication()) + def evaluator = new DefaultUrlMappingEvaluator(ctx) def allMappings = evaluator.evaluateMappings mappings return new DefaultUrlMappingsHolder(allMappings) } diff --git a/grails-web/src/test/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolderSpec.groovy b/grails-web/src/test/groovy/grails/web/context/ServletContextHolderSpec.groovy similarity index 95% rename from grails-web/src/test/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolderSpec.groovy rename to grails-web/src/test/groovy/grails/web/context/ServletContextHolderSpec.groovy index 5a169cad88c..1c798c4cccf 100644 --- a/grails-web/src/test/groovy/org/codehaus/groovy/grails/web/context/ServletContextHolderSpec.groovy +++ b/grails-web/src/test/groovy/grails/web/context/ServletContextHolderSpec.groovy @@ -1,4 +1,4 @@ -package org.codehaus.groovy.grails.web.context +package grails.web.context import grails.util.GrailsWebMockUtil import grails.web.context.ServletContextHolder