geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r789323 - /geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/
Date Mon, 29 Jun 2009 13:45:05 GMT
Author: dwoods
Date: Mon Jun 29 13:45:04 2009
New Revision: 789323

URL: http://svn.apache.org/viewvc?rev=789323&view=rev
Log:
fix eol chars as requested by Shawn

Modified:
    geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ConfigurationDataBuilder.groovy
    geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanAttributeAndReferenceBuilder.groovy
    geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanDataBuilder.groovy
    geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ReferenceBuilder.groovy

Modified: geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ConfigurationDataBuilder.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ConfigurationDataBuilder.groovy?rev=789323&r1=789322&r2=789323&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ConfigurationDataBuilder.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ConfigurationDataBuilder.groovy
Mon Jun 29 13:45:04 2009
@@ -1,13 +1,100 @@
-/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license
agreements.  See the NOTICE file
 * distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.geronimo.kernel.config.transformer

import org.apache.geronimo.kernel.Jsr77Naming
import org.apache.geronimo.gbean.GBeanInfo
import
org.apache.geronimo.gbean.GBe
 anData
import org.apache.geronimo.gbean.GBeanData
import org.apache.geronimo.kernel.repository.Version
import
org.apache.geronimo.kernel.config.ConfigurationData
import org.apache.geronimo.kernel.repository.ImportType
import
org.apache.geronimo.kernel.repository.Artifact
import org.apache.geronimo.kernel.repository.Dependency
-
/**
 *
 * @version $Rev:$ $Date:$
 */
