public class BaseDBEditorFactory
extends java.lang.Object
DBEditorFactory.EditorType| Modifier | Constructor and Description | 
|---|---|
protected | 
BaseDBEditorFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canCreateDBObject(DBObjectTypeNode node)
Whether this DBEditorFactory will be able to create a new database object under the given node. 
 | 
boolean | 
canCreateDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType)
Whether this DBEditorFactory will be able to create a new dabtabase object of a specific type in a specific context. 
 | 
boolean | 
canEditDBObject(DBObject obj, DBObjectProvider pro)
Whether this DBEditorFactory will be able to edit an existing provider object of a specific type in a specific context. 
 | 
boolean | 
canEditDBObject(DBObjectNode node)
Deprecated.  
 | 
boolean | 
canEditDBObject(SchemaObject obj, DBObjectProvider pro)  | 
protected boolean | 
canUpdateObject(DBObject obj, DBObjectProvider pro)
If canEditDBObject returns true, then this method is used to determine whether the verifiers are set to be editable or not. 
 | 
void | 
commitPerformed(DBEditorConfig config, PanelLibrary lib)
Called when a successful commit is performed for the object being created or edited. 
 | 
boolean | 
createDBObject(DBObject newObj, DBObjectProvider pro)
Deprecated.  
 | 
boolean | 
createDBObject(DBObject newObj, DBObjectProvider pro, boolean commitToProvider)
Deprecated.  
 | 
DBObject | 
createDBObject(DBObjectNode node, java.lang.String dbObjectType)
Deprecated.  
 | 
<T extends DBObject>  | 
createDBObject(DBObjectProvider pro, T template, DBObject parent, boolean commitToProvider)
Deprecated.  
 | 
SchemaObject | 
createDBObject(DBObjectTypeNode node)
Deprecated.  
 | 
SchemaObject | 
createDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType)
Deprecated.  
 | 
DBObject | 
createDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType, DBObject parent, boolean commitToProvider)
Deprecated.  
 | 
<T extends SystemObject>  | 
createDBObject(Schema schema, DBObjectProvider pro, T template, boolean commitToProvider)
Deprecated.  
 | 
protected <T extends DBObject>  | 
createDBObject(Schema schema, DBObjectProvider pro, T template, DBObject parent, boolean commitToProvider)
Deprecated.  
 | 
protected PanelLibrary | 
createLibrary(java.lang.String dbObjectType)  | 
Namespace | 
createNamespace(DBEditorConfig config)
Create a Namesapce for use in a TraversableContext from the given DBEditorConfig. 
 | 
protected Namespace | 
createNamespace(DBEditorConfig config, java.util.Map<java.lang.String,java.lang.Class> verifiers)
Deprecated. 
 
 | 
protected DBEditorFactory.EditorType | 
determineEditorType(DBEditorConfig config)
Determines what the appropriate EditorType is for the given config. 
 | 
boolean | 
editDBObject(DBObject obj, DBObjectProvider pro)
Deprecated.  
 | 
boolean | 
editDBObject(DBObject obj, DBObjectProvider pro, boolean commitToProvider)
Deprecated.  
 | 
boolean | 
editDBObject(DBObject obj, DBObjectProvider pro, DBObject child)
Deprecated.  
 | 
boolean | 
editDBObject(DBObject obj, DBObjectProvider pro, DBObject child, boolean commitToProvider)
Deprecated.  
 | 
boolean | 
editDBObject(DBObjectNode node)
Edits and existing database object in a provider. 
 | 
boolean | 
editDBObject(SchemaObject obj, DBObjectProvider pro)
Deprecated.  
 | 
java.lang.String | 
getCreateLabel(java.lang.String dbObjectType)
Retrieves the menu label for creating new objects of the specified type. 
 | 
protected java.awt.Component | 
getDialogHeader(DBEditorConfig config)  | 
PanelLibrary | 
getPanelLibrary(java.lang.String dbObjectType)  | 
static java.lang.String | 
getTimestampKey(java.lang.String type)
This is the key used to suspect timestamps for the lifetime of an object dialog. 
 | 
protected void | 
initializeLibrary(PanelLibrary lib)
This is called when each library is created. 
 | 
static boolean | 
isCreateContext(Context ideContext)
Tests whether the given Context was created as the result of a create dialog commiting and then launching an Editor. 
 | 
boolean | 
isCreateSupported(java.lang.String dbObjectType)
Whether this DBEditorFactory supports the creation of objects of the specified type. 
 | 
void | 
launchDialog(DBEditorConfig config)
Launches a create or edit dialog appropriate to the given DBEditorConfig. 
 | 
protected void | 
launchDialog(DBEditorConfig config, PanelLibrary lib, boolean edit)  | 
java.lang.String[] | 
listSupportedTypes()
Lists all the types that create/edit is supported for. 
 | 
protected java.util.Collection<java.lang.String> | 
listSupportedTypesImpl()  | 
protected void | 
registerLibrary(java.lang.String dbObjectType, java.lang.Class<? extends PanelLibrary> libClass)  | 
static void | 
setEditorType(DBEditorConfig config, DBEditorFactory.EditorType editorType)
Use when launching an editor to set the editor type on the config that was used to launch. 
 | 
protected void | 
showEditor(DBEditorConfig config)  | 
protected boolean | 
supportsObjectType(java.lang.String dbObjectType, DBObjectProvider pro)  | 
protected void | 
unregisterLibrary(java.lang.String dbObjectType, java.lang.Class<? extends PanelLibrary> libClass)  | 
public PanelLibrary getPanelLibrary(java.lang.String dbObjectType)
protected PanelLibrary createLibrary(java.lang.String dbObjectType)
protected void initializeLibrary(PanelLibrary lib)
protected void registerLibrary(java.lang.String dbObjectType,
                   java.lang.Class<? extends PanelLibrary> libClass)
protected void unregisterLibrary(java.lang.String dbObjectType,
                     java.lang.Class<? extends PanelLibrary> libClass)
public java.lang.String[] listSupportedTypes()
DBEditorFactoryDBObject.getType()protected java.util.Collection<java.lang.String> listSupportedTypesImpl()
public boolean isCreateSupported(java.lang.String dbObjectType)
DBEditorFactorydbObjectType - the type of objectDBObject.getType()public boolean canCreateDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType)
DBEditorFactoryschema - The schema to create the object inpro - The DBObjectProvider instance to create the object indbObjectType - The type of database object to createDBObjectProvider, DBObject.getType()
protected boolean supportsObjectType(java.lang.String dbObjectType,
                         DBObjectProvider pro)
