Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.wizard
Interface TriggerInvokable

All Superinterfaces:
Invokable
All Known Implementing Classes:
EnumBuilder

public interface TriggerInvokable
extends Invokable

Extension writers should use this interface to handle the case where a declartive rule is not enough to determine whether Invokable.invoke(oracle.ide.Context) can safely be called in a particular context.

Consider the case where an Invokable is registered as a gallery item. If the extension that registered the item is not initialized, the enabled state of the Invokable is determined by evaluating the declarative rule associated with the item. If the rule is true, the item is enabled, and if the user selects it, Invokable.invoke(oracle.ide.Context) is called on the object. If the object is a TriggerInvokable, canInvoke(oracle.ide.Context) is called just before Invokable.invoke(oracle.ide.Context) to determine whether the item is really invokable, and if not invokable, getInvalidStateMessage(oracle.ide.Context) is called to give feedback to the user about why the gallery item cannot be created.

Once the extension that owns the gallery item is initialized, the enabled state of the item is determined by first evaluating the rule and then calling canInvoke(oracle.ide.Context).


Method Summary
 boolean canInvoke(Context context)
          Called to determine whether this Invokable should be enabled or disabled.
 java.lang.Object getInvalidStateMessage(Context context)
          Returns a message that indicates why the Invokable cannot be invoked in the active context.

 

Methods inherited from interface oracle.ide.wizard.Invokable
invoke

 

Method Detail

canInvoke

boolean canInvoke(Context context)
Called to determine whether this Invokable should be enabled or disabled.
Parameters:
context - the Context in which Invokable.invoke(oracle.ide.Context) may be called on this object
Returns:
true if the object can be invoked, false otherwise

getInvalidStateMessage

java.lang.Object getInvalidStateMessage(Context context)
Returns a message that indicates why the Invokable cannot be invoked in the active context. If called from the gallery, the message will be displayed by MessageDialog.
Returns:
a message to display; must be non-null.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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