class ConfigurationDataBuilder {
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.geronimo.kernel.config.transformer
+ 
+import org.apache.geronimo.kernel.Jsr77Naming
+import org.apache.geronimo.gbean.GBeanInfo
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.kernel.repository.Version
+import org.apache.geronimo.kernel.config.ConfigurationData
+import org.apache.geronimo.kernel.repository.ImportType
+import org.apache.geronimo.kernel.repository.Artifact
+import org.apache.geronimo.kernel.repository.Dependency
+
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+class ConfigurationDataBuilder {
     private final ConfigurationData configurationData
     
     ConfigurationDataBuilder(ConfigurationData configurationData) {
         assert null != configurationData : 'configurationData is required'
         this.configurationData = configurationData
-    }
    
    def configure (Closure closure) {
        closure.delegate = this
       
closure()
    }
+    }
+    
+    def configure (Closure closure) {
+        closure.delegate = this
+        closure()
+    }
+
+    def addDependency(Map dependencyDeclaration) throws GroovyScriptException {
+        def throwUsage = {
+            throw new GroovyScriptException('addDependency usage: addDependency(groupId:
group, artifactId: artifact, version: X, type: type, importType: ImportType.X)')
+        }
+
+        ensureNotNull(dependencyDeclaration.groupId, throwUsage)
+        ensureNotNull(dependencyDeclaration.artifactId, throwUsage)
+
+        if (!dependencyDeclaration.type) {
+            dependencyDeclaration.type = 'jar'
+        }
 
-    def addDependency(Map dependencyDeclaration) throws GroovyScriptException {
        def
throwUsage = {
            throw new GroovyScriptException('addDependency usage: addDependency(groupId:
group, artifactId: artifact, version: X, type: type, importType: ImportType.X)')
        }

       ensureNotNull(dependencyDeclaration.groupId, throwUsage)
        ensureNotNull(dependencyDeclaration.artifactId,
throwUsage)

        if (!dependencyDeclaration.type) {
            dependencyDeclaration.type
= 'jar'
        }

        def artifact = buildArtifact(dependencyDeclaration)
        
 
      def importType = dependencyDeclaration.importType
        if (!importType) {
      
     importType = ImportType.ALL
        }
        
        configurationData.environment.addDependency(artifact,
importType)
    }
-    
    def removeDependency(Map dependencyFilter) throws GroovyScriptException {
     
  def throwUsage = {
            throw new GroovyScriptException('removeDependency usage:
removeDependency(groupId: group, artifactId: artifact, version: X, type: type)')
        }

       def filteredArtifact = buildArtifact(dependencyFilter)
        def filteredDependencies
= configurationData.environment.dependencies.findAll { dependency ->
            !filteredArtifact.matches(dependency.artifact)
       }

        configurationData.environment.dependencies = filteredDependencies
    }
-
    protected def buildArtifact(dependencyDeclaration) throws GroovyScriptException {
 
      def groupId = dependencyDeclaration.groupId
        def artifactId = dependencyDeclaration.artifactId
       def version = dependencyDeclaration.version
        def type = dependencyDeclaration.type

       new Artifact(groupId, artifactId, (String) version, type)
    }
    
    protected
def ensureNotNull(value, throwUsage) throws GroovyScriptException {
        if (!value) {
           throwUsage()
        }
    }
    
+        def artifact = buildArtifact(dependencyDeclaration)
+        
+        def importType = dependencyDeclaration.importType
+        if (!importType) {
+            importType = ImportType.ALL
+        }
+        
+        configurationData.environment.addDependency(artifact, importType)
+    }
+    
+    def removeDependency(Map dependencyFilter) throws GroovyScriptException {
+        def throwUsage = {
+            throw new GroovyScriptException('removeDependency usage: removeDependency(groupId:
group, artifactId: artifact, version: X, type: type)')
+        }
+
+        def filteredArtifact = buildArtifact(dependencyFilter)
+        def filteredDependencies = configurationData.environment.dependencies.findAll { dependency
->
+            !filteredArtifact.matches(dependency.artifact)
+        }
+
+        configurationData.environment.dependencies = filteredDependencies
+    }
+
+    protected def buildArtifact(dependencyDeclaration) throws GroovyScriptException {
+        def groupId = dependencyDeclaration.groupId
+        def artifactId = dependencyDeclaration.artifactId
+        def version = dependencyDeclaration.version
+        def type = dependencyDeclaration.type
+
+        new Artifact(groupId, artifactId, (String) version, type)
+    }
+    
+    protected def ensureNotNull(value, throwUsage) throws GroovyScriptException {
+        if (!value) {
+            throwUsage()
+        }
+    }
+    
 }
\ No newline at end of file

Modified: geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanAttributeAndReferenceBuilder.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanAttributeAndReferenceBuilder.groovy?rev=789323&r1=789322&r2=789323&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanAttributeAndReferenceBuilder.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanAttributeAndReferenceBuilder.groovy
Mon Jun 29 13:45:04 2009
@@ -1,5 +1,39 @@
-/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license
agreements.  See the NOTICE file
 * distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.geronimo.kernel.config.transformer

import
org.apache.geronimo.gbean.GBeanInfo
import org.apache.geronimo.gbean.GBeanData
import org.apache.geronimo.gbean.GBeanDa
 ta
import org.apache.geronimo.kernel.repository.Version
import org.apache.geronimo.kernel.config.ConfigurationData
import
org.apache.geronimo.kernel.repository.ImportType
import org.apache.geronimo.kernel.repository.Artifact
import
org.apache.geronimo.kernel.repository.Dependency
-
/**
 *
 * @version $Rev:$ $Date:$
 */
class GBeanAttributeAndReferenceBuilder {
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.geronimo.kernel.config.transformer
+
+import org.apache.geronimo.gbean.GBeanInfo
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.kernel.repository.Version
+import org.apache.geronimo.kernel.config.ConfigurationData
+import org.apache.geronimo.kernel.repository.ImportType
+import org.apache.geronimo.kernel.repository.Artifact
+import org.apache.geronimo.kernel.repository.Dependency
+
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+class GBeanAttributeAndReferenceBuilder {
     private final def configurationData
     private final def gbeanData
     
@@ -8,4 +42,48 @@
         assert null != gbeanData : 'gbeanData is required'
         this.configurationData = configurationData
         this.gbeanData = gbeanData
-    }
   
    def attribute(Map attributeInfo) {
        def throwUsage = {
            throw
new GroovyScriptException('attribute usage: attribute(attributeName: attributeValue)')
  
     }

        def mapIter = attributeInfo.entrySet().iterator()
        if (!mapIter.hasNext())
{
            throwUsage()
        }
        
        def entry = mapIter.next()
        def
key = entry.key
        def value = entry.value
        gbeanData.setAttribute(key, value)
   }
 
