I have developed a client registry customizer that I would like to
contribute back to Jetspeed.  It is based off of the PSML customizer.  I
have attached a file with the necessary patches to integrate the security
customizer as well as the new templates and code that provide the
functionality.  I have also attached 2 vm (mimes.vm and capability.vm) files
that should be placed into WEB-INF/templates/vm/include.

I have logged this in Bugzilla with the attachments. The bug can be found
here:  http://issues.apache.org/bugzilla/show_bug.cgi?id=18737

If you have any questions, please feel free to let me know.

Jeremy Ford

How to use:

Adding a client entry
1) Click on "Add Client" in the Admin's Client browser
2) Enter a name for you client entry, along with user agent patter,
manufacturer, model, and version.
3) Click on "Insert Client".
4) You will be taken to the client update form where you can add mime types
and capabilities

Updating a client entry
1) Choose a client entry and click on "Edit"
2) Make modifications
3) Click on "Update Client"
4) The form should reflect your changes

Adding a Mime type
1) Choose a client entry and click on "Edit"
2) Either type the name of the mime type of choose the type and subtype from
the combo boxes.
3) Click "Add Mimetype"
4) The mime type should now appear in your page

Removing a Mime type
1) Choose a client entry and click on "Edit"
2) Choose the mime types that you wish to remove
3) Click on "Remove Mimetypes"
4) The mime types should no longer appear

Adding a Capability
1) Choose a client entry and click on "Edit"
2) Choose 1 or more capabilities from the combo box
3) Click "Add Capability"
4) The capabilities should now appear in your page

Removing a Capability
1) Choose a client entry and click on "Edit"
2) Choose the capabilities that you wish to remove
3) Click on "Remove Capabilities"
4) The capabilities should no longer appear

Deleting a client entry
1) Choose a security entry and click on "Delete"
2) Confirm your decision
3) The client entry will not be in the browser
Index: admin.xreg
===================================================================
RCS file: /home/cvspublic/jakarta-jetspeed/webapp/WEB-INF/conf/admin.xreg,v
retrieving revision 1.33
diff -u -r1.33 admin.xreg
--- admin.xreg  4 Mar 2003 17:39:42 -0000       1.33
+++ admin.xreg  5 Apr 2003 21:44:16 -0000
@@ -491,5 +491,22 @@
         <url cachedOnURL="true"/>
         <category group="Jetspeed">admin</category>
     </portlet-entry>
+    <portlet-entry name="ClientForm" hidden="true" type="ref"
+        parent="CustomizerVelocity" application="false">
+        <security role="admin"/>
+        <security-ref parent="admin-only"/>
+        <meta-info>
+            <title>Client</title>
+            <description>Security Client Maintenance for Jetspeed</description>
+        </meta-info>
+        
<classname>org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet</classname>
+        <parameter name="template" value="client-form" hidden="true"
+            cachedOnName="true" cachedOnValue="true"/>
+        <parameter name="action" value="portlets.ClientUpdateAction"
+            hidden="true" cachedOnName="true" cachedOnValue="true"/>
+        <media-type ref="html"/>
+        <url cachedOnURL="true"/>
+        <category group="Jetspeed">admin</category>
+    </portlet-entry>
 </registry>
 
Index: default.psml
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/webapp/WEB-INF/psml/user/admin/html/default.psml,v
retrieving revision 1.20
diff -u -r1.20 default.psml
--- default.psml        4 Mar 2003 17:39:42 -0000       1.20
+++ default.psml        5 Apr 2003 21:44:41 -0000
@@ -84,5 +84,8 @@
         <entry id='349' parent="PortletForm">
             <parameter name="_menustate" value="closed"/>
         </entry>
+        <entry id='351' parent="ClientForm">
+            <parameter name="_menustate" value="closed"/>
+        </entry>
     </portlets>
 </portlets>

Index: portlets/html/browser-client.vm
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/browser-client.vm,v
retrieving revision 1.1
diff -u -r1.1 browser-client.vm
--- portlets/html/browser-client.vm     30 Oct 2002 15:55:51 -0000      1.1
+++ portlets/html/browser-client.vm     5 Apr 2003 21:44:58 -0000
@@ -5,6 +5,7 @@
     <th>Pattern</th>
     <th>Mime Types</th>
     <th>Capabilities</th>
