org.jasig.portlet.newsreader.dao
Interface NewsStore

All Known Implementing Classes:
HibernateNewsStore

public interface NewsStore

NewsStore provides a data store for news listings and configurations.

Author:
Anthony Colebourne, Jen Bourey

Method Summary
 void deleteNewsConfiguration(NewsConfiguration configuration)
          Remove a news configuration from the data store
 void deleteNewsDefinition(PredefinedNewsDefinition definition)
          Remove a news definition from the data store.
 List<PredefinedNewsDefinition> getHiddenPredefinedNewsDefinitions(Long setId, Set<String> role)
          Retrieve a list of hidden predefined newss for this portlet subscription and role.
 NewsConfiguration getNewsConfiguration(Long id)
          Retrieve a news configuration.
 List<NewsConfiguration> getNewsConfigurations(String subscribeId)
          Retrieve a list of news configurations for the specified portlet.
 NewsDefinition getNewsDefinition(Long id)
          Retrieve a news definition.
 NewsSet getNewsSet(Long id)
           
 NewsSet getNewsSet(String userId, String setName)
           
 List<NewsSet> getNewsSetsForUser(String userId)
           
 List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations()
          Retrieve a list of all pre-defined news configurations.
 List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations(Long setId, boolean visibleOnly)
          Retrieve a list of pre-defined news configurations for the specified portlet.
 PredefinedNewsDefinition getPredefinedNewsDefinition(Long id)
          Retrieve a pre-defined news definition
 List<UserDefinedNewsConfiguration> getUserDefinedNewsConfigurations(Long setId, boolean visibleOnly)
          Retrieve a list of user-defined news configurations for the specified portlet.
 List<String> getUserRoles()
          Get a list of all user roles currently in use.
 void initNews(NewsSet set, Set<String> roles)
          Initialize news subscriptions for a given portlet subscription and role.
 void storeNewsConfiguration(NewsConfiguration configuration)
          Save or update a news configuration.
 void storeNewsDefinition(NewsDefinition definition)
          Save or update a news definition.
 void storeNewsSet(NewsSet set)
           
 

Method Detail

getNewsSet

NewsSet getNewsSet(Long id)

getNewsSet

NewsSet getNewsSet(String userId,
                   String setName)

getNewsSetsForUser

List<NewsSet> getNewsSetsForUser(String userId)

storeNewsSet

void storeNewsSet(NewsSet set)

storeNewsDefinition

void storeNewsDefinition(NewsDefinition definition)
Save or update a news definition.

Parameters:
definition - NewsDefinition to be persisted

getNewsDefinition

NewsDefinition getNewsDefinition(Long id)
Retrieve a news definition.

Parameters:
id - ID of the news definition to be retrieved
Returns:

getPredefinedNewsDefinition

PredefinedNewsDefinition getPredefinedNewsDefinition(Long id)
Retrieve a pre-defined news definition

Parameters:
id - ID of the news definition to be retrieved
Returns:

storeNewsConfiguration

void storeNewsConfiguration(NewsConfiguration configuration)
Save or update a news configuration.

Parameters:
configuration - NewsConfiguration to be persisted

getNewsConfiguration

NewsConfiguration getNewsConfiguration(Long id)
Retrieve a news configuration.

Parameters:
id - ID of the news configuration to be retrieved
Returns:

getNewsConfigurations

List<NewsConfiguration> getNewsConfigurations(String subscribeId)
Retrieve a list of news configurations for the specified portlet.

Parameters:
subscribeId - unique ID for this portlet subscription
Returns:

getUserDefinedNewsConfigurations

List<UserDefinedNewsConfiguration> getUserDefinedNewsConfigurations(Long setId,
                                                                    boolean visibleOnly)
Retrieve a list of user-defined news configurations for the specified portlet.

Parameters:
subscribeId - unique ID for this portlet subscription
visibleOnly - true to retrieve only non-hidden news configurations, false otherwise
Returns:

getPredefinedNewsConfigurations

List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations(Long setId,
                                                                  boolean visibleOnly)
Retrieve a list of pre-defined news configurations for the specified portlet.

Parameters:
subscribeId - unique ID for this portlet subscription
visibleOnly - true to retrieve only non-hidden news configurations, false otherwise
Returns:

getPredefinedNewsConfigurations

List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations()
Retrieve a list of all pre-defined news configurations.

Returns:

deleteNewsConfiguration

void deleteNewsConfiguration(NewsConfiguration configuration)
Remove a news configuration from the data store

Parameters:
configuration - configuration to be removed

deleteNewsDefinition

void deleteNewsDefinition(PredefinedNewsDefinition definition)
Remove a news definition from the data store.

Parameters:
definition - definition to be removed

initNews

void initNews(NewsSet set,
              Set<String> roles)
Initialize news subscriptions for a given portlet subscription and role.

Parameters:
subscribeId - unique ID for this portlet subscription
roles - user roles to use to find default newss

getHiddenPredefinedNewsDefinitions

List<PredefinedNewsDefinition> getHiddenPredefinedNewsDefinitions(Long setId,
                                                                  Set<String> role)
Retrieve a list of hidden predefined newss for this portlet subscription and role.

Parameters:
subscribeId - unique ID for this portlet subscription
role - user role to use to find default newss
Returns:

getUserRoles

List<String> getUserRoles()
Get a list of all user roles currently in use.

Returns:


Copyright © 2009-2011 Jasig. All Rights Reserved.