oracle.forms.jdapi
Class MenuModule

java.lang.Object
  |
  +--oracle.forms.jdapi.BaseFormsObject
        |
        +--oracle.forms.jdapi.JdapiModule
              |
              +--oracle.forms.jdapi.MenuModule
All Implemented Interfaces:
JdapiObject

public class MenuModule
extends JdapiModule

Object to represent a Forms MenuModule object. This is an encapsulation of the Forms C API d2fmmd.

In some cases, using methods on this class may result in a JdapiIllegalStateException being thrown. When this happens, you are using an object that refers to a Forms object that has been deleted - your reference is no longer valid. You can check if an instance of this class is valid by using the isValidFormsObject() method. If you code correctly, this should not happen. It will tend to happen if you keep references (for extended periods) to Forms objects rather than look them up dynamically. Of course you will only have this problem if you destroy Forms objects.

See Also:
BaseAPI

Fields inherited from class oracle.forms.jdapi.JdapiModule
m_clientInfo, m_pd2fob
 
Fields inherited from interface oracle.forms.jdapi.JdapiObject
PROPERTY_DEFAULT_VALUE, PROPERTY_INHERITED_VALUE, PROPERTY_OVERRIDDEN_DEFAULT_VALUE, PROPERTY_OVERRIDDEN_INHERITED_VALUE, PROPERTY_STATE_UNKNOWN
 
Constructor Summary
protected MenuModule(long pd2fmmd)
          Protected constructor, used internally to create MenuModule objects.
  MenuModule(java.lang.String name)
          Constructor used to create MenuModule objects.
 
Method Summary
 void addRole(int index, java.lang.String role)
          Adds a role to the list of roles for a menu module.
 MenuModule clone(java.lang.String newName)
          Creates a copy of the object as a child of 'parent'.
 void compile()
          Compiles the module to the filesystem.
static MenuModule find(java.lang.String name)
          Find an instance of MenuModule.
 JdapiIterator getAttachedLibraries()
          Accessor for child AttachedLibrary objects (ATTACHMENT_LIBRARY_PTID).
 java.lang.String getComment()
          Get text property Comment (COMMENT_PTID).
 java.lang.String getMainMenu()
          Get text property MainMenu (MAIN_MENU_PTID).
 java.lang.String getMenuDirectory()
          Get text property MenuDirectory (MENU_DIRECTORY_PTID).
 java.lang.String getMenuFilename()
          Get text property MenuFilename (MENU_FILENAME_PTID).
 JdapiIterator getMenus()
          Accessor for child Menu objects (MENU_PTID).
 java.lang.String getName()
          Get text property Name (NAME_PTID).
 JdapiIterator getObjectGroups()
          Accessor for child ObjectGroup objects (OBJECT_GROUP_PTID).
 java.lang.String getParentFilename()
          Get text property ParentFilename (PARENT_FILENAME_PTID).
 java.lang.String getParentFilepath()
          Get text property ParentFilepath (PARENT_FILEPATH_PTID).
 java.lang.String getParentModule()
          Get text property ParentModule (PARENT_MODULE_PTID).
 int getParentModuleType()
          Get number property ParentModuleType (PARENT_MODULETYPE_PTID).
 java.lang.String getParentName()
          Get text property ParentName (PARENT_NAME_PTID).
 int getParentType()
          Get number property ParentType (PARENT_TYPE_PTID).
 int getPersistentClientInfoLength()
          Get number property PersistentClientInfoLength (PERSISTENT_CLIENT_INFO_LENGTH_PTID).
 JdapiIterator getProgramUnits()
          Accessor for child ProgramUnit objects (PROGRAM_UNIT_PTID).
 JdapiIterator getPropertyClasses()
          Accessor for child PropertyClass objects (PROPERTY_CLASS_PTID).
 java.lang.String getRole(int index)
          Gets the name of a role from a menu module's list of roles.
 int getRoleCount()
          Get number property RoleCount (ROLE_COUNT_PTID).
 java.lang.String getStartupCode()
          Get text property StartupCode (STARTUP_CODE_PTID).
 TranslationTable getTranslationTable()
          Get a TranslationTable object representing the translations for this module.
 int getTypeId()
          Gets the HtmlForms object type ID.
 JdapiIterator getVisualAttributes()
          Accessor for child VisualAttribute objects (VISUAL_ATTRIBUTE_PTID).
 boolean isDirtyInfo()
          Get boolean property DirtyInfo (DIRTY_INFO_PTID).
 boolean isShareLibrary()
          Get boolean property ShareLibrary (SHARE_LIBRARY_PTID).
 boolean isUseSecurity()
          Get boolean property UseSecurity (USE_SECURITY_PTID).
