Esempio n. 1
0
  private void fireSequencingEvent(
      AbstractJcrNode sequencedNode,
      List<AbstractJcrNode> outputNodes,
      JcrSession outputSession,
      String sequencerName)
      throws RepositoryException {

    RecordingChanges sequencingChanges =
        new RecordingChanges(
            outputSession.context().getProcessId(),
            outputSession.getRepository().repositoryKey(),
            outputSession.workspaceName());
    for (AbstractJcrNode outputNode : outputNodes) {
      sequencingChanges.nodeSequenced(
          sequencedNode.key(),
          sequencedNode.path(),
          outputNode.key(),
          outputNode.path(),
          work.getOutputPath(),
          work.getUserId(),
          work.getSelectedPath(),
          sequencerName);
    }

    repository.changeBus().notify(sequencingChanges);
  }
Esempio n. 2
0
 private void fireSequencingFailureEvent(
     AbstractJcrNode sequencedNode, JcrSession inputSession, Throwable cause, String sequencerName)
     throws RepositoryException {
   assert sequencedNode != null;
   assert inputSession != null;
   RecordingChanges sequencingChanges =
       new RecordingChanges(
           inputSession.context().getProcessId(),
           inputSession.getRepository().repositoryKey(),
           inputSession.workspaceName());
   sequencingChanges.nodeSequencingFailure(
       sequencedNode.key(),
       sequencedNode.path(),
       work.getOutputPath(),
       work.getUserId(),
       work.getSelectedPath(),
       sequencerName,
       cause);
   repository.changeBus().notify(sequencingChanges);
 }