Package org.silverpeas.components.quickinfo.model

# Class News.Builder

java.lang.Object
org.silverpeas.components.quickinfo.model.News.Builder

Enclosing class:
  News

public static class News.Builder extends Object
A builder of a `News` instance by setting some of its properties.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `News`
  `build()`
  Builds a `News` instance from the properties that were previously set with this builder.
  `News.Builder`
  `setImportant(boolean important)`
  Sets important flag of the `News` instance to build.
  `News.Builder`
  `setKeywords(String keywords)`
  Sets the keywords of the `News` instance to build.
  `News.Builder`
  `setMandatory(boolean mandatory)`
  Sets mandatory flag of the `News` instance to build.
  `News.Builder`
  `setTicker(boolean ticker)`
  Sets ticker flag of the `News` instance to build.
  `News.Builder`
  `setTitleAndDescription(String title, String description)`
  Sets the given title and description of the news to build.
  `News.Builder`
  `setVisibilityPeriod(org.silverpeas.core.date.Period period)`
  Sets the visibility period of the `News` instance to build.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### build

    public News build()
    Builds a `News` instance from the properties that were previously set with this builder.
    Returns:
      a `News` instance.

  - ### setMandatory

    public News.Builder setMandatory(boolean mandatory)
    Sets mandatory flag of the `News` instance to build.
    Parameters:
      `mandatory` - the mandatory flag.
    Returns:
      itself.

  - ### setTicker

    public News.Builder setTicker(boolean ticker)
    Sets ticker flag of the `News` instance to build.
    Parameters:
      `ticker` - the ticker flag.
    Returns:
      itself.

  - ### setImportant

    public News.Builder setImportant(boolean important)
    Sets important flag of the `News` instance to build.
    Parameters:
      `important` - the important flag.
    Returns:
      itself.

  - ### setVisibilityPeriod

    public News.Builder setVisibilityPeriod(org.silverpeas.core.date.Period period)
    Sets the visibility period of the `News` instance to build.
    Parameters:
      `period` - the visibility period.
    Returns:
      itself.

  - ### setKeywords

    public News.Builder setKeywords(String keywords)
    Sets the keywords of the `News` instance to build.
    Parameters:
      `keywords` - the keywords of the news.
    Returns:
      itself.

  - ### setTitleAndDescription

    public News.Builder setTitleAndDescription(String title, String description)
    Sets the given title and description of the news to build.
    Parameters:
      `title` - the title of the news.
      `description` - the description of the news.
    Returns:
      itself.