static MenuModule open(java.io.File file)
          Loads a MenuModule module from the filesystem or from the loaded modules list.
static MenuModule open(java.io.File file, java.lang.String formsPath)
          Loads a MenuModule module from the filesystem or from the loaded modules list.
static MenuModule open(java.lang.String fileName)
          Loads a MenuModule module from the filesystem or from the loaded modules list.
static MenuModule open(java.lang.String fileName, java.lang.String formsPath)
          Loads a MenuModule module from the filesystem or from the loaded modules list.
 void removeRole(int index)
          Removes a role from the list of roles for a menu module.
 void save(java.lang.String fileName)
          Saves the module to the filesystem.
 void setComment(java.lang.String value)
          Sets text property Comment (COMMENT_PTID).
 void setDirtyInfo(boolean value)
          Sets boolean property DirtyInfo (DIRTY_INFO_PTID).
 void setMainMenu(java.lang.String value)
          Sets text property MainMenu (MAIN_MENU_PTID).
 void setMenuDirectory(java.lang.String value)
          Sets text property MenuDirectory (MENU_DIRECTORY_PTID).
 void setMenuFilename(java.lang.String value)
          Sets text property MenuFilename (MENU_FILENAME_PTID).
 void setName(java.lang.String value)
          Sets text property Name (NAME_PTID).
 void setParentFilename(java.lang.String value)
          Sets text property ParentFilename (PARENT_FILENAME_PTID).
 void setParentFilepath(java.lang.String value)
          Sets text property ParentFilepath (PARENT_FILEPATH_PTID).
 void setParentModule(java.lang.String value)
          Sets text property ParentModule (PARENT_MODULE_PTID).
 void setParentModuleType(int value)
          Sets number property ParentModuleType (PARENT_MODULETYPE_PTID).
 void setParentName(java.lang.String value)
          Sets text property ParentName (PARENT_NAME_PTID).
 void setParentType(int value)
          Sets number property ParentType (PARENT_TYPE_PTID).
 void setPersistentClientInfoLength(int value)
          Sets number property PersistentClientInfoLength (PERSISTENT_CLIENT_INFO_LENGTH_PTID).
 void setShareLibrary(boolean value)
          Sets boolean property ShareLibrary (SHARE_LIBRARY_PTID).
 void setStartupCode(java.lang.String value)
          Sets text property StartupCode (STARTUP_CODE_PTID).
 void setUseSecurity(boolean value)
          Sets boolean property UseSecurity (USE_SECURITY_PTID).
 
Methods inherited from class oracle.forms.jdapi.JdapiModule
changeOwner, clearObjectPointer, clone, createSubclassedChild, destroy, equals, getAbsolutePath, getBooleanProperty, getChildObjectProperty, getClassName, getClientInfo, getIntegerProperty, getIntegerPropertyString, getJdapiMetaObject, getMetaProperties, getModule, getModulesProductVersion, getObjectPointer, getObjectProperty, getObjProp, getOwnedObjects, getOwner, getPersistentClientInfoBlob, getPersistentClientInfoObject, getPropertyState, getPropertyValueName, getQualifiedName, getStringIDProperty, getStringProperty, getSubclassParent, hasDefaultedProperty, hasInheritedProperty, hasOverriddenProperty, hasProperty, inheritProperty, isSubclassed, isValidFormsObject, move, openModule, openModule, openModule, openModule, queryType, reattach, setAbsolutePath, setBooleanProperty, setClientInfo, setIntegerProperty, setObjectProperty, setObjProp, setPersistentClientInfo, setPersistentClientInfo, setStringProperty, setSubclassParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuModule

public MenuModule(java.lang.String name)
Constructor used to create MenuModule objects.
Parameters:
name - Name of the new object

MenuModule

protected MenuModule(long pd2fmmd)
Protected constructor, used internally to create MenuModule objects. This doesn't actually create a new MenuModule, it just creates a Java instance for an already existing Forms object.

Do NOT use this constructor, even within the Jdapi package. If you have a pointer and need to instantiate it's Java representation, get the object via the context cache, e.g.

 myBaseObject = Jdapi.getObject(myPointer);
 
