Permalink
Browse files

refactor org.codehaus -> org.grails for grails-plugin-validation

This includes removing org.codehaus.groovy.grails.validation.Validateable.  The annotation is being deleted, not moved to grails-compatibility.  It has been deprecated for some time now in favor of grails.validation.Validateable and should no longer be used.
  • Loading branch information...
1 parent 05d9a2c commit f019fdfd425e36fc160bf65d3e5bd289af4858fe @jeffbrown jeffbrown committed Jun 19, 2014
@@ -722,7 +722,6 @@ protected void initializeAndValidateCommandObjectParameter(final BlockStatement
boolean argumentIsValidateable = GrailsASTUtils.hasAnyAnnotations(
commandObjectNode,
grails.validation.Validateable.class,
- org.codehaus.groovy.grails.validation.Validateable.class,
grails.persistence.Entity.class,
javax.persistence.Entity.class);
@@ -53,9 +53,9 @@
import org.codehaus.groovy.grails.compiler.injection.ASTErrorsHelper;
import org.codehaus.groovy.grails.compiler.injection.ASTValidationErrorsHelper;
import org.codehaus.groovy.grails.validation.ConstrainedProperty;
-import org.codehaus.groovy.grails.web.plugins.support.ValidationSupport;
import org.codehaus.groovy.syntax.Token;
import org.codehaus.groovy.syntax.Types;
+import org.grails.web.plugins.support.ValidationSupport;
public class DefaultASTValidateableHelper implements ASTValidateableHelper{
@@ -24,7 +24,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
-@GroovyASTTransformationClass("org.codehaus.groovy.grails.compiler.validation.ValidateableTransformation")
+@GroovyASTTransformationClass("org.grails.compiler.validation.ValidateableTransformation")
public @interface Validateable {
boolean nullable() default false;
}
@@ -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
-
-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
-
-/**
- * @deprecated Use {@link grails.validation.Validateable} instead.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target([ElementType.TYPE])
-@GroovyASTTransformationClass("org.codehaus.groovy.grails.compiler.validation.ValidateableTransformation")
-@interface Validateable {}
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.codehaus.groovy.grails.compiler.validation;
+package org.grails.compiler.validation;
import grails.validation.DefaultASTValidateableHelper;
@@ -30,8 +30,7 @@
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
public class ValidateableTransformation implements ASTTransformation{
- private static final ClassNode ORIGINAL_VALIDATEABLE_CLASS_NODE = new ClassNode(org.codehaus.groovy.grails.validation.Validateable.class);
- private static final ClassNode NEW_VALIDATEABLE_CLASS_NODE = new ClassNode(grails.validation.Validateable.class);
+ private static final ClassNode VALIDATEABLE_CLASS_NODE = new ClassNode(grails.validation.Validateable.class);
public void visit(ASTNode[] astNodes, SourceUnit source) {
if (!(astNodes[0] instanceof AnnotationNode) || !(astNodes[1] instanceof AnnotatedNode)) {
@@ -43,7 +42,7 @@ public void visit(ASTNode[] astNodes, SourceUnit source) {
AnnotatedNode parent = (AnnotatedNode) astNodes[1];
AnnotationNode node = (AnnotationNode) astNodes[0];
- if ( (!NEW_VALIDATEABLE_CLASS_NODE.equals(node.getClassNode()) && !ORIGINAL_VALIDATEABLE_CLASS_NODE.equals(node.getClassNode())) || !(parent instanceof ClassNode)) {
+ if (!VALIDATEABLE_CLASS_NODE.equals(node.getClassNode())) {
return;
}
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.codehaus.groovy.grails.plugins
+package org.grails.plugins.validation
import grails.util.GrailsUtil
import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU
import org.codehaus.groovy.grails.lifecycle.ShutdownOperations
import org.codehaus.groovy.grails.support.SoftThreadLocalMap
import org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilder
-import org.codehaus.groovy.grails.web.plugins.support.ValidationSupport
+import org.grails.web.plugins.support.ValidationSupport;
import org.springframework.context.ApplicationContext
import org.springframework.validation.BeanPropertyBindingResult
import org.springframework.validation.Errors
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.codehaus.groovy.grails.web.plugins.support
+package org.grails.web.plugins.support
import grails.util.Holders
import grails.validation.ValidationErrors
@@ -1,3 +1,3 @@
<plugin name='validation'>
- <type>org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin</type>
+ <type>org.grails.plugins.validation.ValidationGrailsPlugin</type>
</plugin>
@@ -1,5 +1,6 @@
package org.codehaus.groovy.grails.plugins
+import org.grails.plugins.validation.ValidationGrailsPlugin;
import org.springframework.context.support.GenericApplicationContext
import org.springframework.context.support.StaticMessageSource

0 comments on commit f019fdf

Please sign in to comment.