juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1542631 - in /juddi/trunk: juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ juddi-core/src/main/java/org/apache/juddi/api/impl/ juddi-core/src/main/java/org/apache/juddi/mapping/ juddi-core/src/main/java/org/apache/juddi/quer...
Date Sun, 17 Nov 2013 01:32:26 GMT
Author: alexoree
Date: Sun Nov 17 01:32:25 2013
New Revision: 1542631

URL: http://svn.apache.org/r1542631
Log:
JUDDI-701 done
JUDDI-652 alter the servlet listerner to attempt to clean up any other variables

Modified:
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/AES.java
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/StartupServlet.java
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java
(original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java
Sun Nov 17 01:32:25 2013
@@ -16,7 +16,6 @@
  */
 package org.apache.juddi.v3.client.mapping;
 
-import com.ibm.wsdl.extensions.soap12.SOAP12BindingImpl;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.rmi.RemoteException;
@@ -82,6 +81,7 @@ import org.w3c.dom.Element;
  * uddi:bindingTemplate</li> <li>TODO: 2.4.5 wsdl:port Address Extensions ->
  * uddi:bindingTemplate</li> </ul>
  *
+ * @see 
  * @author Kurt T Stam
  * @Since 3.1.5
  */

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
Sun Nov 17 01:32:25 2013
@@ -452,9 +452,9 @@ public class UDDIPublicationImpl extends
 			List<?> tmodelKeysFound = null;
 
 			if (body.getInfoSelection().equals(InfoSelection.HIDDEN))
-				tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, tmodelKeysFound,
new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS + ".deleted", new Boolean(true), DynamicQuery.PREDICATE_EQUALS));
+				tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, tmodelKeysFound,
new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS + ".deleted",  Boolean.TRUE, DynamicQuery.PREDICATE_EQUALS));
 			else if (body.getInfoSelection().equals(InfoSelection.VISIBLE))
-				tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, tmodelKeysFound,
new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS + ".deleted", new Boolean(false), DynamicQuery.PREDICATE_EQUALS));
+				tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, tmodelKeysFound,
new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS + ".deleted",  Boolean.FALSE, DynamicQuery.PREDICATE_EQUALS));
 			else
 				tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, tmodelKeysFound);
 				

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java Sun
Nov 17 01:32:25 2013
@@ -753,7 +753,7 @@ public class MappingApiToModel {
 		if (apiSubscription.isBrief() != null) {
 			modelSubscription.setBrief(apiSubscription.isBrief());
 		} else {
-			modelSubscription.setBrief(new Boolean(false));
+			modelSubscription.setBrief(Boolean.FALSE);
 		}
 			
 		

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
Sun Nov 17 01:32:25 2013
@@ -52,7 +52,7 @@ public class FindTModelByIdentifierQuery
 	}
 	
 	public static List<?> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers,