Parameters:
pd2fctx - C pointer to Forms context
pd2fmmd - C pointer to Forms object
Method Detail

getTypeId

public int getTypeId()
Gets the HtmlForms object type ID.
Overrides:
getTypeId in class oracle.forms.jdapi.BaseFormsObject
Returns:
X_OTID ID for this object type

open

public static MenuModule open(java.lang.String fileName)
Loads a MenuModule module from the filesystem or from the loaded modules list.

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 Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - File name of MenuModule to load
Returns:
MenuModule object

open

public static MenuModule open(java.io.File file)
Loads a MenuModule module from the filesystem or from the loaded modules list.

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 Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - File representing MenuModule to load
Returns:
MenuModule object

open

public static MenuModule open(java.lang.String fileName,
                              java.lang.String formsPath)
Loads a MenuModule module from the filesystem or from the loaded modules list.

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 Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - Filename of MenuModule to load
formsPath - Path to use to look for modules that have been subclassed from. 'null' means use the default FORMS70_PATH.
Returns:
MenuModule object

open

public static MenuModule open(java.io.File file,
                              java.lang.String formsPath)
Loads a MenuModule module from the filesystem or from the loaded modules list.

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 Jdapi.setFailSubclassLoad() method.

Parameters:
File - File representing MenuModule to load
formsPath - Path to use to look for modules that have been subclassed from. 'null' means use the default FORMS70_PATH.
Returns:
MenuModule object

save

public void save(java.lang.String fileName)
Saves the module to the filesystem.
Overrides:
save in class JdapiModule
Parameters:
fileName - Filename to save as

compile

public void compile()
Compiles the module to the filesystem.
Overrides:
compile in class JdapiModule
Parameters:
fileName - name of file to compile

clone

public MenuModule clone(java.lang.String newName)
Creates a copy of the object as a child of 'parent'.
Parameters:
newName - Name of object that's being created
Returns:
Replicant object

find

public static MenuModule find(java.lang.String name)
Find an instance of MenuModule.
Parameters:
parent - Parent object of object you wish to find
name - Name of object you wish to find
Returns:
Object instance you are looking for, or null if none was found

addRole

public void addRole(int index,
                    java.lang.String role)
Adds a role to the list of roles for a menu module.
Parameters:
index - Index to add role at
role - The name of the role

removeRole

public void removeRole(int index)
Removes a role from the list of roles for a menu module.
Parameters:
index - Index of role to remove

getRole

public java.lang.String getRole(int index)
Gets the name of a role from a menu module's list of roles.
Parameters:
index - Index of role to get
Returns:
index The name of the role

getTranslationTable

public TranslationTable getTranslationTable()
Get a TranslationTable object representing the translations for this module.
Returns:
TranslationTable

getComment

public java.lang.String getComment()
Get text property Comment (COMMENT_PTID).
Returns:
Value of property

setComment

public void setComment(java.lang.String value)
Sets text property Comment (COMMENT_PTID).
Parameters:
value - Value to set property to

getMainMenu

public java.lang.String getMainMenu()
Get text property MainMenu (MAIN_MENU_PTID).
Returns:
Value of property

setMainMenu

public void setMainMenu(java.lang.String value)
Sets text property MainMenu (MAIN_MENU_PTID).
Parameters:
value - Value to set property to

getMenuDirectory

public java.lang.String getMenuDirectory()
Get text property MenuDirectory (MENU_DIRECTORY_PTID).
Returns:
Value of property

setMenuDirectory

public void setMenuDirectory(java.lang.String value)
Sets text property MenuDirectory (MENU_DIRECTORY_PTID).
Parameters:
value - Value to set property to

getMenuFilename

public java.lang.String getMenuFilename()
Get text property MenuFilename (MENU_FILENAME_PTID).
Returns:
Value of property

setMenuFilename

public void setMenuFilename(java.lang.String value)
Sets text property MenuFilename (MENU_FILENAME_PTID).
Parameters:
value - Value to set property to

getName

public java.lang.String getName()
Get text property Name (NAME_PTID).
Overrides:
getName in class oracle.forms.jdapi.BaseFormsObject
Returns:
Value of property

setName

public void setName(java.lang.String value)
Sets text property Name (NAME_PTID).
Parameters:
value - Value to set property to

getParentFilename

public java.lang.String getParentFilename()
Get text property ParentFilename (PARENT_FILENAME_PTID).
Returns:
Value of property

setParentFilename

