Class ContributionBatchManagementContext
- java.lang.Object
-
- org.silverpeas.core.contribution.util.ContributionBatchManagementContext
-
public class ContributionBatchManagementContext extends Object
This class permits to specify a context into which a batch of contribution has to be managed. For example, it permits to define the context on the save action of batch modification of publications.- Author:
- silveryocha
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContributionBatchManagementContext.ContributionContext
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContributionBatchManagementContext
addContributionContext(Contribution contribution, ContributionStatus contributionStatus, Location location, SubscriptionResource linkedSubscriptionResource)
Setup the finest subscription resource linked to the entity that is handled.ContributionBatchManagementContext
forPersistenceAction(ActionType entityPersistenceAction)
Sets the context of persistence action performed on the entity.List<ContributionBatchManagementContext.ContributionContext>
getContributionContexts()
Gets the contribution contexts.ActionType
getEntityPersistenceAction()
Gets the persistence (or validation) action that is performed on the entity.static ContributionBatchManagementContext
initialize()
Initializes a context by specifying the contribution handled by this context.
-
-
-
Method Detail
-
initialize
public static ContributionBatchManagementContext initialize()
Initializes a context by specifying the contribution handled by this context.- Returns:
- a new instance of
ContributionBatchManagementContext
.
-
addContributionContext
public ContributionBatchManagementContext addContributionContext(Contribution contribution, ContributionStatus contributionStatus, Location location, SubscriptionResource linkedSubscriptionResource)
Setup the finest subscription resource linked to the entity that is handled.This method can be called several times in order to constitute a list of
SubscriptionResource
to handle.- Parameters:
contribution
- the concerned contribution.contributionStatus
- the status of the concerned contribution.location
- an optional location.linkedSubscriptionResource
- the finest subscription resource (the resource on which subscriptions are registered) linked to the entity that is handled.- Returns:
- itself.
-
getContributionContexts
public List<ContributionBatchManagementContext.ContributionContext> getContributionContexts()
Gets the contribution contexts.- Returns:
- list of
ContributionBatchManagementContext.ContributionContext
instance.
-
forPersistenceAction
public ContributionBatchManagementContext forPersistenceAction(ActionType entityPersistenceAction)
Sets the context of persistence action performed on the entity.- Parameters:
entityPersistenceAction
- the type of persistence action performed on the persisted entity.- Returns:
- the instance of the current completed context.
-
getEntityPersistenceAction
public ActionType getEntityPersistenceAction()
Gets the persistence (or validation) action that is performed on the entity.- Returns:
- the persistence (or validation) action that is performed on the entity.
-
-