Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.ide.panels
Interface CommitListener

All Superinterfaces:
java.util.EventListener

public interface CommitListener
extends java.util.EventListener

This interface defines the messages that are sent when commiting (finishing) or canceling from an FSMWizard.

A commit operation is done as a two-phase commit. Each listener is asked if it can commit. Should any listener say that it is not ready to commit, no further listeners are asked and the commit is aborted. Once every listener has approved the commit, the listeners are called in order to perform the commit. Should any commit operation fail, the commit is aborted, and any commits already performed are rolled back. In this way, all the listeners commit or fail together.

Since:
9.0.3

Method Summary
 void cancel(ApplyEvent event)
          Called to cancel the FSMWizard.
 void checkCommit(ApplyEvent event)
          Called to see if the listener is ready to commit.
 void commit(ApplyEvent event)
          Called to have the listener perform the commit action.
 void rollback(ApplyEvent event)
          Called to have the listener rollback the commit.
 

Method Detail

checkCommit

void checkCommit(ApplyEvent event)
                 throws TraversalException
Called to see if the listener is ready to commit. If the current state does not permit a commit, or if the listener can determine that the commit will fail if attempted, the listener can abort the commit.

checkCommit will be called on every registered listener as the first stage of the commit. If any listener vetoes the commit by throwing a TraversalException, the commit will be immediately aborted. checkCommit will not be called on any other listeners, and no further actions will be taken.

Parameters:
event - The ApplyEvent that provides contextual information about when the ApplyEvent was fired.
Throws:
TraversalException - if the commit should be aborted.

commit

void commit(ApplyEvent event)
            throws TraversalException
Called to have the listener perform the commit action. Prior to calling commit on any listeners, FSMWizard will first call checkCommit on every listener.

If a listener wishes to abort the commit, a TraversalException should be thrown. Aborting a commit will cause rollback to be called on every listener, in reverse order, that already commited. Note that rollback is not called on the listener that causes the commit to be aborted.

Parameters:
event - The ApplyEvent that provides contextual information about when the ApplyEvent was fired.
Throws:
TraversalException - if the commit should be aborted.

rollback

void rollback(ApplyEvent event)
Called to have the listener rollback the commit. If a listener aborts a commit, each previous listener is asked in reverse order to rollback its commit.

Parameters:
event - The ApplyEvent that provides contextual information about when the ApplyEvent was fired.

cancel

void cancel(ApplyEvent event)
Called to cancel the FSMWizard. Listeners should revert to the initial state.

Parameters:
event - The ApplyEvent that provides contextual information about when the ApplyEvent was fired.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.