public void setParentFilename(java.lang.String value)
Sets text property ParentFilename (PARENT_FILENAME_PTID).
Parameters:
value - Value to set property to

getParentFilepath

public java.lang.String getParentFilepath()
Get text property ParentFilepath (PARENT_FILEPATH_PTID).
Returns:
Value of property

setParentFilepath

public void setParentFilepath(java.lang.String value)
Sets text property ParentFilepath (PARENT_FILEPATH_PTID).
Parameters:
value - Value to set property to

getParentModule

public java.lang.String getParentModule()
Get text property ParentModule (PARENT_MODULE_PTID).
Returns:
Value of property

setParentModule

public void setParentModule(java.lang.String value)
Sets text property ParentModule (PARENT_MODULE_PTID).
Parameters:
value - Value to set property to

getParentName

public java.lang.String getParentName()
Get text property ParentName (PARENT_NAME_PTID).
Returns:
Value of property

setParentName

public void setParentName(java.lang.String value)
Sets text property ParentName (PARENT_NAME_PTID).
Parameters:
value - Value to set property to

getStartupCode

public java.lang.String getStartupCode()
Get text property StartupCode (STARTUP_CODE_PTID).
Returns:
Value of property

setStartupCode

public void setStartupCode(java.lang.String value)
Sets text property StartupCode (STARTUP_CODE_PTID).
Parameters:
value - Value to set property to

getParentModuleType

public int getParentModuleType()
Get number property ParentModuleType (PARENT_MODULETYPE_PTID).
Returns:
Value of property

setParentModuleType

public void setParentModuleType(int value)
Sets number property ParentModuleType (PARENT_MODULETYPE_PTID).
Parameters:
value - Value to set property to

getParentType

public int getParentType()
Get number property ParentType (PARENT_TYPE_PTID).
Returns:
Value of property

setParentType

public void setParentType(int value)
Sets number property ParentType (PARENT_TYPE_PTID).
Parameters:
value - Value to set property to

getPersistentClientInfoLength

public int getPersistentClientInfoLength()
Get number property PersistentClientInfoLength (PERSISTENT_CLIENT_INFO_LENGTH_PTID).
Returns:
Value of property

setPersistentClientInfoLength

public void setPersistentClientInfoLength(int value)
Sets number property PersistentClientInfoLength (PERSISTENT_CLIENT_INFO_LENGTH_PTID).
Parameters:
value - Value to set property to

getRoleCount

public int getRoleCount()
Get number property RoleCount (ROLE_COUNT_PTID).
Returns:
Value of property

isDirtyInfo

public boolean isDirtyInfo()
Get boolean property DirtyInfo (DIRTY_INFO_PTID).
Returns:
Value of property

setDirtyInfo

public void setDirtyInfo(boolean value)
Sets boolean property DirtyInfo (DIRTY_INFO_PTID).
Parameters:
value - Value to set property to

isShareLibrary

public boolean isShareLibrary()
Get boolean property ShareLibrary (SHARE_LIBRARY_PTID).
Returns:
Value of property

setShareLibrary

public void setShareLibrary(boolean value)
Sets boolean property ShareLibrary (SHARE_LIBRARY_PTID).
Parameters:
value - Value to set property to

isUseSecurity

public boolean isUseSecurity()
Get boolean property UseSecurity (USE_SECURITY_PTID).
Returns:
Value of property

setUseSecurity

public void setUseSecurity(boolean value)
Sets boolean property UseSecurity (USE_SECURITY_PTID).
Parameters:
value - Value to set property to

getAttachedLibraries

public JdapiIterator getAttachedLibraries()
Accessor for child AttachedLibrary objects (ATTACHMENT_LIBRARY_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of AttachedLibrary objects

getMenus

public JdapiIterator getMenus()
Accessor for child Menu objects (MENU_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of Menu objects

getObjectGroups

public JdapiIterator getObjectGroups()
Accessor for child ObjectGroup objects (OBJECT_GROUP_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of ObjectGroup objects

getProgramUnits

public JdapiIterator getProgramUnits()
Accessor for child ProgramUnit objects (PROGRAM_UNIT_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of ProgramUnit objects

getPropertyClasses

public JdapiIterator getPropertyClasses()
Accessor for child PropertyClass objects (PROPERTY_CLASS_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of PropertyClass objects

getVisualAttributes

public JdapiIterator getVisualAttributes()
Accessor for child VisualAttribute objects (VISUAL_ATTRIBUTE_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of VisualAttribute objects