Skip to content

Commit

Permalink
Refactor 'org.codehaus' -> 'org.grails' for 'grails-core'
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher authored and graemerocher committed Jun 19, 2014
1 parent b3c7b62 commit 5840984
Show file tree
Hide file tree
Showing 209 changed files with 557 additions and 2,330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.metaclass;
package org.codehaus.groovy.grails.commons

import groovy.transform.CompileStatic

/**
* An abstract class for implementors of dynamic getters to implement.
*
* @author Graeme Rocher
* @deprecated Use {@link grails.core.ArtefactHandlerAdapter} instead
*/
public abstract class AbstractDynamicProperty implements DynamicProperty {

private String propertyName;
@Deprecated
@CompileStatic
class ArtefactHandlerAdapter extends grails.core.ArtefactHandlerAdapter{

public AbstractDynamicProperty(String propertyName) {
this.propertyName = propertyName;
ArtefactHandlerAdapter(String type, Class<?> grailsClassType, Class<?> grailsClassImpl, String artefactSuffix) {
super(type, grailsClassType, grailsClassImpl, artefactSuffix)
}

public boolean isPropertyMatch(String propName) {
return propertyName.equals(propName);
ArtefactHandlerAdapter(String type, Class<?> grailsClassType, Class<?> grailsClassImpl, String artefactSuffix, boolean allowAbstract) {
super(type, grailsClassType, grailsClassImpl, artefactSuffix, allowAbstract)
}

public String getPropertyName() {
return propertyName;
}

public abstract Object get(Object object);
public abstract void set(Object object, Object newValue);
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
/*
* 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.metaclass;

/**
* <p>Interface for code that returns a value based on an input object.</p>
*
* @author Marc Palmer (marc@anyware.co.uk)
*/
public interface FunctionCallback {

Object execute(Object object);
}
/*
* 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.DomainClassArtefactHandler} instead
*/
@Deprecated
class DomainClassArtefactHandler extends org.grails.core.DomainClassArtefactHandler {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.metaclass;
package org.codehaus.groovy.grails.commons

/**
* Creates a Grails application object based on Groovy files.
*
* @author Steven Devijver
* @author Graeme Rocher
* @author Chanwit Kaewkasi
*
* @since 0.1
* @deprecated Use {@link org.grails.core.support.GrailsApplicationFactoryBean} instead
*/
public class InvocationCallback {

private boolean invoked = false;
private Object invoker;

public void markInvoked() {
invoked = true;
}

public boolean isInvoked() {
return invoked;
}

public Object getInvoker() {
return invoker;
}
@Deprecated
class GrailsApplicationFactoryBean extends org.grails.core.support.GrailsApplicationFactoryBean{

public void setInvoker(Object newInvoker) {
invoker = newInvoker;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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 {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.metaclass;
package org.codehaus.groovy.grails.commons

/**
* Simple concrete class implementation of AbstractDynamicMethods class.
*
* @author Graeme Rocher
* @since 0.4
* @deprecated Use {@link grails.util.GrailsClassUtils} instead
*/
public class DefaultDynamicMethods extends AbstractDynamicMethods {
public DefaultDynamicMethods(Class<?> theClass) {
clazz = theClass;
}
@Deprecated
class GrailsClassUtils extends grails.util.GrailsClassUtils {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.metaclass;

import groovy.lang.GroovyObject;
package org.codehaus.groovy.grails.commons

/**
* For dynamic methods applied to a Groovy object that registers itself with the GroovyObject instances
* meta class instance.
*
* @author Graeme Rocher
* @deprecated Use {@link org.grails.core.support.GrailsDomainConfigurationUtil} instead
*/
public class GroovyDynamicMethodsInterceptor extends AbstractDynamicMethodsInterceptor {

private ProxyMetaClass pmc;

public GroovyDynamicMethodsInterceptor(GroovyObject go) {
super(go.getClass(), false);
pmc = ProxyMetaClass.getInstance(go.getClass());
pmc.setInterceptor(this);
go.setMetaClass(pmc);
}
@Deprecated
class GrailsDomainConfigurationUtil extends org.grails.core.support.GrailsDomainConfigurationUtil {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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 {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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 {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.codehaus.groovy.grails.commons.cfg

import grails.core.GrailsApplication
import groovy.transform.CompileStatic

/**
* @author Graeme Rocher
* @deprecated Use {@link grails.config.GrailsConfig} instead
*/
@CompileStatic
@Deprecated
class GrailsConfig extends grails.config.GrailsConfig{
GrailsConfig(GrailsApplication grailsApplication) {
super(grailsApplication)
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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 {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.codehaus.groovy.grails.plugins.support.aware

/**
*
* @author Graeme Rocher
* @deprecated Use {@link grails.core.support.GrailsApplicationAware} instead
*/
@Deprecated
public interface GrailsApplicationAware extends grails.core.support.GrailsApplicationAware {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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{
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.utils
package grails.beans.utils

import groovy.transform.CompileStatic
import org.codehaus.groovy.grails.commons.ClassPropertyFetcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.metaclass;
package grails.beans.utils;

import groovy.lang.GroovySystem;
import groovy.lang.MetaBeanProperty;
Expand All @@ -34,7 +34,7 @@
import java.util.Set;

import grails.core.GrailsDomainClassProperty;
import org.codehaus.groovy.grails.commons.GrailsDomainConfigurationUtil;
import org.grails.core.support.GrailsDomainConfigurationUtil;
import org.springframework.util.Assert;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.grails.commons.cfg;
package grails.config;

import grails.config.Settings;
import groovy.util.ConfigObject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand All @@ -32,9 +31,8 @@
* @author Graeme Rocher
* @since 2.0
*/
public class GrailsConfig {
public class GrailsConfig implements Settings{

public static final String SPRING_PLACEHOLDER_PREFIX = Settings.SPRING_PLACEHOLDER_PREFIX;
private static final Log LOG = LogFactory.getLog(GrailsConfig.class);

private GrailsApplication grailsApplication;
Expand Down
Loading

0 comments on commit 5840984

Please sign in to comment.