List<?> keysIn) {
-		return findQuery.select(em, fq, identifiers, keysIn, new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS
+ ".deleted", new Boolean(false), DynamicQuery.PREDICATE_EQUALS));
+		return findQuery.select(em, fq, identifiers, keysIn, new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS
+ ".deleted", Boolean.FALSE, DynamicQuery.PREDICATE_EQUALS));
 	}
 	
 }

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/AES.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/AES.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/AES.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/AES.java Sun Nov 17 01:32:25
2013
@@ -16,10 +16,6 @@
  */
 package org.apache.juddi.webconsole;
 
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
 import javax.crypto.*;
 import javax.crypto.spec.*;
 

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
(original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
Sun Nov 17 01:32:25 2013
@@ -1,6 +1,18 @@
 /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright 2001-2013 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.webconsole;
 

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/StartupServlet.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/StartupServlet.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/StartupServlet.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/StartupServlet.java Sun
Nov 17 01:32:25 2013
@@ -1,6 +1,18 @@
 /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright 2001-2013 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.webconsole;
 
@@ -19,6 +31,8 @@ import javax.servlet.ServletContextEvent
  */
 public class StartupServlet implements javax.servlet.ServletContextListener {
 
+    static final Logger log = Logger.getLogger(StartupServlet.class.getCanonicalName());
+
     /**
      * creates a new AES key and stores it to the properties files
      *
@@ -27,7 +41,6 @@ public class StartupServlet implements j
     public void contextInitialized(ServletContextEvent sce) {
         FileOutputStream fos = null;
         try {
-            Logger log = Logger.getLogger(this.getClass().getCanonicalName());
             //URL resource = sce.getServletContext().getResource("/META-INF/config.properties");
             Properties p = new Properties();
             InputStream is = sce.getServletContext().getResourceAsStream("/META-INF/config.properties");
@@ -50,7 +63,7 @@ public class StartupServlet implements j
             fos.flush();
             fos.close();
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.log(Level.WARNING, null, ex);
             try {
                 if (fos != null) {
                     fos.close();
@@ -68,9 +81,7 @@ public class StartupServlet implements j
     public void contextDestroyed(ServletContextEvent sce) {
         FileOutputStream fos = null;
         try {
-
-            Logger log = Logger.getLogger(this.getClass().getCanonicalName());
-            //URL resource = sce.getServletContext().getResource("/META-INF/config.properties");
+            log.info("Cleaning up juddi-gui");
             Properties p = new Properties();
             InputStream is = sce.getServletContext().getResourceAsStream("/META-INF/config.properties");
             p.load(is);
@@ -81,7 +92,7 @@ public class StartupServlet implements j
             fos.flush();
             fos.close();
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.log(Level.WARNING, null, ex);
             try {
                 if (fos != null) {
                     fos.close();
@@ -89,5 +100,14 @@ public class StartupServlet implements j
             } catch (Exception e) {
             }
         }
+        try {
+            sce.getServletContext().removeAttribute("username");
+            sce.getServletContext().removeAttribute("password");
+            sce.getServletContext().removeAttribute("locale");
+            sce.getServletContext().removeAttribute("hub");
+        } catch (Exception ex) {
+            log.log(Level.WARNING, null, ex);
+        }
+
     }
 }

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java?rev=1542631&r1=1542630&r2=1542631&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java Sun Nov
17 01:32:25 2013
@@ -308,6 +308,7 @@ public class UddiHub implements Serializ
     }
 
     private String GetToken() {
+        EnsureConfig();
         if (style != AuthStyle.UDDI_AUTH) {
             BindingProvider bp = null;
             Map<String, Object> context = null;
@@ -1175,9 +1176,11 @@ public class UddiHub implements Serializ
             }
 
             ret.offset = offset;
-            ret.displaycount = findTModel.getListDescription().getIncludeCount();
-            ret.totalrecords = findTModel.getListDescription().getActualCount();
-            if (findTModel == null || findTModel.getTModelInfos() == null || findTModel.getTModelInfos().getTModelInfo().isEmpty())
{
+            if (findTModel.getListDescription() != null) {
+                ret.displaycount = findTModel.getListDescription().getIncludeCount();
+                ret.totalrecords = findTModel.getListDescription().getActualCount();
+            }
+            if (findTModel.getTModelInfos() == null || findTModel.getTModelInfos().getTModelInfo().isEmpty())
{
                 ret.renderedHtml = ResourceLoader.GetResource(session, "errors.norecordsfound");//"No
tModels are defined";
             } else {
                 // if (!isChooser) {
@@ -1756,6 +1759,7 @@ public class UddiHub implements Serializ
                     tmi.setName(tmodelDetails.getName());
                     tmi.setTModelKey(tmodelDetails.getTModelKey());
                     tmi.getDescription().addAll(tmodelDetails.getDescription());
+                    findBusiness.setTModelInfos(new TModelInfos());
                     findBusiness.getTModelInfos().getTModelInfo().add(tmi);
 
                     break;
@@ -3528,11 +3532,11 @@ public class UddiHub implements Serializ
                 TransferToken tt = new TransferToken();
                 Holder<String> node = new Holder<String>();
                 Holder<XMLGregorianCalendar> xcal = new Holder<XMLGregorianCalendar>();
-                Holder<byte[]> token = new Holder<byte[]>();
+                Holder<byte[]> ttoken = new Holder<byte[]>();
                 try {
-                    custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal, token);
+                    custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal, ttoken);
                     tt.setNodeID(node.value);
-                    tt.setOpaqueToken(token.value);
+                    tt.setOpaqueToken(ttoken.value);
                     tt.setExpirationTime(xcal.value);
                     response = tt;
                 } catch (Exception ex) {
@@ -3540,9 +3544,9 @@ public class UddiHub implements Serializ
                         DispositionReportFaultMessage f = (DispositionReportFaultMessage)
ex;
                         if (f.getFaultInfo().countainsErrorCode(DispositionReport.E_AUTH_TOKEN_EXPIRED)
|| ex.getMessage().contains(DispositionReport.E_AUTH_TOKEN_EXPIRED)) {
                             token = null;
-                            custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal,
token);
+                            custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal,
ttoken);
                             tt.setNodeID(node.value);
-                            tt.setOpaqueToken(token.value);
+                            tt.setOpaqueToken(ttoken.value);
                             tt.setExpirationTime(xcal.value);
                             response = tt;
                         }



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


Mime
View raw message