org.jasig.portlet.newsreader
Class PredefinedNewsDefinition

java.lang.Object
  extended by org.jasig.portlet.newsreader.NewsDefinition
      extended by 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.

Author:
Anthony Colebourne, Jen Bourey

Constructor Summary
PredefinedNewsDefinition()
          Default constructor
PredefinedNewsDefinition(Long id, String className, String name)
          Construct a new predefined news definition
 
Method Summary
 void addDefaultRole(String role)
          Add a user role to the set of roles that should get this news by default.
 void addUserConfiguration(PredefinedNewsConfiguration config)
          Add a user configuration for this news definition
 Set<String> getDefaultRoles()
          Get the set of user roles who should get this news by default.
 Set<PredefinedNewsConfiguration> getUserConfigurations()
          Get all the user configurations for this news definition
 void setDefaultRoles(Set<String> defaultRoles)
          Set the user roles should should get this news by default.
 void setUserConfigurations(Set<PredefinedNewsConfiguration> configurations)
          Set the user configurations for this news definition
 
Methods inherited from class org.jasig.portlet.newsreader.NewsDefinition
addParameter, compareTo, getClassName, getId, getName, getParameters, setClassName, setId, setName, setParameters, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PredefinedNewsDefinition

public PredefinedNewsDefinition()
Default constructor


PredefinedNewsDefinition

public PredefinedNewsDefinition(Long id,
                                String className,
                                String name)
Construct a new predefined news definition

Parameters:
id -
className -
name -
Method Detail

getUserConfigurations

public Set<PredefinedNewsConfiguration> getUserConfigurations()
Get all the user configurations for this news definition

Returns:

setUserConfigurations

public void setUserConfigurations(Set<PredefinedNewsConfiguration> configurations)
Set the user configurations for this news definition

Parameters:
configurations -

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 -

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


Copyright © 2009-2011 Jasig. All Rights Reserved.