|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.ChannelRegistryManager
public class ChannelRegistryManager
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)
Field Summary | |
---|---|
private static java.lang.String |
CHANNEL_REGISTRY_CACHE_KEY
|
private static java.lang.String |
CHANNEL_TYPES_CACHE_KEY
|
protected static SmartCache |
channelRegistryCache
|
protected static SmartCache |
channelTypesCache
|
protected static int |
chanTypesCacheTimeout
Timeout, in seconds, of the cache of channel types. |
private static java.lang.String |
CPD_CACHE_KEY
|
protected static SmartCache |
cpdCache
|
protected static int |
cpdCacheTimeout
Timeout, in seconds, of the cache of channel publishing documents. |
protected static IChannelRegistryStore |
crs
|
private static int |
DEFAULT_CHAN_TYPES_CACHE_TIMEOUT
Default value for chanTypesCacheTimeout. |
private static int |
DEFAULT_CPD_CACHE_TIMEOUT
Default value for cpdCacheTimeout. |
private static boolean |
DEFAULT_LOCALE_AWARE
Default value for localeAware. |
private static int |
DEFAULT_REGISTRY_CACHE_TIMEOUT
Default value for registryCacheTimeout. |
private static java.lang.String |
FRAMEWORK_OWNER
|
private static java.lang.String |
GRANT_PERMISSION_TYPE
|
protected static boolean |
localeAware
Boolean indicating whether internationalization will be used. |
private static org.apache.commons.logging.Log |
log
|
protected static int |
registryCacheTimeout
Timeout, in seconds, of the cache of the registry of channels. |
private static java.lang.String |
SUBSCRIBER_ACTIVITY
|
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 |
private static void |
processGroupsRecursively(IEntityGroup group,
org.w3c.dom.Document owner,
org.w3c.dom.Element parentGroup)
|
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
protected static final IChannelRegistryStore crs
private static final int DEFAULT_REGISTRY_CACHE_TIMEOUT
private static final int DEFAULT_CHAN_TYPES_CACHE_TIMEOUT
private static final int DEFAULT_CPD_CACHE_TIMEOUT
private static final boolean DEFAULT_LOCALE_AWARE
protected static final int registryCacheTimeout
protected static final int chanTypesCacheTimeout
protected static final int cpdCacheTimeout
protected static final boolean localeAware
protected static final SmartCache channelRegistryCache
protected static final SmartCache channelTypesCache
protected static final SmartCache cpdCache
private static final java.lang.String CHANNEL_REGISTRY_CACHE_KEY
private static final java.lang.String CHANNEL_TYPES_CACHE_KEY
private static final java.lang.String CPD_CACHE_KEY
private static final java.lang.String FRAMEWORK_OWNER
private static final java.lang.String SUBSCRIBER_ACTIVITY
private static final java.lang.String GRANT_PERMISSION_TYPE
Constructor Detail |
---|
public ChannelRegistryManager()
Method Detail |
---|
public static org.w3c.dom.Document getChannelRegistry() throws PortalException
getChannelRegistry(IPerson person)
PortalException
public static org.w3c.dom.Document getChannelRegistry(IPerson person) throws PortalException
PortalException
public static org.w3c.dom.Document getChannelRegistryXML() throws java.lang.Exception
channelRegistry.dtd
java.lang.Exception
private static void processGroupsRecursively(IEntityGroup group, org.w3c.dom.Document owner, org.w3c.dom.Element parentGroup) throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.Element getChannel(java.lang.String channelPublishId) throws PortalException
channelPublishId
- the channel publish id
PortalException
public static org.w3c.dom.Element getChannelXML(java.lang.String subscribeId, ChannelDefinition channelDef)
subscribeId
- the channel subscibe ID, formerly called instance IDchannelDef
- a channel definition
public static void setChannelXML(org.w3c.dom.Element channelE, ChannelDefinition channelDef)
channelE
- an XML element representing a channel definitionchannelDef
- the channel definition to updatepublic static org.w3c.dom.Document getChannelTypesXML() throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.NodeList getCategories(java.lang.String channelPublishId) throws PortalException
channelPublishId
- the channel publish ID
PortalException
public static void publishChannel(org.w3c.dom.Element channel, java.lang.String[] categoryIDs, IGroupMember[] groupMembers, IPerson publisher) throws java.lang.Exception
channel
- the channel XML fragmentcategoryIDs
- a list of categories that the channel belongs togroupMembers
- a list of groups and/or people that are permitted to subscribe to and view the channelpublisher
- the user ID of the channel publisher
java.lang.Exception
public static void removeChannel(java.lang.String channelID, IPerson person) throws java.lang.Exception
channelID
- the channel IDperson
- the person removing the channel
java.lang.Exception
public static org.w3c.dom.Document getChannelTypes() throws PortalException
PortalException
public static org.w3c.dom.Document getCPD(java.lang.String chanTypeID) throws PortalException
chanTypeID
- the channel type ID, "-1" if channel type is "custom"
null
if "custom" channel
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |