Class MergedList

    • Constructor Detail

      • MergedList

        public MergedList()
    • Method Detail

      • loadChannelsFromDelimitedString

        public void loadChannelsFromDelimitedString​(boolean isOnWorkspaceTab,
                                                    MergedList.EntryProvider entryProvider,
                                                    String userId,
                                                    String[] channelArray,
                                                    boolean isSuperUser,
                                                    String currentSiteId)
        loadChannelsFromDelimitedString Selects and loads channels from a list provided by the entryProvider parameter. The algorithm for loading channels is a bit complex, and depends on whether or not the user is currently in their "My Workspace", etc. This function formerly filtered through a list of all sites. It still goes through the motions of filtering, and deciding how to flag the channels as to whether or not they are merged, hidden, etc. However, it has been modified to take all of its information from an EntryProvider parameter, This list is now customized and is no longer "all sites in existence". When sites are being selected for merging, this list can be quite long. This function is more often called just to display merged events, so passing a more restricted list makes for better performance. At some point we could condense redundant logic, but this modification was performed under the time constraints of a release. So, an effort was made not to tinker with the logic, so much as to reduce the set of data that the function had to process.
        Parameters:
        isOnWorkspaceTab - - true if this is the user's my workspace
        entryProvider - - provides available channels for load/merge
        userId - - current userId
        channelArray - - array of selected channels for load/merge
        isSuperUser - - if true, then don't merge all available channels
        currentSiteId - - current worksite
      • loadChannelsFromDelimitedString

        public void loadChannelsFromDelimitedString​(boolean isOnWorkspaceTab,
                                                    boolean mergeAllOnWorkspaceTab,
                                                    MergedList.EntryProvider entryProvider,
                                                    String userId,
                                                    String[] channelArray,
                                                    boolean isSuperUser,
                                                    String currentSiteId)
        loadChannelsFromDelimitedString (see description on above method)
        Parameters:
        isOnWorkspaceTab - - true if this is the user's my workspace
        mergeAllOnWorkspaceTab - - if true, merge all channels in channelArray
        entryProvider - - provides available channels for load/merge
        userId - - current userId
        channelArray - - array of selected channels for load/merge
        isSuperUser - - if true, then don't merge all available channels
        currentSiteId - - current worksite
      • getAllPermittedChannels

        public String[] getAllPermittedChannels​(MergedList.ChannelReferenceMaker refMaker)
        Forms an array of all channel references to which the user has read access.
      • getChannelReferenceArrayFromDelimitedString

        public String[] getChannelReferenceArrayFromDelimitedString​(String primarychannelReference,
                                                                    String mergedInitParameterValue)
        This gets a list of channels from the portlet configuration information. Channels here can really be a channel or a schedule from a site.
      • loadFromRunData

        public void loadFromRunData​(org.sakaiproject.util.ParameterParser params)
        Loads data input by the user into this list and then saves the list to the portlet config information. The initContextForMergeOptions() function must have previously been called.
      • getDelimitedChannelReferenceString

        public String getDelimitedChannelReferenceString()
        Loads data input by the user into this list and then saves the list to the portlet config information. The initContextForMergeOptions() function must have previously been called.
      • getReferenceList

        public List getReferenceList()
        Returns an array of merged references.