Skip to content

Commit

Permalink
Merge pull request #156 from codeconsole/7.0.x-remove-sitemesh
Browse files Browse the repository at this point in the history
Remove dependency on sitemesh 2
  • Loading branch information
codeconsole authored Oct 11, 2024
2 parents 8aeac5c + e5531e7 commit a89f5bf
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 81 deletions.
52 changes: 0 additions & 52 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
>>> dom4j-1.6.1
>>> hsqldb-1.8.0.10
>>> jline-2.11
>>> sitemesh-2.4
>>> slf4j-1.7.5


Expand Down Expand Up @@ -394,57 +393,6 @@ This software is distributable under the BSD license. See the terms of the
BSD license in the documentation provided with this software.


>>> sitemesh-2.4

The OpenSymphony Software License, Version 1.1

(this license is derived and fully compatible with the Apache Software
License - see http://www.apache.org/LICENSE.txt)

Copyright (c) 2001 The OpenSymphony Group. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

3. The end-user documentation included with the redistribution,
if any, must include the following acknowledgment:
"This product includes software developed by the
OpenSymphony Group (http://www.opensymphony.com/)."
Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.

4. The names "OpenSymphony" and "The OpenSymphony Group"
must not be used to endorse or promote products derived from this
software without prior written permission. For written
permission, please contact [email protected] .

5. Products derived from this software may not be called "OpenSymphony"
or "SiteMesh", nor may "OpenSymphony" or "SiteMesh" appear in their
name, without prior written permission of the OpenSymphony Group.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.


>>> slf4j-1.7.5

Copyright (c) 2004-2007 QOS.ch
Expand Down
3 changes: 0 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ micronaut-serde-jackson = '2.10.2'
objenesis = '3.3'
rxjava = '1.3.8'
rxjava2 = '2.2.21'
sitemesh = '2.4.4'
slf4j = '1.7.36'
spock = '2.3-groovy-4.0'
spring = '6.1.13'
Expand All @@ -27,14 +26,12 @@ grails-datastore-gorm = { module = 'org.grails:grails-datastore-gorm', version.r
grails-datastore-gorm-test = { module = 'org.grails:grails-datastore-gorm-test', version.ref = 'gorm' }
grails-web-common = { module = 'org.grails:grails-web-common', version.ref = 'grails' }
grails-web-mvc = { module = 'org.grails:grails-web-mvc', version.ref = 'grails' }
grails-web-sitemesh = { module = 'org.grails:grails-web-sitemesh', version.ref = 'grails-gsp' }
gpars = { module = 'org.codehaus.gpars:gpars', version.ref = 'gpars' }
groovy-core = { module = 'org.apache.groovy:groovy', version.ref = 'groovy' }
jakarta-annotation-api = { module = 'jakarta.annotation:jakarta.annotation-api', version.ref = 'jakarta-annotation-api' }
objenesis = { module = 'org.objenesis:objenesis', version.ref = 'objenesis' }
rxjava = { module = 'io.reactivex:rxjava', version.ref = 'rxjava' }
rxjava2 = { module = 'io.reactivex.rxjava2:rxjava', version.ref = 'rxjava2' }
sitemesh = { module = 'opensymphony:sitemesh', version.ref = 'sitemesh' }
slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j' }
slf4j-nop = { module = 'org.slf4j:slf4j-nop', version.ref = 'slf4j' }
servlet-api = { module = 'javax.servlet:javax.servlet-api', version = '4.0.1' }
Expand Down
2 changes: 0 additions & 2 deletions grails-plugin-async/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ dependencies {
api project(':grails-events-core')
api libs.grails.core
api libs.grails.web.common
api libs.grails.web.sitemesh
api libs.groovy.core
api libs.spring.beans
api libs.spring.context
api libs.spring.tx

implementation libs.grails.controllers
implementation libs.grails.web.mvc
implementation libs.sitemesh
implementation libs.spring.core
implementation libs.spring.web

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ import jakarta.servlet.AsyncListener

import grails.persistence.support.PersistenceContextInterceptor
import org.grails.web.servlet.mvc.GrailsWebRequest
import org.grails.web.sitemesh.GrailsContentBufferingResponse
import org.grails.web.sitemesh.GroovyPageLayoutFinder
import org.grails.web.util.WebUtils

import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext

import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse

Expand All @@ -43,16 +39,11 @@ class GrailsAsyncContext implements AsyncContext {

final @Delegate AsyncContext delegate
final GrailsWebRequest originalWebRequest
final GroovyPageLayoutFinder groovyPageLayoutFinder
final AsyncGrailsWebRequest asyncGrailsWebRequest

GrailsAsyncContext(AsyncContext delegate, GrailsWebRequest webRequest, AsyncGrailsWebRequest asyncGrailsWebRequest = null) {
this.delegate = delegate
originalWebRequest = webRequest
def applicationContext = webRequest.getApplicationContext()
if (applicationContext && applicationContext.containsBean("groovyPageLayoutFinder")) {
groovyPageLayoutFinder = applicationContext.getBean("groovyPageLayoutFinder", GroovyPageLayoutFinder)
}
this.asyncGrailsWebRequest = asyncGrailsWebRequest
}

Expand Down Expand Up @@ -82,21 +73,6 @@ class GrailsAsyncContext implements AsyncContext {
}

void complete() {
if (response instanceof GrailsContentBufferingResponse) {
GrailsContentBufferingResponse bufferingResponse = (GrailsContentBufferingResponse) response
def targetResponse = bufferingResponse.getTargetResponse()
def content = bufferingResponse.getContent()
final httpRequest = (HttpServletRequest) request
if (content != null && groovyPageLayoutFinder != null) {
com.opensymphony.sitemesh.Decorator decorator = (com.opensymphony.sitemesh.Decorator)groovyPageLayoutFinder?.findLayout(httpRequest, content)
if (decorator) {
decorator.render content,
new SiteMeshWebAppContext(httpRequest, targetResponse, request.servletContext)
} else {
content.writeOriginal(targetResponse.getWriter())
}
}
}
delegate.complete()
}

Expand Down

0 comments on commit a89f5bf

Please sign in to comment.