Class PredefinedNewsDefinition

java.lang.Object
org.jasig.portlet.newsreader.NewsDefinition
org.jasig.portlet.newsreader.PredefinedNewsDefinition
All Implemented Interfaces:
Comparable<NewsDefinition>

public class PredefinedNewsDefinition extends NewsDefinition
PredefinedNewsDefinition represents a built-in news definition. These definitions are defined in the database by an administrator, and can be automatically added to user's news registration lists based on user role.
Since:
5.1.1
Author:
Anthony Colebourne, Jen Bourey
  • Constructor Details

    • PredefinedNewsDefinition

      public PredefinedNewsDefinition()
      Default constructor
    • PredefinedNewsDefinition

      public PredefinedNewsDefinition(Long id, String className, String name)
      Construct a new predefined news definition
      Parameters:
      id - a Long object
      className - a String object
      name - a String object
  • Method Details

    • getUserConfigurations

      public Set<PredefinedNewsConfiguration> getUserConfigurations()
      Get all the user configurations for this news definition
      Returns:
      a Set object
    • setUserConfigurations

      public void setUserConfigurations(Set<PredefinedNewsConfiguration> configurations)
      Set the user configurations for this news definition
      Parameters:
      configurations - a Set object
    • getDefaultRoles

      public Set<String> getDefaultRoles()
      Get the set of user roles who should get this news by default.
      Returns:
      set of default user roles
    • setDefaultRoles

      public void setDefaultRoles(Set<String> defaultRoles)
      Set the user roles should should get this news by default.
      Parameters:
      defaultRoles - set of default user roles
    • addUserConfiguration

      public void addUserConfiguration(PredefinedNewsConfiguration config)
      Add a user configuration for this news definition
      Parameters:
      config - a PredefinedNewsConfiguration object
    • addDefaultRole

      public void addDefaultRole(String role)
      Add a user role to the set of roles that should get this news by default.
      Parameters:
      role - user role to be added
    • getFname

      public String getFname()

      Getter for the field fname.

      Returns:
      a String object
    • setFname

      public void setFname(String fname)

      Setter for the field fname.

      Parameters:
      fname - a String object