Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package renaming 'org.codehaus' to 'org.grails'
- Loading branch information
1 parent
4810b06
commit 8717a71
Showing
8 changed files
with
55 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
.../main/groovy/org/grails/plugins/web/async/WebRequestPromiseDecoratorLookupStrategy.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* 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.plugins.web.async | ||
|
||
import groovy.transform.CompileStatic | ||
import groovy.transform.TypeCheckingMode | ||
import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest | ||
import org.codehaus.groovy.grails.web.util.WebUtils | ||
import org.grails.async.decorator.PromiseDecorator | ||
import org.grails.async.decorator.PromiseDecoratorLookupStrategy | ||
|
||
/** | ||
* A promise decorated lookup strategy that binds a WebRequest to the promise thread | ||
* | ||
* @author Graeme Rocher | ||
* @since 2.3 | ||
*/ | ||
@CompileStatic | ||
class WebRequestPromiseDecoratorLookupStrategy implements PromiseDecoratorLookupStrategy { | ||
@Override | ||
List<PromiseDecorator> findDecorators() { | ||
final webRequest = GrailsWebRequest.lookup() | ||
if (webRequest) { | ||
return [new WebRequestPromiseDecorator(webRequest)] | ||
} | ||
return Collections.emptyList() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
grails-plugin-async/src/main/resources/META-INF/grails-plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<plugin name='controllers'> | ||
<type>org.codehaus.groovy.grails.plugins.web.async.ControllersAsyncGrailsPlugin</type> | ||
<type>org.grails.plugins.web.async.ControllersAsyncGrailsPlugin</type> | ||
</plugin> |