Interface NewsStore

All Known Implementing Classes:
HibernateNewsStore

public interface NewsStore
NewsStore provides a data store for news listings and configurations.
Since:
5.1.1
Author:
Anthony Colebourne, Jen Bourey
  • Method Details

    • getNewsSet

      NewsSet getNewsSet(Long id)

      getNewsSet.

      Parameters:
      id - a Long object
      Returns:
      a NewsSet object
    • getNewsSet

      NewsSet getNewsSet(String userId, String setName)

      getNewsSet.

      Parameters:
      userId - a String object
      setName - a String object
      Returns:
      a NewsSet object
    • getNewsSetsForUser

      List<NewsSet> getNewsSetsForUser(String userId)

      getNewsSetsForUser.

      Parameters:
      userId - a String object
      Returns:
      a List object
    • storeNewsSet

      void storeNewsSet(NewsSet set)

      storeNewsSet.

      Parameters:
      set - a NewsSet object
    • 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:
      a NewsDefinition object
    • getPredefinedNewsDefinition

      PredefinedNewsDefinition getPredefinedNewsDefinition(Long id)
      Retrieve a pre-defined news definition
      Parameters:
      id - ID of the news definition to be retrieved
      Returns:
      a PredefinedNewsDefinition object
    • getPredefinedNewsDefinitionByName

      PredefinedNewsDefinition getPredefinedNewsDefinitionByName(String fname)

      getPredefinedNewsDefinitionByName.

      Parameters:
      fname - a String object
      Returns:
      a PredefinedNewsDefinition object
    • 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:
      a NewsConfiguration object
    • 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:
      a List object
    • getUserDefinedNewsConfigurations

      List<UserDefinedNewsConfiguration> getUserDefinedNewsConfigurations(Long setId, boolean visibleOnly)
      Retrieve a list of user-defined news configurations for the specified portlet.
      Parameters:
      setId - unique ID for this portlet subscription
      visibleOnly - true to retrieve only non-hidden news configurations, false otherwise
      Returns:
      a List object
    • getPredefinedNewsConfigurations

      List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations(Long setId, boolean visibleOnly)
      Retrieve a list of pre-defined news configurations for the specified portlet.
      Parameters:
      setId - unique ID for this portlet subscription
      visibleOnly - true to retrieve only non-hidden news configurations, false otherwise
      Returns:
      a List object
    • getPredefinedNewsConfigurations

      List<PredefinedNewsConfiguration> getPredefinedNewsConfigurations()
      Retrieve a list of all pre-defined news configurations.
      Returns:
      a List object
    • 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:
      set - news collection to initialize
      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:
      setId - unique ID for this portlet subscription
      role - user role to use to find default newss
      Returns:
      a List object
    • getUserRoles

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