On 07/05/2011 12:23 PM, Johannes Renner wrote:
> Hello,
> 
> for making it more generic, we refactored the web UI vendor channel listing
> from 'RedHat.do' to 'Vendor.do'. Unfortunately, doing this in a consistent
> way includes changes in quite an amount of files. If this refactoring is
> still acceptable for upstream, you might want to apply my attached patch.

Another thing we'd like to propose is renaming the API method 
'listRedHatChannels()'
to the more generic 'listVendorChannels()'. This can of course be done while 
keeping
the old method as an alias to the refactored one, but marking it as deprecated.

Please see the attached patch.

Thank you,
Johannes

-- 
SUSE LINUX Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
>From 26ec3434e73090155d267b0f6deee4f1ec402ff5 Mon Sep 17 00:00:00 2001
From: Johannes Renner <jren...@suse.de>
Date: Tue, 5 Jul 2011 12:48:33 +0200
Subject: [PATCH] Refactor and deprecate API method to listVendorChannels

---
 .../frontend/xmlrpc/channel/ChannelHandler.java    |   26 +++++++++++++++++--
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/ChannelHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/ChannelHandler.java
index a1135b0..a584ee3 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/ChannelHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/ChannelHandler.java
@@ -121,12 +121,12 @@ public class ChannelHandler extends BaseHandler {
     }
 
     /**
-     * Lists all Red Hat software channels that the user's organization is entitled to.
+     * Lists all of the vendor's software channels that the user's organization is entitled to.
      * @param sessionKey session containing User information.
      * @return Returns array of channels with info such as channel_label, channel_name,
      * channel_parent_label, packages and systems.
      *
-     * @xmlrpc.doc List all Red Hat software channels that the user's organization is
+     * @xmlrpc.doc List all of the vendor's software channels that the user's organization is
      * entitled to.
      * @xmlrpc.param #session_key()
      * @xmlrpc.returntype
@@ -134,7 +134,7 @@ public class ChannelHandler extends BaseHandler {
      *         $ChannelTreeNodeSerializer
      *     #array_end()
      */
-    public Object[] listRedHatChannels(String sessionKey) {
+    public Object[] listVendorChannels(String sessionKey) {
         User user = ChannelHandler.getLoggedInUser(sessionKey);
         DataResult<ChannelTreeNode> dr = ChannelManager.vendorChannelTree(user, null);
         dr.elaborate();
@@ -142,6 +142,26 @@ public class ChannelHandler extends BaseHandler {
     }
 
     /**
+     * Lists all Red Hat software channels that the user's organization is entitled to.
+     * @param sessionKey session containing User information.
+     * @return Returns array of channels with info such as channel_label, channel_name,
+     * channel_parent_label, packages and systems.
+     * @deprecated being replaced by listVendorChannels(String sessionKey)
+     *
+     * @xmlrpc.doc List all Red Hat software channels that the user's organization is
+     * entitled to.
+     * @xmlrpc.param #session_key()
+     * @xmlrpc.returntype
+     *     #array()
+     *         $ChannelTreeNodeSerializer
+     *     #array_end()
+     */
+    @Deprecated
+    public Object[] listRedHatChannels(String sessionKey) {
+        return listVendorChannels(sessionKey);
+    }
+
+    /**
      * Lists the most popular software channels based on the popularity
      * count given.
      * @param sessionKey session containing User information.
-- 
1.7.3.4

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to