Return-Path: X-Original-To: apmail-juddi-commits-archive@www.apache.org Delivered-To: apmail-juddi-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4132510B88 for ; Sun, 16 Mar 2014 00:39:46 +0000 (UTC) Received: (qmail 22209 invoked by uid 500); 16 Mar 2014 00:39:44 -0000 Delivered-To: apmail-juddi-commits-archive@juddi.apache.org Received: (qmail 22171 invoked by uid 500); 16 Mar 2014 00:39:43 -0000 Mailing-List: contact commits-help@juddi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@juddi.apache.org Received: (qmail 22164 invoked by uid 99); 16 Mar 2014 00:39:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Mar 2014 00:39:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5AC868B8996; Sun, 16 Mar 2014 00:39:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alexoree@apache.org To: commits@juddi.apache.org Message-Id: <9042f1a08e1646aea160dd3cbf70d567@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: JUDDI-872 initial cut vsv sample JUDDI-198 enabled vsv tests for the tck runner Date: Sun, 16 Mar 2014 00:39:43 +0000 (UTC) Repository: juddi Updated Branches: refs/heads/master 432345b08 -> ac9b6da2c JUDDI-872 initial cut vsv sample JUDDI-198 enabled vsv tests for the tck runner Project: http://git-wip-us.apache.org/repos/asf/juddi/repo Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/ac9b6da2 Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/ac9b6da2 Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/ac9b6da2 Branch: refs/heads/master Commit: ac9b6da2ca4c0e05805ea1bdc90fca7f157a5b7d Parents: 432345b Author: alexoree Authored: Sat Mar 15 20:39:23 2014 -0400 Committer: alexoree Committed: Sat Mar 15 20:39:23 2014 -0400 ---------------------------------------------------------------------- .../juddi/v3/client/config/UDDIClerk.java | 2 +- .../api/impl/UDDIValueSetValidationImpl.java | 2 +- juddi-examples/ValueSetValidator/pom.xml | 86 ++++++++++++++++++++ .../examples/vsv/valuesetvalidator/App.java | 46 +++++++++++ .../vsv/Uddiwwwbobcomverifiedtmodel.java | 35 ++++++++ .../src/main/resources/META-INF/uddi.xml | 38 +++++++++ .../examples/vsv/valuesetvalidator/AppTest.java | 38 +++++++++ juddi-examples/pom.xml | 1 + .../subscription-notification-amqp/pom.xml | 8 +- uddi-tck-runner/tck.properties | 2 +- 10 files changed, 251 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java ---------------------------------------------------------------------- diff --git a/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java b/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java index d06dca2..ce6fc97 100644 --- a/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java +++ b/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java @@ -1528,7 +1528,7 @@ public class UDDIClerk implements Serializable { * * @param partitionName think of this as the domain, i.e. juddi.apache.org, but it can really be anything you want. This will become part of the * key associated with the tModel generator (uddi:juddi.apache.org:keygenerator). The colon ":" is the delimitor, so avoid using them unless you want to - * create nexted key domains. If you're missing the "uddi:" prefix or the ":keygenerator" suffix, it will be added automatically. + * create nested key domains. If you're missing the "uddi:" prefix or the ":keygenerator" suffix, it will be added automatically. * @param DescriptiveName required. max length is 255 char * @param DescriptiveNameLanguage optional, max length is 26 char * @return a populated tModel entity representing a tModel key http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java ---------------------------------------------------------------------- diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java index cbfceae..5c31a85 100644 --- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java +++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java @@ -336,7 +336,7 @@ public class UDDIValueSetValidationImpl extends AuthenticatedService implements } String key = new String(new char[]{tmodelkey.charAt(0)}).toUpperCase() + tmodelkey.substring(1).toLowerCase(); - key = key.replaceAll("[^a-zA-Z0-9 -]", ""); + key = key.replaceAll("[^a-zA-Z0-9]", ""); String clazz = "org.apache.juddi.validation.vsv." + key; http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/ValueSetValidator/pom.xml ---------------------------------------------------------------------- diff --git a/juddi-examples/ValueSetValidator/pom.xml b/juddi-examples/ValueSetValidator/pom.xml new file mode 100644 index 0000000..6bca191 --- /dev/null +++ b/juddi-examples/ValueSetValidator/pom.xml @@ -0,0 +1,86 @@ + + + + 4.0.0 + + org.apache.juddi.example + juddi-examples + 3.2.1-SNAPSHOT + + + example-vsv-validator + ${project.parent.version} + jUDDI Example Value Set Validator + + + org.apache.juddi + uddi-ws + ${project.parent.version} + provided + + + org.apache.juddi + juddi-client + ${project.parent.version} + provided + + + + org.apache.juddi + juddi-core + ${project.parent.version} + provided + + + + + + default + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + demo + + + + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + + test + + java + + + org.apache.juddi.examples.vsv.valuesetvalidator.App + + + + + + + + + http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/examples/vsv/valuesetvalidator/App.java ---------------------------------------------------------------------- diff --git a/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/examples/vsv/valuesetvalidator/App.java b/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/examples/vsv/valuesetvalidator/App.java new file mode 100644 index 0000000..97fb541 --- /dev/null +++ b/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/examples/vsv/valuesetvalidator/App.java @@ -0,0 +1,46 @@ +package org.apache.juddi.examples.vsv.valuesetvalidator; + +import org.apache.commons.configuration.ConfigurationException; +import org.apache.juddi.api.impl.UDDIValueSetValidationImpl; +import org.apache.juddi.v3.client.UDDIConstants; +import org.apache.juddi.v3.client.config.UDDIClerk; +import org.apache.juddi.v3.client.config.UDDIClient; +import org.apache.juddi.validation.vsv.AbstractSimpleValidator; +import org.uddi.api_v3.CategoryBag; +import org.uddi.api_v3.KeyedReference; +import org.uddi.api_v3.Name; +import org.uddi.api_v3.TModel; + +/** + * Hello world! + * + */ +public class App { + + public static void main(String[] args) throws ConfigurationException { + System.out.println("Notice! before running this, build this project and copy the jar file into juddi-tomcat/target/tomcat/apache-tomcat.../juddiv3.war/WEB-INF/lib and restart!"); + + System.out.println(UDDIValueSetValidationImpl.ConvertKeyToClass("uddi:www.bob.com:verified-tmodel")); + + //register joe publisher key generator + //register tmodel that's validated + UDDIClient client = new UDDIClient("META-INF/uddi.xml"); + UDDIClerk clerk = client.getClerk("default"); + TModel keygen = UDDIClerk.createKeyGenator("www.bob.com", "Bob's Key Generator", "This key generator is used for the jUDDI example Value Set Validator example"); + + keygen = clerk.register(keygen).getTModel().get(0); + + TModel verifiedTmodel = new TModel(); + verifiedTmodel.setTModelKey(keygen.getTModelKey().replace("keygenerator", "verified-tmodel")); + verifiedTmodel.setCategoryBag(new CategoryBag()); + + verifiedTmodel.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, "uddi:juddi.apache.org:servicebindings-valueset-cp")); + verifiedTmodel.setName(new Name("Bob's tModel with validation", "en")); + verifiedTmodel = clerk.register(verifiedTmodel).getTModel().get(0); + + //now try to use it with a valid value + + //try to use it when an invalid value + + } +} http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/validation/vsv/Uddiwwwbobcomverifiedtmodel.java ---------------------------------------------------------------------- diff --git a/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/validation/vsv/Uddiwwwbobcomverifiedtmodel.java b/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/validation/vsv/Uddiwwwbobcomverifiedtmodel.java new file mode 100644 index 0000000..cb79c0c --- /dev/null +++ b/juddi-examples/ValueSetValidator/src/main/java/org/apache/juddi/validation/vsv/Uddiwwwbobcomverifiedtmodel.java @@ -0,0 +1,35 @@ +/* + * Copyright 2014 The Apache Software Foundation. + * + * 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.apache.juddi.validation.vsv; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author Alex O'Ree + */ +public class Uddiwwwbobcomverifiedtmodel extends AbstractSimpleValidator{ + + @Override + public List getValidValues() { + List ret = new ArrayList(); + ret.add("value1"); + return ret; + } + +} http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/ValueSetValidator/src/main/resources/META-INF/uddi.xml ---------------------------------------------------------------------- diff --git a/juddi-examples/ValueSetValidator/src/main/resources/META-INF/uddi.xml b/juddi-examples/ValueSetValidator/src/main/resources/META-INF/uddi.xml new file mode 100644 index 0000000..83e103c --- /dev/null +++ b/juddi-examples/ValueSetValidator/src/main/resources/META-INF/uddi.xml @@ -0,0 +1,38 @@ + + + + 5000 + + + + + default + + + + + + Main jUDDI node + + org.apache.juddi.v3.client.transport.JAXWSTransport + http://${serverName}:${serverPort}/juddiv3/services/custody-transfer + http://${serverName}:${serverPort}/juddiv3/services/inquiry + http://${serverName}:${serverPort}/juddiv3/services/inquiryRest + http://${serverName}:${serverPort}/juddiv3/services/publish + http://${serverName}:${serverPort}/juddiv3/services/security + http://${serverName}:${serverPort}/juddiv3/services/subscription + http://${serverName}:${serverPort}/juddiv3/services/subscription-listener + http://${serverName}:${serverPort}/juddiv3/services/juddi-api + + + + + + + + http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/ValueSetValidator/src/test/java/org/apache/juddi/examples/vsv/valuesetvalidator/AppTest.java ---------------------------------------------------------------------- diff --git a/juddi-examples/ValueSetValidator/src/test/java/org/apache/juddi/examples/vsv/valuesetvalidator/AppTest.java b/juddi-examples/ValueSetValidator/src/test/java/org/apache/juddi/examples/vsv/valuesetvalidator/AppTest.java new file mode 100644 index 0000000..0719f4e --- /dev/null +++ b/juddi-examples/ValueSetValidator/src/test/java/org/apache/juddi/examples/vsv/valuesetvalidator/AppTest.java @@ -0,0 +1,38 @@ +package org.apache.juddi.examples.vsv.valuesetvalidator; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/pom.xml ---------------------------------------------------------------------- diff --git a/juddi-examples/pom.xml b/juddi-examples/pom.xml index 4afb0dd..87402da 100644 --- a/juddi-examples/pom.xml +++ b/juddi-examples/pom.xml @@ -39,5 +39,6 @@ more-uddi-samples service-version uddiv2-api-bridge-example + ValueSetValidator \ No newline at end of file http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/juddi-examples/subscription-notification-amqp/pom.xml ---------------------------------------------------------------------- diff --git a/juddi-examples/subscription-notification-amqp/pom.xml b/juddi-examples/subscription-notification-amqp/pom.xml index c59f571..74682b0 100644 --- a/juddi-examples/subscription-notification-amqp/pom.xml +++ b/juddi-examples/subscription-notification-amqp/pom.xml @@ -16,20 +16,20 @@ subscription-notification-amqp - 3.2.1-SNAPSHOT + ${project.parent.version} jUDDI Example AMQP Notifier for Subscription callbacks Demonstrates how to write a custom notifier for subscriptions org.apache.juddi uddi-ws - 3.2.1-SNAPSHOT + ${project.parent.version} provided org.apache.juddi juddi-client - 3.2.1-SNAPSHOT + ${project.parent.version} provided @@ -50,7 +50,7 @@ org.apache.juddi juddi-core - 3.2.1-SNAPSHOT + ${project.parent.version} provided http://git-wip-us.apache.org/repos/asf/juddi/blob/ac9b6da2/uddi-tck-runner/tck.properties ---------------------------------------------------------------------- diff --git a/uddi-tck-runner/tck.properties b/uddi-tck-runner/tck.properties index 740d117..81a3189 100644 --- a/uddi-tck-runner/tck.properties +++ b/uddi-tck-runner/tck.properties @@ -29,7 +29,7 @@ auth_mode = uddi rest.enabled = true #does the UDDI server support the Value Set Validation APIs? -vsv.enabled = false +vsv.enabled = true #does the UDDI server support the Subscription API? sub.enabled=true --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org For additional commands, e-mail: commits-help@juddi.apache.org