Class News.Builder
java.lang.Object
org.silverpeas.components.quickinfo.model.News.Builder
- Enclosing class:
- News
A builder of a
News instance by setting some of its properties.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aNewsinstance from the properties that were previously set with this builder.setImportant(boolean important) Sets important flag of theNewsinstance to build.setKeywords(String keywords) Sets the keywords of theNewsinstance to build.setMandatory(boolean mandatory) Sets mandatory flag of theNewsinstance to build.setTicker(boolean ticker) Sets ticker flag of theNewsinstance to build.setTitleAndDescription(String title, String description) Sets the given title and description of the news to build.setVisibilityPeriod(org.silverpeas.core.date.Period period) Sets the visibility period of theNewsinstance to build.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds aNewsinstance from the properties that were previously set with this builder.- Returns:
- a
Newsinstance.
-
setMandatory
Sets mandatory flag of theNewsinstance to build.- Parameters:
mandatory- the mandatory flag.- Returns:
- itself.
-
setTicker
Sets ticker flag of theNewsinstance to build.- Parameters:
ticker- the ticker flag.- Returns:
- itself.
-
setImportant
Sets important flag of theNewsinstance to build.- Parameters:
important- the important flag.- Returns:
- itself.
-
setVisibilityPeriod
Sets the visibility period of theNewsinstance to build.- Parameters:
period- the visibility period.- Returns:
- itself.
-
setKeywords
Sets the keywords of theNewsinstance to build.- Parameters:
keywords- the keywords of the news.- Returns:
- itself.
-
setTitleAndDescription
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.
-