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 -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddeleteDelegatedNews(String contributionId) Deletes the specified delegated news.Gets all the delegated news.Gets all the validated delegated news.getDelegatedNews(String contributionId) Gets the delegated news matching the specified contribution.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.updateOrderDelegatedNews(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.
-
Constructor Details
-
DelegatedNewsServiceImpl
public DelegatedNewsServiceImpl()
-
-
Method Details
-
delete
- 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 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 news.
-
getDelegatedNews
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:
- the asked delegated news.
-
getDelegatedNews
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
Description copied from interface:DelegatedNewsServiceGets all the delegated news.- Specified by:
getAllDelegatedNewsin interfaceDelegatedNewsService- Returns:
- a list of all the delegated news.
-
getAllValidDelegatedNews
Description copied from interface:DelegatedNewsServiceGets all the validated delegated news.- Specified by:
getAllValidDelegatedNewsin interfaceDelegatedNewsService- Returns:
- a list of all the delegated news that are validated.
-
validateDelegatedNews
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
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
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
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 delegated news was spawned.newsOrder- the new order of the news.- Returns:
- the updated delegated news.
-