uPortal 2.4.1
API Documentation

org.jasig.portal
Class ChannelRegistryManager

java.lang.Object
  extended byorg.jasig.portal.ChannelRegistryManager

public class ChannelRegistryManager
extends java.lang.Object

Manages the channel registry which is a listing of published channels that one can subscribe to (add to their layout). Also currently manages the channel types data and CPD documents. (maybe these should be managed by another class -Ken)

Version:
$Revision: 1.48 $
Author:
Ken Weiner, kweiner@unicon.net

Constructor Summary
ChannelRegistryManager()
           
 
Method Summary
static org.w3c.dom.NodeList getCategories(java.lang.String channelPublishId)
          Looks in channel registry for a channel element matching the given channel ID.
static org.w3c.dom.Element getChannel(java.lang.String channelPublishId)
          Looks in channel registry for a channel element matching the given channel ID.
static org.w3c.dom.Document getChannelRegistry()
          Returns a copy of the channel registry as a Document.
static org.w3c.dom.Document getChannelRegistry(IPerson person)
          Returns the channel registry as a Document.
static org.w3c.dom.Document getChannelRegistryXML()
          Returns an XML document which describes the channel registry.
static org.w3c.dom.Document getChannelTypes()
          Returns the publishable channel types as a Document.
static org.w3c.dom.Document getChannelTypesXML()
          Create XML representing the channel types.
static org.w3c.dom.Element getChannelXML(java.lang.String subscribeId, ChannelDefinition channelDef)
          Create XML representing this channel definition.
static org.w3c.dom.Document getCPD(java.lang.String chanTypeID)
          Returns a CPD (channel publishing document) as a Document
static void publishChannel(org.w3c.dom.Element channel, java.lang.String[] categoryIDs, IGroupMember[] groupMembers, IPerson publisher)
          Publishes a channel.
static void removeChannel(java.lang.String channelID, IPerson person)
          Removes a channel from the channel registry.
static void setChannelXML(org.w3c.dom.Element channelE, ChannelDefinition channelDef)
          Update a channel definition with data from a channel XML element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelRegistryManager

public ChannelRegistryManager()
Method Detail

getChannelRegistry

public static org.w3c.dom.Document getChannelRegistry()
                                               throws PortalException
Returns a copy of the channel registry as a Document. This document is not filtered according to a user's channel permissions. For a filtered list, see getChannelRegistry(IPerson person)

Returns:
a copy of the channel registry as a Document
Throws:
PortalException

getChannelRegistry

public static org.w3c.dom.Document getChannelRegistry(IPerson person)
                                               throws PortalException
Returns the channel registry as a Document. This document is filtered according to a user's channel permissions.

Returns:
the filtered channel registry as a Document
Throws:
PortalException

getChannelRegistryXML

public static org.w3c.dom.Document getChannelRegistryXML()
                                                  throws java.lang.Exception
Returns an XML document which describes the channel registry. See uPortal's channelRegistry.dtd

Returns:
doc the channel registry document
Throws:
java.lang.Exception

getChannel

public static org.w3c.dom.Element getChannel(java.lang.String channelPublishId)
                                      throws PortalException
Looks in channel registry for a channel element matching the given channel ID.

Parameters:
channelPublishId - the channel publish id
Returns:
the channel element matching specified channel publish id
Throws:
PortalException

getChannelXML

public static org.w3c.dom.Element getChannelXML(java.lang.String subscribeId,
                                                ChannelDefinition channelDef)
Create XML representing this channel definition. I don't think this method really belongs in the ChannelRegistryManager since this XML fragment is related more to a channel instance, but we'll hold it here for now and find a better place for it later :)

Parameters:
subscribeId - the channel subscibe ID, formerly called instance ID
channelDef - a channel definition
Returns:
the XML representing this channel definition

setChannelXML

public static void setChannelXML(org.w3c.dom.Element channelE,
                                 ChannelDefinition channelDef)
Update a channel definition with data from a channel XML element. I don't think this method really belongs in the ChannelRegistryManager since this XML fragment contains a channel subscribe ID, but we'll hold it here for now and find a better place for it later :) Note that this method does not set the ID, publisher ID, approver ID, pubish date, or approval date.

Parameters:
channelE - an XML element representing a channel definition
channelDef - the channel definition to update

getChannelTypesXML

public static org.w3c.dom.Document getChannelTypesXML()
                                               throws java.lang.Exception
Create XML representing the channel types. It will look something like this:

org.jasig.portal.channels.CImage Image Simple channel to display an image with optional caption and subcaption webpages/media/org/jasig/portal/channels/CImage/CImage.cpd org.jasig.portal.channels.CWebProxy Web Proxy Incorporate a dynamic HTML or XML application webpages/media/org/jasig/portal/channels/CWebProxy/CWebProxy.cpd

Returns:
channelTypesXML, the XML representing the channel types
Throws:
java.lang.Exception

getCategories

public static org.w3c.dom.NodeList getCategories(java.lang.String channelPublishId)
                                          throws PortalException
Looks in channel registry for a channel element matching the given channel ID.

Parameters:
channelPublishId - the channel publish ID
Returns:
the channel element matching chanID
Throws:
PortalException

publishChannel

public static void publishChannel(org.w3c.dom.Element channel,
                                  java.lang.String[] categoryIDs,
                                  IGroupMember[] groupMembers,
                                  IPerson publisher)
                           throws java.lang.Exception
Publishes a channel.

Parameters:
channel - the channel XML fragment
categoryIDs - a list of categories that the channel belongs to
groupMembers - a list of groups and/or people that are permitted to subscribe to and view the channel
publisher - the user ID of the channel publisher
Throws:
java.lang.Exception

removeChannel

public static void removeChannel(java.lang.String channelID,
                                 IPerson person)
                          throws java.lang.Exception
Removes a channel from the channel registry.

Parameters:
channelID - the channel ID
person - the person removing the channel
Throws:
java.lang.Exception

getChannelTypes

public static org.w3c.dom.Document getChannelTypes()
                                            throws PortalException
Returns the publishable channel types as a Document.

Returns:
a list of channel types as a Document
Throws:
PortalException

getCPD

public static org.w3c.dom.Document getCPD(java.lang.String chanTypeID)
                                   throws PortalException
Returns a CPD (channel publishing document) as a Document

Parameters:
chanTypeID - the channel type ID, "-1" if channel type is "custom"
Returns:
the CPD document matching the chanTypeID, null if "custom" channel
Throws:
PortalException

uPortal 2.4.1
API Documentation