Class PublicationDetail.Builder
- java.lang.Object
-
- org.silverpeas.core.contribution.publication.model.PublicationDetail.Builder
-
- Enclosing class:
- PublicationDetail
public static class PublicationDetail.Builder extends Object
A builder of aPublicationDetail
instance by setting some of its properties.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicationDetail
build()
Builds aPublicationDetail
instance from the properties that were previously set with this builder.PublicationDetail.Builder
created(Date creationDate, String creatorId)
Sets the creation properties of thePublicationDetail
instance to build.PublicationDetail.Builder
setBeginDateTime(Date date, String hour)
Sets the visibility begin date properties of thePublicationDetail
instance to build.PublicationDetail.Builder
setContentPagePath(String contentPagePath)
Sets the URL path where is located the content of thePublicationDetail
instance to build.PublicationDetail.Builder
setEndDateTime(Date date, String hour)
Sets the visibility end date properties of thePublicationDetail
instance to build.PublicationDetail.Builder
setImportance(int importance)
Sets the importance of thePublicationDetail
instance to build.PublicationDetail.Builder
setKeywords(String keywords)
Sets the keywords of thePublicationDetail
instance to build.PublicationDetail.Builder
setNameAndDescription(String name, String description)
Sets in the default language the given name and description of the publication to build.PublicationDetail.Builder
setPk(PublicationPK pk)
Sets the unique identifier of thePublicationDetail
instance to build.PublicationDetail.Builder
setVersion(String version)
Sets the version of thePublicationDetail
instance to build.PublicationDetail.Builder
updated(Date updateDate, String updaterId)
Sets the update properties of thePublicationDetail
instance to build.PublicationDetail.Builder
validated(Date validateDate, String validatorId)
Sets the validation properties of thePublicationDetail
instance to build.
-
-
-
Method Detail
-
build
public PublicationDetail build()
Builds aPublicationDetail
instance from the properties that were previously set with this builder.- Returns:
- a
PublicationDetail
instance.
-
setPk
public PublicationDetail.Builder setPk(PublicationPK pk)
Sets the unique identifier of thePublicationDetail
instance to build.- Parameters:
pk
- a unique identifier of a publication.- Returns:
- itself.
-
created
public PublicationDetail.Builder created(Date creationDate, String creatorId)
Sets the creation properties of thePublicationDetail
instance to build.- Parameters:
creationDate
- the date at which the publication was created.creatorId
- the identifier of the user that created the publication.- Returns:
- itself.
-
updated
public PublicationDetail.Builder updated(Date updateDate, String updaterId)
Sets the update properties of thePublicationDetail
instance to build.- Parameters:
updateDate
- the date at which the publication was lastly updated.updaterId
- the identifier of the user that lastly updated the publication.- Returns:
- itself.
-
validated
public PublicationDetail.Builder validated(Date validateDate, String validatorId)
Sets the validation properties of thePublicationDetail
instance to build.- Parameters:
validateDate
- the date at which the publication was validated.validatorId
- the identifier of the user that validated the publication.- Returns:
- itself.
-
setBeginDateTime
public PublicationDetail.Builder setBeginDateTime(Date date, String hour)
Sets the visibility begin date properties of thePublicationDetail
instance to build.- Parameters:
date
- the day at which the publication begins to be visible.hour
- the hour at which the publication begins to be visible.- Returns:
- itself.
-
setEndDateTime
public PublicationDetail.Builder setEndDateTime(Date date, String hour)
Sets the visibility end date properties of thePublicationDetail
instance to build.- Parameters:
date
- the day at which the publication ends to be visible.hour
- the hour at which the publication ends to be visible.- Returns:
- itself.
-
setImportance
public PublicationDetail.Builder setImportance(int importance)
Sets the importance of thePublicationDetail
instance to build.- Parameters:
importance
- the importance of the publication. Lower value means more importance.- Returns:
- itself.
-
setKeywords
public PublicationDetail.Builder setKeywords(String keywords)
Sets the keywords of thePublicationDetail
instance to build.- Parameters:
keywords
- the keywords of the publication.- Returns:
- itself.
-
setContentPagePath
public PublicationDetail.Builder setContentPagePath(String contentPagePath)
Sets the URL path where is located the content of thePublicationDetail
instance to build.- Parameters:
contentPagePath
- the path of the content of the publication.- Returns:
- itself.
-
setVersion
public PublicationDetail.Builder setVersion(String version)
Sets the version of thePublicationDetail
instance to build.- Parameters:
version
- the version of the publication.- Returns:
- itself.
-
setNameAndDescription
public PublicationDetail.Builder setNameAndDescription(String name, String description)
Sets in the default language the given name and description of the publication to build.- Parameters:
name
- the name of the publication.description
- the description of the publication.- Returns:
- itself.
-
-