|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.db.transfer.generate.GenerateController
public abstract class GenerateController
Controller class for generation. Includes support for creating the generate submenu and handling the action within that. Must be subclasses to provide generate support for a given View.
Field Summary | |
---|---|
static java.lang.String |
GENERATE_CMD
Command string for Generate. |
static int |
GENERATE_CMD_ID
Deprecated. use GENERATE_CMD instead |
Fields inherited from interface oracle.ide.controller.Controller |
---|
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED |
Constructor Summary | |
---|---|
protected |
GenerateController()
|
Method Summary | |
---|---|
protected abstract boolean |
areCompatible(DBObjectProvider source,
DBObjectProvider target)
|
void |
cancel(ApplyEvent event)
|
protected boolean |
canGenerate(Context context)
Called just before generation to give subclasses an opportunity to bail out. |
void |
checkCommit(ApplyEvent event)
|
protected TransferDescriptor |
createDescriptor(java.lang.String qname,
java.lang.Class<? extends TransferTarget> target,
Context context)
Creates a new TransferDescriptor. |
protected IdeAction |
createGenerateAction(java.lang.String connName,
java.lang.String qualifiedName)
|
protected IdeAction |
createGenerateAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info)
|
static javax.swing.JMenu |
createGenerateMenu(ContextMenu cm,
java.lang.String name,
GenerateController controller)
Creates a submenu for the given ContextMenu for all the registered generate options. |
protected abstract Namespace |
createNamespace(TransferDescriptor desc,
Context context)
|
SystemObject[] |
doTransfer(TransferDescriptor td)
Performs the actual transfer of the given TransferDescriptor. |
protected Step |
getChooseOpStep()
|
protected int |
getCommandId()
Gets the id for the command this Controller is controlling. |
protected java.lang.Class<? extends oracle.ideimpl.db.transfer.ProviderTransferTarget> |
getDBTarget()
Gets the ProviderTransferTarget implementation class to use for any connection transfer target (i.e. |
protected abstract java.lang.String |
getDefaultConnection(Context context)
Returns the default connection (if there is one) to use for the given Context. |
static IdeAction |
getGenerateAction()
The Generate Action is the IdeAction that bring up the full Generate Wizard. |
protected abstract Step |
getManualReconcileStep()
|
protected java.lang.Object |
getSourceIdentifier(Context context)
Gets the identifier for the source provider from the given context. |
protected abstract Step |
getSourceStep()
|
protected java.lang.String |
getSourceType(Context context)
Gets the type of the source provider from the given context. |
static Step |
getSQLScriptStep()
|
protected abstract Step |
getTargetStep()
|
protected java.lang.String |
getTitle(TransferDescriptor td)
|
protected abstract java.lang.Class<? extends TransferPolicy> |
getTransferPolicy(TransferDescriptor desc)
Gets the TransferPolicy to use for the given descriptor. |
boolean |
handleEvent(IdeAction action,
Context context)
This method is called when a user interaction with a View
triggers the execution of a command. |
protected void |
invokeWizard(TransferDescriptor td,
Context context)
Invokes the appropriate wizard for the given descriptor and context. |
protected boolean |
isGenerateEnabled(Context context)
Checks whether the generate action should be enabled because this controller can handle the event for the given context. |
void |
rollback(ApplyEvent event)
|
protected abstract void |
setDescriptorObjects(TransferDescriptor desc,
Context context)
Given the Context sets the objects to be generated on the TransferDescriptor. |
protected void |
setupDescriptor(TransferDescriptor desc,
Context context)
Sets up the TransferDescriptor ready for transfer. |
boolean |
update(IdeAction action,
Context context)
Enables the generate action ( getGenerateAction() ) if there is
a provider source available in the given Context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GENERATE_CMD
getGenerateAction()
,
Constant Field Values@Deprecated public static final int GENERATE_CMD_ID
GENERATE_CMD
insteadConstructor Detail |
---|
protected GenerateController()
Method Detail |
---|
protected abstract Namespace createNamespace(TransferDescriptor desc, Context context) throws TransferFailedException
TransferFailedException
protected int getCommandId()
public boolean update(IdeAction action, Context context)
getGenerateAction()
) if there is
a provider source available in the given Context.
update
in interface Controller
action
- action whose command is to be executed.context
- the current context
protected boolean isGenerateEnabled(Context context)
protected boolean canGenerate(Context context)
isGenerateEnabled(oracle.ide.Context)
context
-
public boolean handleEvent(IdeAction action, Context context)
Controller
View
triggers the execution of a command.
handleEvent
in interface Controller
action
- action whose command is to be executed.
protected void invokeWizard(TransferDescriptor td, Context context)
invokeFullWizard(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
GenerateTargetRegistry
- doTransfer(oracle.ide.db.transfer.TransferDescriptor)
invokeTargettedWizard(oracle.ide.db.transfer.TransferDescriptor, java.util.List, oracle.ide.Context)
td
- the TransferDescriptor for the transfercontext
- the current IDE Contextpublic SystemObject[] doTransfer(TransferDescriptor td) throws TransferFailedException
TransferFailedException
protected abstract boolean areCompatible(DBObjectProvider source, DBObjectProvider target)
protected abstract Step getSourceStep()
protected abstract Step getTargetStep()
protected Step getChooseOpStep()
protected abstract Step getManualReconcileStep()
protected java.lang.String getSourceType(Context context)
protected java.lang.Object getSourceIdentifier(Context context)
protected final java.lang.Class<? extends oracle.ideimpl.db.transfer.ProviderTransferTarget> getDBTarget()
protected abstract java.lang.Class<? extends TransferPolicy> getTransferPolicy(TransferDescriptor desc)
protected TransferDescriptor createDescriptor(java.lang.String qname, java.lang.Class<? extends TransferTarget> target, Context context)
qname
- qualified connection name (if no transfer target class)target
- transfer target to use in the descriptorcontext
- current context
setupDescriptor(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
,
setDescriptorObjects(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
protected void setupDescriptor(TransferDescriptor desc, Context context)
protected abstract void setDescriptorObjects(TransferDescriptor desc, Context context)
protected java.lang.String getTitle(TransferDescriptor td)
protected abstract java.lang.String getDefaultConnection(Context context)
public void cancel(ApplyEvent event)
public void checkCommit(ApplyEvent event) throws TraversalException
TraversalException
public void rollback(ApplyEvent event)
protected IdeAction createGenerateAction(java.lang.String connName, java.lang.String qualifiedName)
protected IdeAction createGenerateAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info)
public static javax.swing.JMenu createGenerateMenu(ContextMenu cm, java.lang.String name, GenerateController controller)
cm
- context menu to create the submenu for (cannot be null).name
- the name of the new submenu option, if null "Generate To" is
usedcontroller
- the controller to use for the menu items (cannot be
null).
public static final IdeAction getGenerateAction()
public static Step getSQLScriptStep()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |