Class DelegatedNewsServiceImpl
- java.lang.Object
-
- org.silverpeas.components.delegatednews.service.DelegatedNewsServiceImpl
-
- All Implemented Interfaces:
DelegatedNewsService,org.silverpeas.core.admin.component.ComponentInstanceDeletion
@Service public class DelegatedNewsServiceImpl extends Object implements DelegatedNewsService, org.silverpeas.core.admin.component.ComponentInstanceDeletion
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.components.delegatednews.service.DelegatedNewsService
DelegatedNewsService.Constants
-
-
Constructor Summary
Constructors Constructor Description DelegatedNewsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String componentInstanceId)voiddeleteDelegatedNews(String contributionId)Deletes the specified delegated news.List<DelegatedNews>getAllDelegatedNews()Gets all the delegated news.List<DelegatedNews>getAllValidDelegatedNews()Gets all the validated delegated news.DelegatedNewsgetDelegatedNews(String contributionId)Gets the delegated news matching the specified contribution.List<DelegatedNews>getDelegatedNews(Collection<String> contributionIds)Gets the delegated news matching the specified contribution.voidrefuseDelegatedNews(String contributionId, String validatorId, String refusalMotive)Refuses the specified delegated news with the given motive.voidsubmitNews(org.silverpeas.core.contribution.model.Contribution contribution, org.silverpeas.core.date.Period visibilityPeriod, String userId)Submits the specified contribution as a delegated news.voidupdateDateDelegatedNews(String contributionId, org.silverpeas.core.date.Period visibilityPeriod)Updates the period of visibility of the specified delegated news.voidupdateDelegatedNews(org.silverpeas.core.contribution.model.ContributionIdentifier id, String updaterId, org.silverpeas.core.date.Period visibilityPeriod)Updates the news matching the specified contribution and from the update information.DelegatedNewsupdateOrderDelegatedNews(String contributionId, int newsOrder)Updates the order of the specified delegated news among the other news.voidvalidateDelegatedNews(String contributionId, String validatorId)Validates the specified delegated news.
-
-
-
Method Detail
-
delete
public void delete(String componentInstanceId)
- Specified by:
deletein interfaceorg.silverpeas.core.admin.component.ComponentInstanceDeletion
-
submitNews
public void submitNews(org.silverpeas.core.contribution.model.Contribution contribution, org.silverpeas.core.date.Period visibilityPeriod, String userId)Description copied from interface:DelegatedNewsServiceSubmits the specified contribution as a delegated news. The submitted news can then be identified by the contribution identifier from which it is spawned.- Specified by:
submitNewsin interfaceDelegatedNewsService- Parameters:
contribution- the contribution to take as a news to publish.visibilityPeriod- the period during which the news has to be visible. If null, the news is always visible.userId- the unique identifier of the user that has submitted the contribution as a news.
-
getDelegatedNews
public DelegatedNews getDelegatedNews(String contributionId)
Description copied from interface:DelegatedNewsServiceGets the delegated news matching the specified contribution.- Specified by:
getDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the delegated news. It is the unique identifier of the contribution from which it was spawned.- Returns:
-
getDelegatedNews
public List<DelegatedNews> getDelegatedNews(Collection<String> contributionIds)
Description copied from interface:DelegatedNewsServiceGets the delegated news matching the specified contribution.- Specified by:
getDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionIds- a collection of unique identifiers, each of them referring a contribution from which a delegated news was spawned.- Returns:
- a list of delegated news.
-
getAllDelegatedNews
public List<DelegatedNews> getAllDelegatedNews()
Description copied from interface:DelegatedNewsServiceGets all the delegated news.- Specified by:
getAllDelegatedNewsin interfaceDelegatedNewsService- Returns:
- a list of all of the delegated news.
-
getAllValidDelegatedNews
public List<DelegatedNews> getAllValidDelegatedNews()
Description copied from interface:DelegatedNewsServiceGets all the validated delegated news.- Specified by:
getAllValidDelegatedNewsin interfaceDelegatedNewsService- Returns:
- a list of all of the delegated news that are validated.
-
validateDelegatedNews
public void validateDelegatedNews(String contributionId, String validatorId)
Description copied from interface:DelegatedNewsServiceValidates the specified delegated news.- Specified by:
validateDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the contribution from which the delegated news was spawned.validatorId- the unique identifier of the validator.
-
refuseDelegatedNews
public void refuseDelegatedNews(String contributionId, String validatorId, String refusalMotive)
Description copied from interface:DelegatedNewsServiceRefuses the specified delegated news with the given motive.- Specified by:
refuseDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the contribution from which the delegated news was spawned.validatorId- the unique identifier of the validator.refusalMotive- the motive of the refusal.
-
updateDateDelegatedNews
public void updateDateDelegatedNews(String contributionId, org.silverpeas.core.date.Period visibilityPeriod)
Description copied from interface:DelegatedNewsServiceUpdates the period of visibility of the specified delegated news.- Specified by:
updateDateDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the contribution from which the delegated news was spawned.visibilityPeriod- the new visibility period. If null then the news will be always visible.
-
updateDelegatedNews
public void updateDelegatedNews(org.silverpeas.core.contribution.model.ContributionIdentifier id, String updaterId, org.silverpeas.core.date.Period visibilityPeriod)Description copied from interface:DelegatedNewsServiceUpdates the news matching the specified contribution and from the update information. This method should be invoked when the matching contribution is updated.- Specified by:
updateDelegatedNewsin interfaceDelegatedNewsService- Parameters:
id- the unique identifier of the updated contribution and from which the news has to be updated.updaterId- the unique identifier of the contribution updater.visibilityPeriod- the new period of visibility of the news. If null, then the news is always visible.
-
deleteDelegatedNews
public void deleteDelegatedNews(String contributionId)
Description copied from interface:DelegatedNewsServiceDeletes the specified delegated news.- Specified by:
deleteDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the contribution from which the news was spawned.
-
updateOrderDelegatedNews
public DelegatedNews updateOrderDelegatedNews(String contributionId, int newsOrder)
Description copied from interface:DelegatedNewsServiceUpdates the order of the specified delegated news among the other news.- Specified by:
updateOrderDelegatedNewsin interfaceDelegatedNewsService- Parameters:
contributionId- the unique identifier of the contribution from which the deletaged news was spawned.newsOrder- the new order of the news.- Returns:
- the updated delegated news.
-
-