public final void launchDialog(DBEditorConfig config)
DBEditorFactoryconfig - the configuration for launching the dialogprotected void launchDialog(DBEditorConfig config, PanelLibrary lib, boolean edit)
protected DBEditorFactory.EditorType determineEditorType(DBEditorConfig config)
config - the config we will launch withpublic void commitPerformed(DBEditorConfig config, PanelLibrary lib)
protected final void showEditor(DBEditorConfig config)
public boolean canEditDBObject(DBObject obj, DBObjectProvider pro)
DBEditorFactoryobj - The SchemaObject to be editedpro - The DBObjectProvider instance to create the object inpublic java.lang.String getCreateLabel(java.lang.String dbObjectType)
DBEditorFactorydbObjectType - the type of objectDBObject.getType()public Namespace createNamespace(DBEditorConfig config)
@Deprecated protected Namespace createNamespace(DBEditorConfig config, java.util.Map<java.lang.String,java.lang.Class> verifiers)
createNamespace(DBEditorConfig).protected boolean canUpdateObject(DBObject obj, DBObjectProvider pro)
By default this just returns true - i.e. allowing the edit of any object canEditDBObject returns true for.
protected java.awt.Component getDialogHeader(DBEditorConfig config)
public static java.lang.String getTimestampKey(java.lang.String type)
public static boolean isCreateContext(Context ideContext)
public static void setEditorType(DBEditorConfig config, DBEditorFactory.EditorType editorType)
public final boolean canCreateDBObject(DBObjectTypeNode node)
DBEditorFactorycanCreateDBObject in interface DBEditorFactory@Deprecated public final SchemaObject createDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType)
DBEditorFactorycreateDBObject in interface DBEditorFactoryschema - The schema to create the object inpro - The DBObjectProvider instance to create the object indbObjectType - The type of database object to createDBObjectProvider, DBObject.getType()@Deprecated public final SchemaObject createDBObject(DBObjectTypeNode node)
DBEditorFactorycreateDBObject in interface DBEditorFactorynode - the node describing the schema, type and provider@Deprecated public final <T extends SystemObject> T createDBObject(Schema schema, DBObjectProvider pro, T template, boolean commitToProvider)
DBEditorFactorycreateDBObject in interface DBEditorFactoryschema - The schema to create the object inpro - The DBObjectProvider instance to create the object intemplate - An object to use as a template for the new objectcommitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, create a new Index as part of the edit and commit the whole lot together later).DBObjectProvider, DBObject.getType()@Deprecated public final <T extends DBObject> T createDBObject(DBObjectProvider pro, T template, DBObject parent, boolean commitToProvider)
DBEditorFactorycreateDBObject in interface DBEditorFactorypro - The DBObjectProvider instance to create the object intemplate - the template for the new objectparent - the owning object of the object to be created (e.g. Table for a new Index)commitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, create a new Index as part of the edit and commit the whole lot together later).DBObjectProvider, DBObject.getType()@Deprecated protected final <T extends DBObject> T createDBObject(Schema schema, DBObjectProvider pro, T template, DBObject parent, boolean commitToProvider)
@Deprecated public final DBObject createDBObject(DBObjectNode node, java.lang.String dbObjectType)
DBEditorFactoryIndex.TYPE this will fire the new Index dialog using the Table as a base.createDBObject in interface DBEditorFactorynode - the node for the parent objectdbObjectType - the type of child object to be created@Deprecated public final boolean createDBObject(DBObject newObj, DBObjectProvider pro)
DBEditorFactorycreateDBObject in interface DBEditorFactorynewObj - the new object being createdpro - The DBObjectProvider instance to create the object inDBObjectProvider@Deprecated public final boolean createDBObject(DBObject newObj, DBObjectProvider pro, boolean commitToProvider)
DBEditorFactorycreateDBObject in interface DBEditorFactorynewObj - the new object being createdpro - The DBObjectProvider instance to create the object incommitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, create a new Index as part of the edit and commit the whole lot together later).DBObjectProvider@Deprecated public final DBObject createDBObject(Schema schema, DBObjectProvider pro, java.lang.String dbObjectType, DBObject parent, boolean commitToProvider)
DBEditorFactorycreateDBObject in interface DBEditorFactoryschema - The schema to create the object inpro - The DBObjectProvider instance to create the object indbObjectType - The type of database object to createparent - the owning object of the object to be created (e.g. Table for a new Index)commitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, create a new Index as part of the edit and commit the whole lot together later).DBObjectProvider, DBObject.getType()public final boolean canEditDBObject(SchemaObject obj, DBObjectProvider pro)
canEditDBObject in interface DBEditorFactoryDBEditorFactory.canEditDBObject(DBObject,DBObjectProvider)@Deprecated public final boolean canEditDBObject(DBObjectNode node)
canEditDBObject in interface DBEditorFactory@Deprecated public final boolean editDBObject(DBObject obj, DBObjectProvider pro)
DBEditorFactoryeditDBObject in interface DBEditorFactoryobj - The SchemaObject to be editedpro - The DBObjectProvider instance to create the object in@Deprecated public final boolean editDBObject(SchemaObject obj, DBObjectProvider pro)
editDBObject in interface DBEditorFactoryDBEditorFactory.editDBObject(DBObject,DBObjectProvider)@Deprecated public boolean editDBObject(DBObject obj, DBObjectProvider pro, boolean commitToProvider)
DBEditorFactoryeditDBObject in interface DBEditorFactoryobj - The SchemaObject to be editedpro - The DBObjectProvider instance to create the object incommitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, edit an Index as part of the table edit and commit the whole lot together later).@Deprecated public final boolean editDBObject(DBObject obj, DBObjectProvider pro, DBObject child)
DBEditorFactoryeditDBObject in interface DBEditorFactoryobj - The SchemaObject to be editedpro - The DBObjectProvider instance to create the object inchild - a specific child object to editpublic final boolean editDBObject(DBObjectNode node)
DBEditorFactoryeditDBObject in interface DBEditorFactorynode - the node representing the object to edit.#launchDialog(DBEditorConfig)}@Deprecated public final boolean editDBObject(DBObject obj, DBObjectProvider pro, DBObject child, boolean commitToProvider)
DBEditorFactoryeditDBObject in interface DBEditorFactoryobj - The SchemaObject to be editedpro - The DBObjectProvider instance to create the object inchild - a specific child object to editcommitToProvider - whether the dialog should commit the change back to the DBObjectProvider as well as the parent object. This allows a dialog to be fired from within another editor context (e.g. the modeler) and the edit absorbed into the edit of the parent (e.g. editing a Table, edit an Index as part of the table edit and commit the whole lot together later).