Class ContributionTrackingService

    • Constructor Detail

      • ContributionTrackingService

        public ContributionTrackingService()
    • Method Detail

      • update

        public void update​(Contribution before,
                           Contribution after)
        Saves the event on the update of the contribution. It is expected the update doesn't imply a move of the contribution into another component instance. The requester (the user behind the update) is taken as the author of the modification. In the case the modification is done through a batch process (like a workflow one for example), then the updater set in the contribution is taken as the author. Otherwise, it is the system user that is taken.
        Specified by:
        update in interface ContributionModification
        Parameters:
        before - the contribution before the modification.
        after - the contribution after the modification.
      • delete

        public void delete​(Contribution contribution)
        Saves the event on the deletion of the specified contribution. The requester (the user behind the deletion) is taken as the author of the modification. In the case the modification is done through a batch process (like a workflow one for example), then the system user is taken as the author.
        Specified by:
        delete in interface ContributionDeletion
        Parameters:
        contribution - the contribution that was deleted.
      • create

        public void create​(Contribution contribution)
        Saves the event on the creation of the specified contribution. The requester (the user behind the creation) is taken as the author of the modification. In the case the modification is done through a batch process (like a workflow one for example), then the creator set in the contribution is taken as the author. Otherwise, it is the system user that is taken.
        Specified by:
        create in interface ContributionCreation
        Parameters:
        contribution - the contribution that was created.
      • move

        public void move​(Contribution before,
                         Contribution after)
        Saves the event on the move of the contribution from a location to another one. The requester (the user behind the mive) is taken as the author of the modification. In the case the modification is done through a batch process (like a workflow one for example), then the system user is taken as the author. The locations can be either inner of a component instance and in this case the move is an inner move (see TrackedActionType.INNER_MOVE) or each of them in a different component instance and in this case the move is an outer move (see TrackedActionType.OUTER_MOVE).

        The event is saved if and only if at least one of the component instance implied by the move is tracked (indicated in the org/silverpeas/contribution/settings/contribution.properties configuration file). Whatever, the identifier of the contribution, in the saved event, will refer the contribution before the move but, in the case of an outer move, additional information will be given about the source and the destination of the move in the textual context of the event.

        Specified by:
        move in interface ContributionMove
        Parameters:
        before - the contribution before the move and from which the source location can be figuring out.
        after - the contribution after the move and from which the destination location can be figuring out.