public abstract class JdapiModule extends BaseFormsObject
The class is the supertype for all of the concrete module classes. The classes that define the different
module types, FormModule
,
MenuModule
, PlsqlModule
,
ObjectLibrary
all extend JdapiModule.
The methods in JdapiModule let you work with modules generically. For example, you can write code to open modules in a list and refer to them as JdapiModule types. You do not have to worry about the specific type of module you are working with. For example:
... // get the module list from the session... JdapiIterator mods = Jdapi.getModules(); // ... and iterate round them while(mods.hasNext()) { JdapiModule mod = (JdapiModule)mods.next(); // getStringProperty(JdapiTypes.NAME_PTID) is equivalent to getName() String moduleName = mod.getName(); System.out.println("Module Name: " + moduleName); ...
m_clientInfo, m_pd2fob
PROPERTY_DEFAULT_VALUE, PROPERTY_INHERITED_VALUE, PROPERTY_OVERRIDDEN_DEFAULT_VALUE, PROPERTY_OVERRIDDEN_INHERITED_VALUE, PROPERTY_STATE_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JdapiModule(long pd2fob)
Constructor used by derived classes.
|
Modifier and Type | Method and Description |
---|---|
void |
compile_all()
Compiles all the pl/sql in the module.
|
abstract void |
compile()
Compiles the module instance to the file system.
|
void |
destroy()
Destroys the object - this removes the object from its context.
|
java.lang.String |
getAbsolutePath()
Returns the most recent location of this module on the file system.
|
static long |
getModulesProductVersion(java.lang.String fileName)
Returns the product version used to create the specified module.
|
static JdapiModule |
openModule(java.io.File f)
Loads a module from the file system.
|
static JdapiModule |
openModule(java.io.File f,
java.lang.String formsPath)
Loads a module from the file system.
|
static JdapiModule |
openModule(java.lang.String fileName)
Loads a module from the file system.
|
static JdapiModule |
openModule(java.lang.String fileName,
java.lang.String formsPath)
Loads a module from the filesystem.
|
abstract void |
save(java.lang.String fileName)
Saves the module instance to the file system.
|
protected void |
setAbsolutePath(java.lang.String path)
Sets the most recent location of this module on the file system.
|
changeOwner, clearObjectPointer, clone, createSubclassedChild, equals, getBooleanProperty, getChildObjectProperty, getClassName, getClientInfo, getIntegerProperty, getIntegerPropertyString, getJdapiMetaObject, getMetaProperties, getModule, getName, getObjectPointer, getObjectProperty, getObjProp, getOwnedObjects, getOwner, getPersistentClientInfoBlob, getPersistentClientInfoObject, getPropertyState, getPropertyValueName, getQualifiedName, getStringIDProperty, getStringProperty, getSubclassParent, getTypeId, hasDefaultedProperty, hasInheritedProperty, hasOverriddenProperty, hasProperty, inheritProperty, isSubclassed, isValidFormsObject, move, queryType, reattach, setBooleanProperty, setClientInfo, setIntegerProperty, setObjectProperty, setObjProp, setPersistentClientInfo, setPersistentClientInfo, setStringProperty, setSubclassParent, toString, unsetSubclassParent
protected JdapiModule(long pd2fob)
pd2fob
- C pointer to the Forms module object.public java.lang.String getAbsolutePath()
The method returns null if it is called on a newly created module. This is because the path is not set until the module is saved.
protected void setAbsolutePath(java.lang.String path)
path
- String representing the location the file was opened from
(or saved to) on the file system.public static long getModulesProductVersion(java.lang.String fileName)
fileName
- the file name of the module.public static JdapiModule openModule(java.lang.String fileName)
A runtime exception is thrown if a module the file
has subclassed from cannot be found on the
Forms path. This behaviour can be suppressed with the
setFailSubclassLoad
method.
fileName
- file name of a module to load.public static JdapiModule openModule(java.io.File f)
A runtime exception is thrown if
a module the file has subclassed from cannot be found on the
Forms path. This behaviour can be suppressed with the
setFailSubclassLoad
method.
f
- File object of module to load.public static JdapiModule openModule(java.lang.String fileName, java.lang.String formsPath)
A runtime exception is thrown if
a module the file has subclassed from cannot be found on the
Forms path. This behaviour can be suppressed with the
setFailSubclassLoad
method.
fileName
- the file name of a module to load.formsPath
- Path to use to look for modules that have been
subclassed from. Pass null to this parameter to use the default
FORMS90_PATH.public static JdapiModule openModule(java.io.File f, java.lang.String formsPath)
A runtime exception is thrown if
a module the file has subclassed from cannot be found on the
Forms path. This behaviour can be suppressed with the
setFailSubclassLoad()
method.
f
- the file object of the module to load.formsPath
- path to use to look for modules that have been
subclassed from. Pass null to this parameter to use the default
FORMS90_PATH.public abstract void save(java.lang.String fileName)
Beecause this is a String, there might be an issue with directory separators. On Windows systems you will have to use a double backslash (\\); the first backslash acts as the "escape" character. There should not be a problem with the forward slash.
fileName
- the file path or name that you want to use to save the module.public abstract void compile()
public void compile_all()
public void destroy()
destroy
in interface JdapiObject
destroy
in class BaseFormsObject