public class ConfigChannelListProcessor
extends java.lang.Object
Constructor and Description |
---|
ConfigChannelListProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.List cfgChannels,
ConfigChannel cc)
Adds a configuration channel to an activation key, giving it the
highest value for the position (or the lowest priority)
|
void |
add(java.util.List cfgChannels,
ConfigChannel cc,
int rank)
Adds a channel to an activation key at the given position
|
void |
clear(java.util.List cfgChannels)
Removes all the config channels associated
to this server.
|
boolean |
remove(java.util.List cfgChannels,
ConfigChannel cc)
Assumption here is that the security aspect
of this the list removal is already taken care of
i.e make sure that the user has the authority to remove
these channels before embarking on it..
|
boolean |
remove(java.util.List cfgChannels,
java.util.List channelsToRemove)
Assumption here is that the security aspect
of this the list removal is already taken care of
i.e make sure that the user has the authority to remove
these channels before embarking on it..
|
void |
replace(java.util.List<ConfigChannel> oldChannels,
java.util.List<ConfigChannel> newChannels)
Replaces the list of the config channels
with the a new set of listings
this is done so that if a customer
provides , n channels and says these should be
by rankings, it should work...
|
void |
validateUserAccess(User user,
java.util.List<ConfigChannel> cfgChannels)
Checks whether a user has the permission to
work with a list of ConfigChannels and raises an
LookupException if the given user does NOT have access
to all the channels
|
public void add(java.util.List cfgChannels, ConfigChannel cc)
cfgChannels
- the base channel list to which
the new channel will be appendedcc
- The config channel to subscribe topublic void add(java.util.List cfgChannels, ConfigChannel cc, int rank)
cfgChannels
- the base channel list to which
the new channel will be inserted at the given rankcc
- the channel to subscriberank
- the positon/ranking of the channel in the system list,
must be > 0public boolean remove(java.util.List cfgChannels, ConfigChannel cc)
cfgChannels
- the config channels list from whom the
given channel will be removed..cc
- the ConfigChannel to removepublic boolean remove(java.util.List cfgChannels, java.util.List channelsToRemove)
cfgChannels
- the config channels list from whom the
given channel will be removed..channelsToRemove
- the list of ConfigChannels to removepublic void clear(java.util.List cfgChannels)
cfgChannels
- the config channels list that'll be cleared.public void replace(java.util.List<ConfigChannel> oldChannels, java.util.List<ConfigChannel> newChannels)
oldChannels
- existing channels that'd be replacenewChannels
- the contents of the new channelspublic void validateUserAccess(User user, java.util.List<ConfigChannel> cfgChannels)
user
- the user object to check for checking accesscfgChannels
- the list of channels to search on.