+    <th colspan="2">Actions</th>
   </tr>
 #foreach ( $entry in $registry )
   <tr>
@@ -25,6 +26,8 @@
        $capability<br />
 #end
     </td>
+    <td align="center"><a style="font-size:10" 
href="$jslink.setPaneByName("ClientForm").addQueryData("mode","update").addQueryData("client_name",
 $!entry.Name)">Edit</a>&nbsp;</td>
+    <td align="center"><a style="font-size:10" 
href="$jslink.setPaneByName("ClientForm").addQueryData("mode","delete").addQueryData("client_name",
 $!entry.Name)">Delete</a>&nbsp;</td>
   </tr>
 #end
 </table>
@@ -36,9 +39,15 @@
 #end
     </td>
     <td align="left" width="50%">
-#if ($prev)
+#if ($next)
       <input type="submit" value="Next &gt; &gt;">
+      <input type="hidden" name="start" value="$next">
 #end
+    </td>
+  </tr>
+  <tr>
+    <td colspan=6 align="left">
+       <a style="font-size:10" 
href="$jslink.setPaneByName("ClientForm").addQueryData("mode","insert")">Add 
Client</a>&nbsp;
     </td>
   </tr>
 </table>
 
Index: portlets/html/client-form.vm
===================================================================
RCS file: portlets/html/client-form.vm
diff -N portlets/html/client-form.vm
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ portlets/html/client-form.vm        5 Apr 2003 21:44:59 -0000
@@ -0,0 +1,410 @@
+<table bgcolor="#ffffff" cellpadding="5">
+      #if ($msg)
+      <tr>
+        <td colspan="2">
+          <table bgcolor="#ffffff">
+            <tr>
+              <td>
+                $msg
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      #end
+</table>
+
+      #if (($mode == "delete"))
+       <form name="ClientForm" method="post" 
action="$jslink.getPaneByName("ClientBrowser").setAction("portlets.ClientUpdateAction")">
+      <table>
+          <tr>
+              <td colspan="2">Are you sure you want do delete this client?</td>
+          </tr>
+        <tr>
+            #formReadOnlyCell ("Name" "client_name" $!entry.Name)
+        </tr>
+      </table>
+      <table border="0"  cellspacing="0" cellpadding="5" width="30%">
+      <tr>
+        <td>
+          <input type="submit" name="eventSubmit_doDelete" value="Delete Client"/>
+        </td>
+        ##<td>
+        ##  <input type="submit" name="eventSubmit_doCancel" value="Cancel"/>
+        ##</td>
+      </tr>
+      </table>
+      </form>
+      #elseif ($mode == "insert")
+      <form name="ClientForm method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <table>
+               <input type="hidden" name="mode" value="update"/>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Name</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="client_name" 
value="$!data.user.getTemp("client_name")"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">User Agent Pattern</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="user_agent_pattern" 
value="$!data.user.getTemp("user_agent_pattern")"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Manufacturer</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="manufacturer" 
value="$!data.user.getTemp("manufacturer")"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Model</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="model" 
value="$!data.user.getTemp("model")"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Version</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="version" 
value="$!data.user.getTemp("version")"/>
+                   </font>
+                 </td>
+               </tr>
+               #*
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Hidden</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="checkbox" size="30" name="hidden" 
#if($!data.user.getTemp("hidden") == "on") checked="true"#end"/>
+                   </font>
+                 </td>
+               </tr>
+               *#
+       </table>
+       <table border="0"  cellspacing="0" cellpadding="5" width="30%">
+         <tr>
+           <td>
+             <input type="submit" name="eventSubmit_doInsert" value="Insert Client"/>
+           </td>
+               ##<td>
+               ##  <input type="submit" name="eventSubmit_doCancel" value="Cancel"/>
+               ##</td>
+         </tr>
+       </table>
+      </form>
+      #elseif($mode == "update")
+      <form name="ClientForm method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <table>
+               <input type="hidden" name="mode" value="update"/>
+               #formReadOnlyCell("Name" "client_name" $!entry.name)
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">User Agent Pattern</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="user_agent_pattern" 
value="$!entry.useragentpattern"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Manufacturer</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="manufacturer" 
value="$!entry.manufacturer"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Model</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="model" value="$!entry.model"/>
+                   </font>
+                 </td>
+               </tr>
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Version</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="text" size="30" name="version" 
value="$!entry.version"/>
+                   </font>
+                 </td>
+               </tr>
+               #*
+               <tr>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <b><font face="$ui.sansSerifFonts">Hidden</font></b>
+                 </td>
+                 <td bgcolor="$!{skin.TitleBackgroundColor}">
+                   <font face="$ui.sansSerifFonts">
+                     <input type="checkbox" size="30" name="hidden" 
#if($!entry.hidden) checked="true"#end/>
+                   </font>
+                 </td>
+               </tr>
+               *#
+               <tr>
+                 <td align="center"><input type="submit" name="eventSubmit_doUpdate" 
value="Update Client"/></td>
+               </tr>
+       </table>
+      </form>
+      <hr />
+      #if($entry.MimetypeMap.Mimetypes.hasNext())
+      <form name="RemoveMimeType method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <input type="hidden" name="client_name" value="$!entry.name"/>
+       <input type="hidden" name="mode" value="update"/>
+       <table>
+         #foreach($mimeType in $entry.MimetypeMap.Mimetypes)
+               <tr>
+                       <td><input type="checkbox" name="mimetype" 
value="$!mimeType"/></td>
+                       <td>$mimeType</td>
+               </tr>
+         #end
+         <tr>
+               <td>
+                       <td colspan="2" align="center"><input type="submit" 
name="eventSubmit_doRemovemimetype" value="Remove Mimetypes"/></td>
+               </td>
+         </tr>
+       </table>
+      </form>
+      #end
+      #parse("include/mimes.vm")
+      #parse("include/capability.vm")
+      <script>
+       var mimeTypes = new Object;
+       var capabilities = new Array;
+       var populated = false;
+       
+       function populate()
+       {
+               #foreach($type in $types)
+                       var $type.get(0)Var = new Array;
+                       #foreach($subType in $type.get(1))
+                               #set($varCount = $velocityCount - 1)
+                               var option$varCount = new Option;
+                               option${varCount}.value = "$subType";
+                               option${varCount}.text = "$subType";
+                               $type.get(0)Var[$varCount] = option${varCount};
+                       #end
+                       mimeTypes["$type.get(0)"] = $type.get(0)Var;
+               #end
+               
+               #set($capCount = 0)
+               
+               #foreach($capability in $capabilities)
+                       
+                       #if(!$entry.CapabilityMap.contains($capability))
+                               var option$capCount = new Option;
+                               option${capCount}.text = "$capability";
+                               option${capCount}.value = "$capability";
+                               capabilities[$capCount] = option$capCount;
+                               #set($capCount = $capCount + 1)
+                       #end
+               #end
+               
+               populated = true;
+       }
+       
+       function changeMimeList()
+       {
+               if(!populated)
+               {
+                       //alert("populating");
+                       populate();
+               }
+               
+               var type = 
document.AddMimeType.type.options[document.AddMimeType.type.selectedIndex].value;
+               var optionsList = mimeTypes[type];
+               
+               var subTypeElement = document.AddMimeType.subtype;
+               for(var i=0; i<optionsList.length; i++)
+               {
+                       subTypeElement.options[i] = optionsList[i];
+               }
+               
+               for(var j=optionsList.length; j<subTypeElement.options.length; j++)
+               {
+                       subTypeElement.options[j] = null;
+               }
+       }
+       
+       function changeCapList()
+       {
+               if(!populated)
+               {
+                       //alert("populating");
+                       populate();
+               }
+               
+               var capElement = document.AddCapability.capability;
+               for(var i=0; i<capabilities.length; i++)
+               {
+                       capElement.options[i] = capabilities[i];
+               }
+               
+               for(var j=capabilities.length; j<capElement.options.length; j++)
+               {
+                       capElement.options[j] = null;
+               }
+       }
+       
+       function updateMimeType()
+       {
+               var type = 
document.AddMimeType.type.options[document.AddMimeType.type.selectedIndex].value;
+               var subtype = 
document.AddMimeType.subtype.options[document.AddMimeType.subtype.selectedIndex].value;
+               
+               document.AddMimeType.mimetype.value = type + "/" + subtype;
+       }
+       
+       
+      </script>
+      
+      <p>Please Note: The first mime type added will be the preferred mime type</p>
+      <form name="AddMimeType" method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <input type="hidden" name="client_name" value="$!entry.name"/>
+       <input type="hidden" name="mode" value="update"/>
+       <table>
+         <tr>
+               <td colspan="2"><input size="50" type="text" name="mimetype" 
value="$!data.user.getTemp("mimetype")"/></td>
+         </tr>
+         <tr>
+               <td>
+               <select name="type" onChange="changeMimeList(); updateMimeType(); 
return true;">
+                       <option value="text">text</option>
+                       <option value="multipart">multipart</option>
+                       <option value="message">message</option>
+                       <option value="application">application</option>
+                       <option value="image">image</option>
+                       <option value="audio">audio</option>
+                       <option value="video">video</option>
+                       <option value="model">model</option>
+               </select>
+               </td>
+               <td>
+               <select name="subtype" onChange="updateMimeType(); return 
true;"><script>document.AddMimeType.type.selectedIndex=0; changeMimeList(); 
updateMimeType();</script></select>
+               </td>
+         </tr>
+         <tr>
+               <td colspan="2">
+                       <input type="submit" name="eventSubmit_doAddmimetype" 
value="Add Mimetype"/>
+               </td>
+         </tr>
+       </table>
+      </form>
+      <hr />
+      #if($entry.CapabilityMap.Capabilities.hasNext())
+      <form name="RemoveCapability method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <input type="hidden" name="client_name" value="$!entry.name"/>
+       <input type="hidden" name="mode" value="update"/>
+       <table>
+         #foreach($capability in $entry.CapabilityMap.Capabilities)
+               <tr>
+                       <td><input type="checkbox" name="capability" 
value="$!capability"/></td>
+                       <td>$!capability</td>
+               </tr>
+         #end
+         <tr>
+               <td>
+                       <td colspan="2" align="center"><input type="submit" 
name="eventSubmit_doRemovecapability" value="Remove Capabilities"/></td>
+               </td>
+         </tr>
+       </table>
+      </form>
+      #end
+      <form name="AddCapability" method="post" 
action="$jslink.getPaneByName("ClientForm").setAction("portlets.ClientUpdateAction")">
+       <input type="hidden" name="client_name" value="$!entry.name"/>
+       <input type="hidden" name="mode" value="update"/>
+       <table>
+         <tr>
+               ##<td><input type="text" name="capability" 
value="$!data.user.getTemp("capability")"/></td>
+               <td>
+                       <select multiple="true" name="capability">
+                       <option value=""></option>
+                       <script>changeCapList(); </script>
+                       #*
+                       <option value="HTML_3_2">HTML_3_2</option>
+                       <option value="HTML_4_0">HTML_4_0</option>
+                       <option value="HTML_TABLE">HTML_TABLE</option>
+                       <option value="HTML_NESTED_TABLE">HTML_NESTED_TABLE</option>
+                       <option value="HTML_FORM">HTML_FORM</option>
+                       <option value="HTML_FRAME">HTML_FRAME</option>
+                       <option value="HTML_IMAGE">HTML_IMAGE</option>
+                       <option value="HTML_JAVA">HTML_JAVA</option>
+                       <option value="HTML_JAVA_1_0">HTML_JAVA_1_0</option>
+                       <option value="HTML_JAVA_1_1">HTML_JAVA_1_1</option>
+                       <option value="HTML_JAVA_JRE">HTML_JAVA_JRE</option>
+                       <option value="HTML_JAVASCRIPT">HTML_JAVASCRIPT</option>
+                       <option 
value="HTML_JAVASCRIPT_1_0">HTML_JAVASCRIPT_1_0</option>
+                       <option 
value="HTML_JAVASCRIPT_1_1">HTML_JAVASCRIPT_1_1</option>
+                       <option 
value="HTML_JAVASCRIPT_1_2">HTML_JAVASCRIPT_1_2</option>
+                       <option value="HTML_ACTIVE_X">HTML_ACTIVE_X</option>
+                       <option value="HTML_PLUGIN">HTML_PLUGIN</option>
+                       <option value="HTML_CSS1">HTML_CSS1</option>
+                       <option value="HTML_CSS2">HTML_CSS2</option>
+                       <option value="HTML_CSSP">HTML_CSSP</option>
+                       <option value="HTML_IFRAME">HTML_IFRAME</option>
+                       <option value="HTML_LAYER">HTML_LAYER</option>
+                       <option value="">-------------</option>
+                       <option value="HTML_DOM_IE">HTML_DOM_IE</option>
+                       <option value="HTML_DOM_NS4">HTML_DOM_NS4</option>
+                       <option value="HTML_DOM_1">HTML_DOM_1</option>
+                       <option value="HTML_DOM_2">HTML_DOM_2</option>
+                       <option value="">-------------</option>
+                       <option value="WML_1_0">WML_1_0</option>
+                       <option value="WML_1_1">WML_1_1</option>
+                       <option value="WML_TABLE">WML_TABLE</option>
+                       <option value="">-------------</option>
+                       <option value="XML_XSLT">XML_XSLT</option>
+                       <option value="XML_XPATH">XML_XPATH</option>
+                       <option value="XML_XINCLUDE">XML_XINCLUDE</option>
+                       <option value="">-------------</option>
+                       <option value="HTTP_1_1">HTTP_1_1</option>
+                       <option value="HTTP_COOKIE">HTTP_COOKIE</option>
+                       *#
+                       </select>
+               </td>
+         </tr>
+         <tr>
+               <td>
+                       <input type="submit" name="eventSubmit_doAddcapability" 
value="Add Capability"/>
+               </td>
+         </tr>
+       </table>
+      </form>  
+      #end
+<table>
+  <tr>
+    <td>
+      <form name="PortletForm" method="post" 
action="$jslink.getPaneByName("ClientBrowser").setAction("portlets.ClientUpdateAction")">
+        <input type="submit" name="eventSubmit_doCancel" value="Back to Browser"/>
+      </form>
+    </td>
+  </tr>
+</table>
+

