org.rhq.enterprise.server.content
Interface ChannelManagerRemote

All Known Subinterfaces:
WebservicesRemote

public interface ChannelManagerRemote


Method Summary
 void addPackageVersionsToChannel(Subject subject, int channelId, int[] packageVersionIds)
          Associates the package versions (identified by their IDs) to the given channel (also identified by its ID).
 Channel createChannel(Subject subject, Channel channel)
          Creates a new Channel.
 void deleteChannel(Subject subject, int channelId)
          Deletes the identified channel.
 PageList<Channel> findChannels(Subject subject, PageControl pc)
           
 PageList<Channel> findChannelsByCriteria(Subject subject, ChannelCriteria criteria)
           
 PageList<PackageVersion> findPackageVersionsInChannel(Subject subject, int channelId, String filter, PageControl pc)
          Returns the set of package versions that can currently be accessed via the given channel.
 PageList<PackageVersion> findPackageVersionsInChannelByCriteria(Subject subject, PackageVersionCriteria criteria)
           
 PageList<Resource> findSubscribedResources(Subject subject, int channelId, PageControl pc)
          Gets all resources that are subscribed to the given channel.
 Channel getChannel(Subject subject, int channelId)
           
 void subscribeResourceToChannels(Subject subject, int resourceId, int[] channelIds)
          Subscribes the identified resource to the set of identified channels.
 void unsubscribeResourceFromChannels(Subject subject, int resourceId, int[] channelIds)
          Unsubscribes the identified resource from the set of identified channels.
 Channel updateChannel(Subject subject, Channel channel)
          Update an existing Channel object's basic fields, like name, description, etc.
 

Method Detail

addPackageVersionsToChannel

void addPackageVersionsToChannel(Subject subject,
                                 int channelId,
                                 int[] packageVersionIds)
Associates the package versions (identified by their IDs) to the given channel (also identified by its ID).

Parameters:
subject - The logged in user's subject.
channelId - the ID of the channel
packageVersionIds - the list of package version IDs to add to the channel

createChannel

Channel createChannel(Subject subject,
                      Channel channel)
                      throws org.rhq.enterprise.server.content.ChannelException
Creates a new Channel. Note that the created channel will not have any content sources assigned and no resources will be subscribed. It is a virgin channel.

Parameters:
subject - The logged in user's subject.
channel - a new channel object.
Returns:
the newly created channel
Throws:
org.rhq.enterprise.server.content.ChannelException

deleteChannel

void deleteChannel(Subject subject,
                   int channelId)
Deletes the identified channel. If this deletion orphans package versions (that is, its originating resource or content source has been deleted), this will also purge those orphaned package versions.

Parameters:
subject - The logged in user's subject.
channelId -

getChannel

Channel getChannel(Subject subject,
                   int channelId)

findChannelsByCriteria

PageList<Channel> findChannelsByCriteria(Subject subject,
                                         ChannelCriteria criteria)

findPackageVersionsInChannelByCriteria

PageList<PackageVersion> findPackageVersionsInChannelByCriteria(Subject subject,
                                                                PackageVersionCriteria criteria)
Parameters:
subject -
criteria - Caller must add a valid channelId via PackageVersionCriteria.addFilterChannelId
Returns:
PackageVersions for the channel
Throws:
IllegalArgumentException - for invalid channelId filter

updateChannel

Channel updateChannel(Subject subject,
                      Channel channel)
                      throws org.rhq.enterprise.server.content.ChannelException
Update an existing Channel object's basic fields, like name, description, etc. Note that the given channel's relationships will be ignored and not merged with the existing channel (e.g. is subscribed resources will not be changed, regardless of what the given channel's subscribed resources set it). See methods like #addContentSourcesToChannel(Subject, int, int[]) to alter its relationships.

Parameters:
subject - The logged in user's subject.
channel - to be updated
Returns:
Channel that was updated
Throws:
org.rhq.enterprise.server.content.ChannelException

findPackageVersionsInChannel

PageList<PackageVersion> findPackageVersionsInChannel(Subject subject,
                                                      int channelId,
                                                      String filter,
                                                      PageControl pc)
Returns the set of package versions that can currently be accessed via the given channel.

Parameters:
subject - The logged in user's subject.
channelId - identifies the channel
filter - A channel filter.
pc - pagination controls
Returns:
the package versions that are available in the channel

findChannels

PageList<Channel> findChannels(Subject subject,
                               PageControl pc)

findSubscribedResources

PageList<Resource> findSubscribedResources(Subject subject,
                                           int channelId,
                                           PageControl pc)
Gets all resources that are subscribed to the given channel.

Parameters:
subject - The logged in user's subject.
channelId -
pc -
Returns:
the list of subscribers

subscribeResourceToChannels

void subscribeResourceToChannels(Subject subject,
                                 int resourceId,
                                 int[] channelIds)
Subscribes the identified resource to the set of identified channels. Once complete, the resource will be able to access all package content from all content sources that are assigned to the given channels.

Parameters:
subject - The logged in user's subject.
resourceId - The id of the resource to be subscribed.
channelIds - A list of channels to which the resource is subscribed.

unsubscribeResourceFromChannels

void unsubscribeResourceFromChannels(Subject subject,
                                     int resourceId,
                                     int[] channelIds)
Unsubscribes the identified resource from the set of identified channels.

Parameters:
subject - The logged in user's subject.
resourceId - The id of the resource to be subscribed.
channelIds - A list of channels to which the resource is subscribed.


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.