diff --git a/README.md b/README.md index bd7c75f..2c3c55c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Overview -OSGi bundle containing Groovy builders and metaclasses for AEM. The bundle exposes an API to implement extension "provider" services to register additional Groovy metaclasses in the container. +OSGi bundle containing Groovy builders and metaclasses for Adobe Experience Manager. The bundle exposes an API to implement extension "provider" services to register additional Groovy metaclasses in the container. ```groovy new NodeBuilder(session).content { diff --git a/aem-groovy-extension-bundle/pom.xml b/aem-groovy-extension-bundle/pom.xml index 57fa8a0..df790ef 100644 --- a/aem-groovy-extension-bundle/pom.xml +++ b/aem-groovy-extension-bundle/pom.xml @@ -4,7 +4,7 @@ com.icfolson.aem.groovy.extension aem-groovy-extension - 5.0.0 + 6.0.0 4.0.0 diff --git a/aem-groovy-extension-bundle/src/main/groovy/com/icfolson/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.groovy b/aem-groovy-extension-bundle/src/main/groovy/com/icfolson/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.groovy index d64c820..ed7e4d2 100644 --- a/aem-groovy-extension-bundle/src/main/groovy/com/icfolson/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.groovy +++ b/aem-groovy-extension-bundle/src/main/groovy/com/icfolson/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.groovy @@ -13,7 +13,6 @@ import javax.jcr.PropertyType import javax.jcr.Session import javax.jcr.Value import javax.servlet.ServletRequest -import javax.servlet.jsp.JspContext /** * This default metaclass provider adds additional methods to all instances of the classes outlined below. @@ -92,16 +91,6 @@ class DefaultMetaClassExtensionProvider implements MetaClassExtensionProvider { } } - static def JSP_CONTEXT_METACLASS = { - getAt { String attributeName -> - delegate.getAttribute(attributeName) - } - - putAt { String attributeName, Object value -> - delegate.setAttribute(attributeName, value) - } - } - static def SERVLET_REQUEST_METACLASS = { getAt { String parameterName -> def value = delegate.parameterMap[parameterName] as String[] @@ -291,7 +280,6 @@ class DefaultMetaClassExtensionProvider implements MetaClassExtensionProvider { static def DEFAULT_METACLASSES = [ (Optional): OPTIONAL_METACLASS, - (JspContext): JSP_CONTEXT_METACLASS, (ServletRequest): SERVLET_REQUEST_METACLASS, (Binary): BINARY_METACLASS, (Node): NODE_METACLASS, diff --git a/aem-groovy-extension-package/pom.xml b/aem-groovy-extension-package/pom.xml index 18c620e..c641c5d 100644 --- a/aem-groovy-extension-package/pom.xml +++ b/aem-groovy-extension-package/pom.xml @@ -3,7 +3,7 @@ com.icfolson.aem.groovy.extension aem-groovy-extension - 5.0.0 + 6.0.0 4.0.0 diff --git a/aem-groovy-extension-tests/pom.xml b/aem-groovy-extension-tests/pom.xml index 8672541..533b71e 100644 --- a/aem-groovy-extension-tests/pom.xml +++ b/aem-groovy-extension-tests/pom.xml @@ -4,7 +4,7 @@ com.icfolson.aem.groovy.extension aem-groovy-extension - 5.0.0 + 6.0.0 4.0.0 @@ -85,7 +85,7 @@ com.icfolson.aem.prosper prosper - 12.0.0 + 13.0.0 test diff --git a/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/JspContextMetaClassSpec.groovy b/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/JspContextMetaClassSpec.groovy deleted file mode 100644 index eec998d..0000000 --- a/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/JspContextMetaClassSpec.groovy +++ /dev/null @@ -1,35 +0,0 @@ -package com.icfolson.aem.groovy.extension.services.impl - -import com.icfolson.aem.groovy.extension.GroovyExtensionSpec -import org.springframework.mock.web.MockPageContext - -class JspContextMetaClassSpec extends GroovyExtensionSpec { - - def "get attribute"() { - setup: - def jspContext = new MockPageContext() - - def name = "name" - def value = "value" - - when: - jspContext.setAttribute(name, value) - - then: - jspContext[name] == value - } - - def "set attribute"() { - setup: - def jspContext = new MockPageContext() - - def name = "name" - def value = "value" - - when: - jspContext[name] = value - - then: - jspContext[name] == value - } -} diff --git a/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/ServletRequestMetaClassSpec.groovy b/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/ServletRequestMetaClassSpec.groovy index 8f0aca7..5f13175 100644 --- a/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/ServletRequestMetaClassSpec.groovy +++ b/aem-groovy-extension-tests/src/test/groovy/com/icfolson/aem/groovy/extension/services/impl/ServletRequestMetaClassSpec.groovy @@ -1,15 +1,14 @@ package com.icfolson.aem.groovy.extension.services.impl import com.icfolson.aem.groovy.extension.GroovyExtensionSpec -import org.springframework.mock.web.MockHttpServletRequest class ServletRequestMetaClassSpec extends GroovyExtensionSpec { def "get parameter"() { setup: - def request = new MockHttpServletRequest() - - request.setParameter("firstName", "Mark") + def request = requestBuilder.build { + setParameterMap(["firstName": "Mark"]) + } expect: request["firstName"] == "Mark" @@ -17,9 +16,9 @@ class ServletRequestMetaClassSpec extends GroovyExtensionSpec { def "get parameter array"() { setup: - def request = new MockHttpServletRequest() - - request.setParameter("languages", "Java", "Groovy") + def request = requestBuilder.build { + setParameterMap(["languages": ["Java", "Groovy"]]) + } expect: request["languages"] == ["Java", "Groovy"] @@ -27,9 +26,9 @@ class ServletRequestMetaClassSpec extends GroovyExtensionSpec { def "non-existent parameter returns null"() { setup: - def request = new MockHttpServletRequest() + def request = requestBuilder.build() expect: - request["nonExistent"] == null + !request["nonExistent"] } } diff --git a/pom.xml b/pom.xml index 3da0d11..841707e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,16 +3,16 @@ com.icfolson.aem aem-parent-uber-jar - 6.4.1 + 6.4.1.1 4.0.0 com.icfolson.aem.groovy.extension aem-groovy-extension pom - 5.0.0 + 6.0.0 AEM Groovy Extension - OSGi bundle containing Groovy builders and metaclasses for AEM (Adobe CQ). + OSGi bundle containing Groovy builders and metaclasses for Adobe Experience Manager. Olson Digital @@ -43,7 +43,7 @@ true install admin - + true true @@ -119,7 +119,7 @@ maven-compiler-plugin - 3.7.0 + 3.8.0 groovy-eclipse-compiler 1.8 @@ -244,7 +244,7 @@ org.codehaus.groovy groovy-all - 2.4.13 + 2.4.15 provided diff --git a/src/site/site.xml b/src/site/site.xml index 0b8a2aa..6f516ff 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -5,7 +5,7 @@ com.icfolson.maven icfolson-maven-skin - 1.0.0 + 1.1.0