Index: CastorRegistryService.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/CastorRegistryService.java,v
retrieving revision 1.29
diff -u -r1.29 CastorRegistryService.java
--- CastorRegistryService.java  11 Dec 2002 17:23:51 -0000      1.29
+++ CastorRegistryService.java  5 Apr 2003 21:49:07 -0000
@@ -255,7 +255,7 @@
             return;
         }
 
-        BaseRegistry registry = (BaseRegistry) registries.get(regName);
+               LocalRegistry registry = (LocalRegistry) registries.get(regName);
 
         if (registry != null)
         {


Index: ClientUpdateAction.java
===================================================================
RCS file: ClientUpdateAction.java
diff -N ClientUpdateAction.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ClientUpdateAction.java     5 Apr 2003 22:21:53 -0000
@@ -0,0 +1,706 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ *     "Apache Jetspeed" must not be used to endorse or promote products
+ *    derived from this software without prior written permission. For
+ *    written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache" or
+ *    "Apache Jetspeed", nor may "Apache" appear in their name, without
+ *    prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.apache.jetspeed.modules.actions.portlets;
+
+import org.apache.jetspeed.modules.actions.portlets.security.SecurityConstants;
+import org.apache.jetspeed.om.registry.CapabilityMap;
+import org.apache.jetspeed.om.registry.ClientEntry;
+import org.apache.jetspeed.om.registry.base.BaseClientEntry;
+import org.apache.jetspeed.portal.portlets.VelocityPortlet;
+import org.apache.jetspeed.services.Registry;
+import org.apache.jetspeed.util.template.JetspeedLink;
+import org.apache.jetspeed.util.template.JetspeedLinkFactory;
+import org.apache.turbine.util.DynamicURI;
+import org.apache.turbine.util.Log;
+import org.apache.turbine.util.RunData;
+import org.apache.turbine.util.security.EntityExistsException;
+import org.apache.velocity.context.Context;
+
+/**
+ * @author Administrator
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class ClientUpdateAction extends VelocityPortletAction
+{
+
+       private static final String CLIENT_UPDATE_PANE = "ClientForm";
+
+       /**
+        * Subclasses must override this method to provide default behavior
+        * for the portlet action
+        */
+       /**
+        * Build the normal state content for this portlet.
+        *
+        * @param portlet The velocity-based portlet that is being built.
+        * @param context The velocity context for this request.
+        * @param rundata The turbine rundata context for this request.
+        */
+       protected void buildNormalContext(
+               VelocityPortlet portlet,
+               Context context,
+               RunData rundata)
+               throws Exception
+       {
+               String mode =
+                       
rundata.getParameters().getString(SecurityConstants.PARAM_MODE);
+               context.put(SecurityConstants.PARAM_MODE, mode);
+
+               String msgid =
+                       
rundata.getParameters().getString(SecurityConstants.PARAM_MSGID);
+               if (msgid != null)
+               {
+                       int id = Integer.parseInt(msgid);
+                       if (id < SecurityConstants.MESSAGES.length)
+                       {
+                               context.put(
+                                       SecurityConstants.PARAM_MSG,
+                                       SecurityConstants.MESSAGES[id]);
+                       }
+               }
+
+               if (mode != null
+                       && (mode.equals(SecurityConstants.PARAM_MODE_DELETE)
+                               || mode.equals(SecurityConstants.PARAM_MODE_UPDATE)))
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       ClientEntry clientEntry =
+                               (ClientEntry) Registry.getEntry(Registry.CLIENT, 
clientName);
+                       context.put("entry", clientEntry);
+               }
+       }
+
+       /**
+        * Insert a client entry into the registry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doInsert(RunData rundata, Context context) throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+
+                       if (clientName == null || clientName.length() == 0)
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_INSERT)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+                       else
+                       {
+                               //check if profile to be created already exists
+                               ClientEntry existingClientEntry =
+                                       (ClientEntry) Registry.getEntry(
+                                               Registry.CLIENT,
+                                               clientName);
+                               if (existingClientEntry != null)
+                               {
+                                       throw new EntityExistsException(
+                                               "ClientEntry: " + clientName + " 
Already Exists!");
+                               }
+
+                               BaseClientEntry clientEntry = new BaseClientEntry();
+                               clientEntry.setName(clientName);
+
+                               updateClientEntry(rundata, clientEntry);
+
+                               Registry.addEntry(Registry.CLIENT, clientEntry);
+
+                               clearUserData(rundata);
+                       }
+               }
+               catch (EntityExistsException e)
+               {
+                       //
+                       // dup key found - display error message - bring back to same 
screen
+                       //
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_INSERT)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               
SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_INSERT)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Update a client entry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doUpdate(RunData rundata, Context context) throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       BaseClientEntry clientEntry =
+                               (BaseClientEntry) Registry.getEntry(
+                                       Registry.CLIENT,
+                                       clientName);
+                       if (clientEntry != null)
+                       {
+                               updateClientEntry(rundata, clientEntry);
+                               Registry.addEntry(Registry.CLIENT, clientEntry);
+                               clearUserData(rundata);
+                       }
+                       else
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_UPDATE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_UPDATE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Add a mimetype to a client entry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doAddmimetype(RunData rundata, Context context)
+               throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       ClientEntry clientEntry =
+                               (ClientEntry) Registry.getEntry(Registry.CLIENT, 
clientName);
+                       if (clientEntry != null)
+                       {
+                               String mimeType = 
rundata.getParameters().getString("mimetype");
+                               clientEntry.getMimetypeMap().addMimetype(mimeType);
+
+                               Registry.addEntry(Registry.CLIENT, clientEntry);
+                               clearUserData(rundata);
+                       }
+                       else
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_UPDATE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_UPDATE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Remove mime types from a client entry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doRemovemimetype(RunData rundata, Context context)
+               throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       ClientEntry clientEntry =
+                               (ClientEntry) Registry.getEntry(Registry.CLIENT, 
clientName);
+                       if (clientEntry != null)
+                       {
+                               String[] mimeTypes =
+                                       rundata.getParameters().getStrings("mimetype");
+                               if (mimeTypes != null && mimeTypes.length > 0)
+                               {
+                                       for (int i = 0; i < mimeTypes.length; i++)
+                                       {
+                                               String mimeType = mimeTypes[i];
+
+                                               
clientEntry.getMimetypeMap().removeMimetype(mimeType);
+                                       }
+
+                                       Registry.addEntry(Registry.CLIENT, 
clientEntry);
+                                       clearUserData(rundata);
+                               }
+                       }
+                       else
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_UPDATE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_UPDATE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Add capabilities to a client entry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doAddcapability(RunData rundata, Context context)
+               throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       ClientEntry clientEntry =
+                               (ClientEntry) Registry.getEntry(Registry.CLIENT, 
clientName);
+                       if (clientEntry != null)
+                       {
+                               String[] capabilities =
+                                       
rundata.getParameters().getStrings("capability");
+                               if (capabilities != null && capabilities.length > 0)
+                               {
+                                       CapabilityMap cm = 
clientEntry.getCapabilityMap();
+                                       for (int i = 0; i < capabilities.length; i++)
+                                       {
+                                               String capability = capabilities[i];
+                                               if (cm.contains(capability))
+                                               {
+                                                       Log.info(
+                                                               "Client entry "
+                                                                       + clientName
+                                                                       + "already 
contains capabillity "
+                                                                       + capability);
+                                               }
+                                               else
+                                               {
+                                                       if(capability != null && 
capability.length() > 0)
+                                                       {
+                                                               
cm.addCapability(capability);
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               Registry.addEntry(Registry.CLIENT, clientEntry);
+                               clearUserData(rundata);
+                       }
+                       else
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_UPDATE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_UPDATE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Remove capabilites from a client entry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doRemovecapability(RunData rundata, Context context)
+               throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+                       ClientEntry clientEntry =
+                               (ClientEntry) Registry.getEntry(Registry.CLIENT, 
clientName);
+                       if (clientEntry != null)
+                       {
+                               String[] capabilities =
+                                       
rundata.getParameters().getStrings("capability");
+                               if (capabilities != null && capabilities.length > 0)
+                               {
+                                       for (int i = 0; i < capabilities.length; i++)
+                                       {
+                                               String capability = capabilities[i];
+
+                                               
clientEntry.getCapabilityMap().removeCapability(
+                                                       capability);
+                                       }
+
+                                       Registry.addEntry(Registry.CLIENT, 
clientEntry);
+                                       clearUserData(rundata);
+                               }
+                       }
+                       else
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_UPDATE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_UPDATE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_UPDATE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+
+                       resetForm(rundata);
+               }
+       }
+
+       /**
+        * Set the client entry parameters from the input parameters
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        */
+       private void updateClientEntry(
+               RunData rundata,
+               BaseClientEntry clientEntry)
+       {
+               String userAgentPattern =
+                       rundata.getParameters().getString("user_agent_pattern");
+               String manufacturer = 
rundata.getParameters().getString("manufacturer");
+               String model = rundata.getParameters().getString("model");
+               String version = rundata.getParameters().getString("version");
+               boolean hidden = rundata.getParameters().getBoolean("hidden", false);
+
+               clientEntry.setUseragentpattern(userAgentPattern);
+               clientEntry.setManufacturer(manufacturer);
+               clientEntry.setModel(model);
+               clientEntry.setVersion(version);
+               clientEntry.setHidden(hidden);
+       }
+
+       /**
+        * Delete a client entry from the registry
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doDelete(RunData rundata, Context context) throws Exception
+       {
+               try
+               {
+                       String clientName =
+                               rundata.getParameters().getString("client_name");
+
+                       if (clientName == null || clientName.length() == 0)
+                       {
+                               JetspeedLink link = 
JetspeedLinkFactory.getInstance(rundata);
+                               DynamicURI duri =
+                                       link
+                                               .getPaneByName(CLIENT_UPDATE_PANE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MODE,
+                                                       
SecurityConstants.PARAM_MODE_DELETE)
+                                               .addPathInfo(
+                                                       SecurityConstants.PARAM_MSGID,
+                                                       
SecurityConstants.MID_INVALID_ENTITY_NAME);
+                               JetspeedLinkFactory.putInstance(link);
+                               rundata.setRedirectURI(duri.toString());
+
+                               resetForm(rundata);
+                       }
+                       else
+                       {
+                               Registry.removeEntry(Registry.CLIENT, clientName);
+                               clearUserData(rundata);
+                       }
+               }
+               catch (Exception e)
+               {
+                       JetspeedLink link = JetspeedLinkFactory.getInstance(rundata);
+                       DynamicURI duri =
+                               link
+                                       .getPaneByName(CLIENT_UPDATE_PANE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MODE,
+                                               SecurityConstants.PARAM_MODE_DELETE)
+                                       .addPathInfo(
+                                               SecurityConstants.PARAM_MSGID,
+                                               SecurityConstants.MID_DELETE_FAILED);
+                       JetspeedLinkFactory.putInstance(link);
+                       rundata.setRedirectURI(duri.toString());
+               }
+       }
+
+       /**
+        * Cleanup method
+        * @param rundata The turbine rundata context for this request.
+        * @param context The velocity context for this request.
+        * @throws Exception
+        */
+       public void doCancel(RunData rundata, Context context) throws Exception
+       {
+               clearUserData(rundata);
+       }
+
+       /**
+        * Populates the user's temp storage with form data
+        * @param rundata The turbine rundata context for this request.
+        */
+       private void resetForm(RunData rundata)
+       {
+               String clientName = rundata.getParameters().getString("client_name");
+               String userAgentPattern =
+                       rundata.getParameters().getString("user_agent_pattern");
+               String manufacturer = 
rundata.getParameters().getString("manufacturer");
+               String model = rundata.getParameters().getString("model");
+               String version = rundata.getParameters().getString("version");
+               String hidden = rundata.getParameters().getString("hidden");
+
+               String capability = rundata.getParameters().getString("capability");
+               String mimeType = rundata.getParameters().getString("mimetype");
+
+               rundata.getUser().setTemp("client_name", clientName);
+               rundata.getUser().setTemp("user_agent_pattern", userAgentPattern);
+               rundata.getUser().setTemp("manufacturer", manufacturer);
+               rundata.getUser().setTemp("model", model);
+               rundata.getUser().setTemp("version", version);
+               rundata.getUser().setTemp("hidden", hidden);
+
+               rundata.getUser().setTemp("capability", capability);
+               rundata.getUser().setTemp("mimetype", mimeType);
+       }
+
+       /**
+        * Clears the temporary storage of any data that was used
+        * @param rundata The turbine rundata context for this request.
+        */
+       private void clearUserData(RunData rundata)
+       {
+               try
+               {
+                       rundata.getUser().removeTemp("client_name");
+                       rundata.getUser().removeTemp("user_agent_pattern");
+                       rundata.getUser().removeTemp("manufacturer");
+                       rundata.getUser().removeTemp("model");
+                       rundata.getUser().removeTemp("version");
+                       rundata.getUser().removeTemp("hidden");
+
+                       rundata.getUser().removeTemp("capability");
+                       rundata.getUser().removeTemp("mimetype");
+               }
+               catch (Exception e)
+               {
+                       if (Log.getLogger().isDebugEnabled())
+                       {
+                               Log.debug("ClientUpdateAction: Failed to clear user 
data");
+                       }
+               }
+       }
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to