    def reference(Object[] referenceInfo) {
        def throwUsage = {
           
throw new GroovyScriptException('reference usage: reference(referenceName) {pattern(patternValue)}')
       }
        
        if (2 != referenceInfo.length) {
            throwUsage()
     
  }
        
        def name = referenceInfo[0]
        if (!(name instanceof String)) {
           throwUsage()
        }
        
        def referenceDeclarationClosure = referenceInfo[1]
       if (!(referenceDeclarationClosure insta
 nceof Closure)) {
            throwUsage()
        }

        def referenceBuilder = new
ReferenceBuilder()
        referenceDeclarationClosure.delegate = referenceBuilder
      
 referenceDeclarationClosure()
        
        gbeanData.setReferencePatterns(name, referenceBuilder.references)
   }

}
\ No newline at end of file
+    }
+   
+    def attribute(Map attributeInfo) {
+        def throwUsage = {
+            throw new GroovyScriptException('attribute usage: attribute(attributeName: attributeValue)')
+        }
+
+        def mapIter = attributeInfo.entrySet().iterator()
+        if (!mapIter.hasNext()) {
+            throwUsage()
+        }
+        
+        def entry = mapIter.next()
+        def key = entry.key
+        def value = entry.value
+        gbeanData.setAttribute(key, value)
+    }
+ 
+    def reference(Object[] referenceInfo) {
+        def throwUsage = {
+            throw new GroovyScriptException('reference usage: reference(referenceName) {pattern(patternValue)}')
+        }
+        
+        if (2 != referenceInfo.length) {
+            throwUsage()
+        }
+        
+        def name = referenceInfo[0]
+        if (!(name instanceof String)) {
+            throwUsage()
+        }
+        
+        def referenceDeclarationClosure = referenceInfo[1]
+        if (!(referenceDeclarationClosure instanceof Closure)) {
+            throwUsage()
+        }
+
+        def referenceBuilder = new ReferenceBuilder()
+        referenceDeclarationClosure.delegate = referenceBuilder
+        referenceDeclarationClosure()
+        
+        gbeanData.setReferencePatterns(name, referenceBuilder.references)
+    }
+
+}
\ No newline at end of file

Modified: geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanDataBuilder.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanDataBuilder.groovy?rev=789323&r1=789322&r2=789323&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanDataBuilder.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/GBeanDataBuilder.groovy
Mon Jun 29 13:45:04 2009
@@ -1,5 +1,37 @@
-/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license
agreements.  See the NOTICE file
 * distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.geronimo.kernel.config.transformer

import
org.apache.geronimo.gbean.GBeanData
import org.apache.geronimo.kernel.repository.Version
import
org.apache.geronimo.ker
 nel.config.ConfigurationData
import org.apache.geronimo.kernel.repository.ImportType
import
org.apache.geronimo.kernel.repository.Artifact
import org.apache.geronimo.kernel.repository.Dependency
-
/**
 *
 * @version $Rev:$ $Date:$
 */
class GBeanDataBuilder {
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.geronimo.kernel.config.transformer
+
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.kernel.repository.Version
+import org.apache.geronimo.kernel.config.ConfigurationData
+import org.apache.geronimo.kernel.repository.ImportType
+import org.apache.geronimo.kernel.repository.Artifact
+import org.apache.geronimo.kernel.repository.Dependency
+
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+class GBeanDataBuilder {
     private final def configurationData
     private final def gbeanDatas
     
@@ -8,6 +40,44 @@
         assert null != gbeanDatas : 'gbeanDatas is required'
         this.configurationData = configurationData
         this.gbeanDatas = gbeanDatas
-    }
    
