juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r826779 - in /webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets: client/SubscriptionPanel.java client/UDDISubscription.java server/service/SubscriptionServiceImpl.java
Date Mon, 19 Oct 2009 19:34:54 GMT
Author: kstam
Date: Mon Oct 19 19:34:53 2009
New Revision: 826779

URL: http://svn.apache.org/viewvc?rev=826779&view=rev
Log:
JUDDI-240 defaulting to some sensible data

Modified:
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/SubscriptionPanel.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISubscription.java
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/SubscriptionPanel.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/SubscriptionPanel.java?rev=826779&r1=826778&r2=826779&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/SubscriptionPanel.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/SubscriptionPanel.java
Mon Oct 19 19:34:53 2009
@@ -137,6 +137,9 @@
 		notificationIntervalBox.setVisible(isAsync);
 		flexTable.setWidget(7, 1, notificationIntervalBox);
 		
+		subscription.setCoverageStart("2008-01-01T00:00:00");
+		subscription.setCoverageEnd("2010-01-01T00:00:00");
+		
 		Label coverageStart = new Label ("Coverage Start Date:");
 		coverageStart.setStyleName("portlet-form-field-label-right");
 		coverageStart.setVisible(!isAsync);
@@ -150,7 +153,7 @@
 		coverageEnd.setStyleName("portlet-form-field-label-right");
 		coverageEnd.setVisible(!isAsync);
 		flexTable.setWidget(9, 0, coverageEnd);
-		coverageEndBox.setText(this.subscription.getCoverageStart());
+		coverageEndBox.setText(this.subscription.getCoverageEnd());
 		coverageEndBox.setStyleName("portlet-form-input-field");
 		coverageEndBox.setVisible(!isAsync);
 		flexTable.setWidget(9, 1, coverageEndBox);
@@ -172,8 +175,7 @@
 	
 				public void onSuccess(SubscriptionResponse response) {
 					if (response.isSuccess()) {
-						UDDISubscription.getInstance().refreshSubscriptionTree();
-						UDDISubscription.getInstance().removeDetailPanel();
+						Window.alert("successfull sync");
 					} else {
 						Window.alert("error: " + response.getMessage());
 					}
@@ -208,28 +210,23 @@
 	
 	protected void newSubscription(Node node){
 		subscription = new Subscription();
-		subscription.setSubscriptionKey("uddi:juddi.apache.org:subscriptions-key1");
+		subscription.setSubscriptionKey("uddi:marketing.apache.org:subscription:key1");
 		subscription.setBindingKey("uddi:juddi.apache.org:servicebindings-subscriptionlistener-ws");
-		subscription.setBrief(true);
+		subscription.setBrief(false);
 		subscription.setMaxEntities(1000);
 		subscription.setNotificationInterval("P5D");
 		subscription.setSubscriptionFilter(
 				  "<subscriptionFilter xmlns=\"urn:uddi-org:sub_v3\">"
-			    + "  <find_service xmlns=\"urn:uddi-org:api_v3\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">"
-			    + "    <findQualifiers>"
-			    + "      <findQualifier>exactMatch</findQualifier>"
-			    + "    </findQualifiers>"
-			    + "    <name xml:lang=\"en\">Notifier One</name>"
-			    + "    <categoryBag>"
-			    + "      <keyedReference tModelKey=\"uddi:tmodelkey:categories\" keyName=\"category\"
keyValue=\"peaches\" />"
-			    + "      <keyedReference tModelKey=\"uddi:tmodelkey:categories\" keyName=\"category\"
keyValue=\"plums\" />"
-			    + "      <keyedReferenceGroup tModelKey=\"uddi:tmodelKey:group\">"
-			    + "        <keyedReference tModelKey=\"uddi:tmodelKey:blank\" keyName=\"blank\"
keyValue=\"blank\" />"
-			    + "      </keyedReferenceGroup>"
-			    + "    </categoryBag>"
-			    + "    </find_service>"
+				    + "<find_service xmlns=\"urn:uddi-org:api_v3\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">"
+					+ "<findQualifiers>"
+					+	"<findQualifier>exactMatch</findQualifier>"
+					+ "</findQualifiers>"
+					+ "<name xml:lang=\"en\">HelloWorld</name>"
+				    + "</find_service>"
 			    + "</subscriptionFilter>");
 		subscription.setNode(node);
+		subscription.setCoverageStart("2008-01-01T00:00:00");
+		subscription.setCoverageEnd("2010-01-01T00:00:00");
 				
 	}
 	

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISubscription.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISubscription.java?rev=826779&r1=826778&r2=826779&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISubscription.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/client/UDDISubscription.java
Mon Oct 19 19:34:53 2009
@@ -128,7 +128,6 @@
 	
 	public void syncListedServices() {
 		if (detailPanel!=null) {
-			System.out.println("hello");
 			if (detailPanel.isAsync) {
 				detailPanel.isAsync=false;
 				detailPanel.drawPanel();

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java?rev=826779&r1=826778&r2=826779&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
Mon Oct 19 19:34:53 2009
@@ -293,6 +293,8 @@
 	
 	public SubscriptionResponse invokeSyncSubscription(String userAuthToken, Subscription modelSubscription)
{
 
+		HttpServletRequest request = getThreadLocalRequest();
+		HttpSession session = request.getSession();
 		SubscriptionResponse response = new SubscriptionResponse();
 	
 		try {
@@ -309,6 +311,9 @@
 			getSubscriptionResults.setCoveragePeriod(coverage);
 			
 			UDDIClerk clerk = UDDIClerkManager.getClientConfig().getUDDIClerks().get(modelSubscription.getClerkName());
+			String authToken = (String) session.getAttribute("token-" + clerk.getName());
+			getSubscriptionResults.setAuthInfo(authToken);
+			
 			String clazz = UDDIClerkManager.getClientConfig().getUDDINode(clerk.getUDDINode().getName()).getProxyTransport();
 			Class<?> transportClass = Loader.loadClass(clazz);
 			Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(clerk.getUDDINode().getName());

@@ -316,6 +321,7 @@
 			
 			SubscriptionResultsList list = subscriptionService.getSubscriptionResults(getSubscriptionResults);
 			System.out.println("list=" + list);
+			response.setSuccess(true);
 		} catch (Exception e) {
 			logger.error("Could not save subscription. " + e.getMessage(), e);
 			response.setSuccess(false);



---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


Mime
View raw message