    def configure (Closure closure) {
        closure.delegate = this
       
closure()
    }
+    }
+    
+    def configure (Closure closure) {
+        closure.delegate = this
+        closure()
+    }
+
+    def addGBean(Map gbeanDeclaration, Closure gbeanClosure) {
+        def throwUsage = {
+            throw new GroovyScriptException('addGBean usage: addGBean(name: gbeanName, gbean:
gbeanClass, type: gbeanType)')
+        }
 
-    def addGBean(Map gbeanDeclaration, Closure gbeanClosure) {
        def throwUsage = {
           throw new GroovyScriptException('addGBean usage: addGBean(name: gbeanName, gbean:
gbeanClass, type: gbeanType)')
        }

        if (!gbeanDeclaration.name) {
         
  throwUsage()
        } else if (!gbeanDeclaration.gbean) {
            throwUsage()
   
    }

        def gbeanName = buildGBeanName(gbeanDeclaration)
        def gbean = gbeanDeclaration.gbean

        def gbeanData = new GBeanData(gbeanName, gbean)

        gbeanClosure.delegate =
new GBeanAttributeAndReferenceBuilder(configurationData, gbeanData)
        gbeanClosure()

       gbeanDatas.push(gbeanData)
    }
    
    protected def buildGBeanName(gbeanDeclaration)
throws GroovyScriptException {
        def name = gbeanDeclaration.name

        def type
= gbeanDeclaration.type
        if (!type) {
            type = 'GBean'
        }
       

        def naming = configurationData.naming
        nami
 ng.createRootName(configurationData.environment.configId, name, type)
    }
    
}
\ No newline at end of file
+        if (!gbeanDeclaration.name) {
+            throwUsage()
+        } else if (!gbeanDeclaration.gbean) {
+            throwUsage()
+        }
+
+        def gbeanName = buildGBeanName(gbeanDeclaration)
+        def gbean = gbeanDeclaration.gbean 
+        def gbeanData = new GBeanData(gbeanName, gbean)
+
+        gbeanClosure.delegate = new GBeanAttributeAndReferenceBuilder(configurationData,
gbeanData)
+        gbeanClosure()
+
+        gbeanDatas.push(gbeanData)
+    }
+    
+    protected def buildGBeanName(gbeanDeclaration) throws GroovyScriptException {
+        def name = gbeanDeclaration.name
+
+        def type = gbeanDeclaration.type
+        if (!type) {
+            type = 'GBean'
+        }
+        
+        def naming = configurationData.naming
+        naming.createRootName(configurationData.environment.configId, name, type)
+    }
+    
+}
\ No newline at end of file

Modified: geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ReferenceBuilder.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ReferenceBuilder.groovy?rev=789323&r1=789322&r2=789323&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ReferenceBuilder.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-config-groovy-transformer/src/main/groovy/org/apache/geronimo/kernel/config/transformer/ReferenceBuilder.groovy
Mon Jun 29 13:45:04 2009
@@ -1,5 +1,52 @@
-/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license
agreements.  See the NOTICE file
 * distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.geronimo.kernel.config.transformer

import
org.apache.geronimo.gbean.AbstractNameQuery
import org.apache.geronimo.gbean.GBeanInfo
import
org.apache.geronimo.gbean
 .GBeanData
import org.apache.geronimo.gbean.GBeanData
import org.apache.geronimo.kernel.repository.Version
import
org.apache.geronimo.kernel.config.ConfigurationData
import org.apache.geronimo.kernel.repository.ImportType
import
org.apache.geronimo.kernel.repository.Artifact
import org.apache.geronimo.kernel.repository.Dependency
-
/**
 *
 * @version $Rev:$ $Date:$
 */
class ReferenceBuilder {
-    Set references
    
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.geronimo.kernel.config.transformer
+
+import org.apache.geronimo.gbean.AbstractNameQuery
+import org.apache.geronimo.gbean.GBeanInfo
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.gbean.GBeanData
+import org.apache.geronimo.kernel.repository.Version
+import org.apache.geronimo.kernel.config.ConfigurationData
+import org.apache.geronimo.kernel.repository.ImportType
+import org.apache.geronimo.kernel.repository.Artifact
+import org.apache.geronimo.kernel.repository.Dependency
+
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+class ReferenceBuilder {
+    Set references
+    
     ReferenceBuilder() {
-        references = []
    }
   
    def pattern(String pattern) {
        try {
      
     references.add(new AbstractNameQuery(new URI(pattern)))
        } catch (Exception e)
{
            throw new GroovyScriptException('pattern usage: pattern(patternValue)')
   
    }
    }
 
}
\ No newline at end of file
+        references = []
+    }
+   
+    def pattern(String pattern) {
+        try {
+            references.add(new AbstractNameQuery(new URI(pattern)))
+        } catch (Exception e) {
+            throw new GroovyScriptException('pattern usage: pattern(patternValue)')
+        }
+    }
+ 
+}
\ No newline at end of file



Mime
View raw message