final class BaseAPI
extends java.lang.Object
The _jni prefix is used on native methods to make it clear to users that they are calling a native method (same reason for the c_style_method_names). The native methods are all protected, as we call them from within the same package, although people could derive from these objects outside of the package and still use them.
All fields and methods of this class are static. The intention of this class is to provide a single source access to the C Forms API and so this class can be considered to represent the whole API, which does not have an instance as such.
This class also implements the Java Forms API metadata. The method
getClass()
can be used to get a Java class for a Forms
object from its Forms X_OTID Id (e.g. BLOCK_OTID).
Constructor and Description |
---|
BaseAPI() |
Modifier and Type | Method and Description |
---|---|
protected static long |
_jni_add_obj(long pd2fctx,
long pd2folb,
long pd2folt,
long pd2fob,
boolean replace) |
protected static long |
_jni_attach_lib(long pd2fctx,
long parent,
boolean db,
java.lang.String name) |
protected static int |
_jni_builder_version(long pd2fctx) |
protected static int[] |
_jni_char_size(long pd2fctx,
int w,
int h,
long pd2ffnt,
long pd2fcrd) |
protected static void |
_jni_compile_all(long pd2fctx,
long pd2fob) |
protected static void |
_jni_compile_form(long pd2fctx,
long pd2ffmd) |
protected static void |
_jni_compile_menu(long pd2fctx,
long pd2fmmd) |
protected static void |
_jni_compile_plsqllib(long pd2fctx,
long pd2flib) |
protected static void |
_jni_connect(long pd2fctx,
java.lang.String connectString) |
protected static void |
_jni_coord_apply(long pd2fctx,
long pd2fcrd,
long pd2ffmd) |
protected static void |
_jni_coord_extract(long pd2fctx,
long pd2fcrd,
long pd2ffmd) |
protected static long |
_jni_create_object(long pd2fctx,
long pd2fob,
int type,
java.lang.String name,
long pd2fob_mod,
long pd2fob_base) |
protected static void |
_jni_destroy(long pd2fctx,
long pd2fob) |
protected static void |
_jni_detach_lib(long pd2fctx,
long pd2falb) |
protected static void |
_jni_disconnect(long pd2fctx) |
protected static void |
_jni_finalize(long pd2fctx) |
protected static long |
_jni_find_obj_by_pos(long pd2fctx,
long pd2folb,
int pos) |
protected static long |
_jni_find_obj(long pd2fctx,
long pd2fob_owner,
java.lang.String name,
int type) |
protected static long |
_jni_find_olt_obj_by_pos(long pd2fctx,
long pd2folt,
int pos) |
protected static void |
_jni_font_apply(long pd2fctx,
long pd2ffnt,
long pd2fob,
int val) |
protected static void |
_jni_font_extract(long pd2fctx,
long pd2ffnt,
long pd2fob,
int val) |
protected static boolean |
_jni_get_bool_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static java.util.Hashtable |
_jni_get_built_ins(long pd2fctx) |
protected static java.lang.String |
_jni_get_desc(long pd2fctx,
long pd2folb,
long pd2fob) |
protected static int |
_jni_get_form_version(long pd2fctx,
java.lang.String fileName) |
protected static int |
_jni_get_menu_version(long pd2fctx,
java.lang.String fileName) |
protected static int |
_jni_get_num_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static long |
_jni_get_obj_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static int |
_jni_get_objlib_version(long pd2fctx,
java.lang.String fileName) |
protected static byte[] |
_jni_get_persist_client_info(long pd2fctx,
long pd2fob) |
protected static java.lang.String |
_jni_get_prop_const_name(long pd2fctx,
int propertyTypeId) |
protected static int |
_jni_get_prop_const_value(long pd2fctx,
java.lang.String pname) |
protected static java.lang.String |
_jni_get_prop_name(long pd2fctx,
int propertyTypeId) |
protected static int |
_jni_get_prop_type(long pd2fctx,
int propertyTypeId) |
protected static java.lang.String |
_jni_get_prop_value_name(long pd2fctx,
int propertyTypeId,
int val) |
protected static int |
_jni_get_prop_value_value(long pd2fctx,
int propertyTypeId,
java.lang.String valName) |
protected static java.lang.String |
_jni_get_text_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static void |
_jni_gra_export_image(long pd2fctx,
long pd2fgra,
java.lang.String filename) |
protected static void |
_jni_gra_import_image(long pd2fctx,
long pd2fgra,
java.lang.String filename,
int format) |
protected static boolean |
_jni_has_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static void |
_jni_inherit_prop(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static long |
_jni_initialize(boolean clientData,
boolean noDecode,
boolean transMode) |
protected static boolean |
_jni_is_prop_default(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static boolean |
_jni_is_prop_inherited(long pd2fctx,
long pd2fob,
int propertyTypeId) |
protected static boolean |
_jni_is_smart_class(long pd2fctx,
long pd2folb,
long pd2fob) |
protected static boolean |
_jni_is_subclassed(long pd2fctx,
long pd2fob) |
protected static void |
_jni_itm_delete_element(long pd2fctx,
long pd2fitm,
int index) |
protected static java.lang.String |
_jni_itm_get_element_label(long pd2fctx,
long pd2fitm,
int index) |
protected static java.lang.String |
_jni_itm_get_element_value(long pd2fctx,
long pd2fitm,
int index) |
protected static void |
_jni_itm_insert_element(long pd2fctx,
long pd2fitm,
int index,
java.lang.String label,
java.lang.String value) |
protected static FormModule |
_jni_load_form(long pd2fctx,
java.lang.String fileName,
java.lang.String formsPath) |
protected static MenuModule |
_jni_load_menu(long pd2fctx,
java.lang.String fileName,
java.lang.String formsPath) |
protected static ObjectLibrary |
_jni_load_objlib(long pd2fctx,
java.lang.String fileName,
java.lang.String formsPath) |
protected static PlsqlModule |
_jni_load_plsqllib(long pd2fctx,
java.lang.String fileName,
java.lang.String formsPath) |
protected static void |
_jni_mmd_add_role(long pd2fctx,
long pd2fmmd,
int index,
java.lang.String role) |
protected static java.lang.String |
_jni_mmd_get_role(long pd2fctx,
long pd2fmmd,
int index) |
protected static void |
_jni_mmd_remove_role(long pd2fctx,
long pd2fmmd,
int index) |
protected static void |
_jni_mni_add_role(long pd2fctx,
long pd2fmni,
int index,
java.lang.String role) |
protected static java.lang.String |
_jni_mni_get_role(long pd2fctx,
long pd2fmni,
int index) |
protected static void |
_jni_mni_remove_role(long pd2fctx,
long pd2fmni,
int index) |
protected static void |
_jni_move(long pd2fctx,
long pd2fob,
long pd2fob_next) |
protected static java.lang.String |
_jni_obj_tabname(long pd2fctx,
long pd2folb,
long pd2fob) |
protected static int |
_jni_query_type(long pd2fctx,
long pd2fob) |
protected static void |
_jni_rcg_qry_noparse(long pd2fctx,
long pd2frcg,
java.lang.String query) |
protected static void |
_jni_rcs_delete_row(long pd2fctx,
long pd2frcs,
int index) |
protected static java.lang.String |
_jni_rcs_get_row_name(long pd2fctx,
long pd2frcs,
int index) |
protected static java.lang.String |
_jni_rcs_get_row(long pd2fctx,
long pd2frcs,
int index) |
protected static void |
_jni_rcs_insert_row(long pd2fctx,
long pd2frcs,
int index,
java.lang.String text,
java.lang.String fmtMask) |
protected static void |
_jni_reattach(long pd2fctx,
long pd2fob) |
protected static void |
_jni_remove_obj(long pd2fctx,
long pd2folb,
long pd2fob) |
protected static long |
_jni_replicate(long pd2fctx,
long pd2fob_parent,
long pd2fob_src,
java.lang.String new_name) |
protected static void |
_jni_save_form(long pd2fctx,
long pd2ffmd,
java.lang.String fileName) |
protected static void |
_jni_save_menu(long pd2fctx,
long pd2fmmd,
java.lang.String fileName) |
protected static void |
_jni_save_objlib(long pd2fctx,
long pd2folb,
java.lang.String fileName) |
protected static void |
_jni_set_bool_prop(long pd2fctx,
long pd2fob,
int propertyTypeId,
boolean val) |
protected static void |
_jni_set_desc(long pd2fctx,
long pd2folb,
long pd2fob,
java.lang.String desc) |
protected static void |
_jni_set_num_prop(long pd2fctx,
long pd2fob,
int propertyTypeId,
int val) |
protected static void |
_jni_set_obj_prop(long pd2fctx,
long pd2fob,
int propertyTypeId,
long val) |
protected static void |
_jni_set_persist_client_info(long pd2fctx,
long pd2fob,
byte[] val) |
protected static void |
_jni_set_smart_class(long pd2fctx,
long pd2folb,
long pd2fob,
boolean smart) |
protected static void |
_jni_set_subclass_parent(long pd2fctx,
long pd2fob,
long pd2fob_parent) |
protected static void |
_jni_set_text_prop(long pd2fctx,
long pd2fob,
int propertyTypeId,
java.lang.String val) |
protected static int[] |
_jni_string_size(long pd2fctx,
java.lang.String str,
long pd2ffnt,
long pd2fcrd) |
protected static int |
_jni_trn_add_translation(long pd2fctx,
long pd2fob,
java.lang.String lang,
int char_set) |
protected static void |
_jni_trn_del_translation(long pd2fctx,
long pd2fob,
int trans_idx) |
protected static java.lang.Object[] |
_jni_trn_get_module_translations(long pd2fctx,
long pd2fob) |
protected static int[] |
_jni_trn_get_string_info(long pd2fctx,
long pd2fob,
int strid) |
protected static java.lang.String |
_jni_trn_get_string(long pd2fctx,
long pd2fob,
int trans_idx,
int string_id) |
protected static java.util.Vector |
_jni_trn_get_translations(long pd2fctx,
long pd2fob) |
protected static void |
_jni_trn_set_string(long pd2fctx,
long pd2fob,
int trans_idx,
int string_id,
java.lang.String val) |
protected static int |
_jni_trn_string_count(long pd2fctx,
long pd2fob) |
protected static boolean |
_jni_trn_string_in_use(long pd2fctx,
long pd2fob,
int sring_id) |
protected static void |
_jni_trn_wrap_translated_text(long pd2fctx,
long pd2fob,
int trans_idx) |
protected static void |
_jni_unset_subclass_parent(long pd2fctx,
long pd2fob) |
protected static BaseFormsObject |
createObject(java.lang.reflect.Constructor construct,
long pd2fctx,
long pd2fob)
instantiates a Java object to represent a Forms object based
on it's C API context and object pointer.
|
protected static BaseFormsObject |
createObject(long pd2fctx,
long pd2fob)
instantiates a Java object to represent a Forms object based
on it's C API context and object pointer.
|
protected static BaseFormsObject |
createObject(long d2ffox,
long pd2fctx,
long pd2fob)
instantiates a Java object to represent a Forms object based
on it's C API context and object pointer.
|
static java.lang.Class |
getClass(long d2ffox)
Gets the Java class that represents a given Forms id (X_OTID) for
a Forms object type.
|
protected static java.lang.reflect.Constructor |
getInternalConstructor(java.lang.Class formsObjClass)
Gets the constructor used internally by the Java Forms API to
instantiate objects based on API pointers.
|
static boolean |
isFailLibraryLoad()
Tests if the API level flag is set for failure on load of an
attached library.
|
static boolean |
isFailSubclassLoad()
Tests if the API level flag is set for failure on load of a
subclassed module.
|
static boolean |
isSubclassFlagSet()
Tests if the API level subclass or copy flag is set.
|
static java.lang.String |
pointerToString(long ptr)
Returns a long formatted as a hex pointer.
|
static void |
setFailLibraryLoad(boolean val)
Sets an API level flag to control if loading a module fails if
we can't load all the module's attached libraries.
|
static void |
setFailSubclassLoad(boolean val)
Sets an API level flag to control if loading a module fails if
we can't load all modules it subclasses from.
|
static void |
setSubclassFlag(boolean val)
Sets an API level flag indicating if we should subclass or copy when
deriving objects.
|
public static java.lang.Class getClass(long d2ffox)
d2ffox
- JdapiTypes.X_OTID constant id for a given Forms object
typeprotected static java.lang.reflect.Constructor getInternalConstructor(java.lang.Class formsObjClass) throws java.lang.NoSuchMethodException
formsObjClass
- Java Class object for type you want
constructor forjava.lang.NoSuchMethodException
- If constructor
of appropriate type is not foundprotected static BaseFormsObject createObject(long pd2fctx, long pd2fob)
pd2fctx
- C API context pointerpd2fob
- C API object pointerprotected static BaseFormsObject createObject(long d2ffox, long pd2fctx, long pd2fob)
d2ffox
- X_OTID id of the Forms object typepd2fctx
- C API context pointerpd2fob
- C API object pointerprotected static BaseFormsObject createObject(java.lang.reflect.Constructor construct, long pd2fctx, long pd2fob)
construct
- Internal constructor for appropriate typepd2fctx
- C API context pointerpd2fob
- C API object pointerpublic static java.lang.String pointerToString(long ptr)
ptr
- Pointer to get as stringpublic static void setSubclassFlag(boolean val)
val
- Value to set flag topublic static boolean isSubclassFlagSet()
public static void setFailSubclassLoad(boolean val)
If you set this flag and then load a module that includes subclassed objects, the API will try to load those modules to resolve the subclassing. The API uses the FORMS60_PATH as the path to use to look for these modules. If any module fails to load, a JdapiException will be thrown (with a status code of 29). If you don't set this flag the Form will load as normal, but not all subclassing will be resolved. Note, it such situations you need to take care as you could damage your Form.
This was introduced in Forms 6.0.6 and is turned ON by default in this version of Forms and later.
val
- Value to set flag topublic static boolean isFailSubclassLoad()
public static void setFailLibraryLoad(boolean val)
If you set this flag and then load modules, the library attachments representing the missing libraries will be lost when the module is saved.
val
- Value to set flag topublic static boolean isFailLibraryLoad()
protected static boolean _jni_get_bool_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static java.lang.String _jni_get_text_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static int _jni_get_num_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static long _jni_get_obj_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static void _jni_set_bool_prop(long pd2fctx, long pd2fob, int propertyTypeId, boolean val)
protected static void _jni_set_text_prop(long pd2fctx, long pd2fob, int propertyTypeId, java.lang.String val)
protected static void _jni_set_num_prop(long pd2fctx, long pd2fob, int propertyTypeId, int val)
protected static void _jni_set_obj_prop(long pd2fctx, long pd2fob, int propertyTypeId, long val)
protected static boolean _jni_has_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static void _jni_inherit_prop(long pd2fctx, long pd2fob, int propertyTypeId)
protected static boolean _jni_is_prop_inherited(long pd2fctx, long pd2fob, int propertyTypeId)
protected static boolean _jni_is_subclassed(long pd2fctx, long pd2fob)
protected static void _jni_unset_subclass_parent(long pd2fctx, long pd2fob)
protected static void _jni_set_subclass_parent(long pd2fctx, long pd2fob, long pd2fob_parent)
protected static int _jni_query_type(long pd2fctx, long pd2fob)
protected static boolean _jni_is_prop_default(long pd2fctx, long pd2fob, int propertyTypeId)
protected static long _jni_create_object(long pd2fctx, long pd2fob, int type, java.lang.String name, long pd2fob_mod, long pd2fob_base)
protected static void _jni_destroy(long pd2fctx, long pd2fob)
protected static void _jni_move(long pd2fctx, long pd2fob, long pd2fob_next)
protected static long _jni_find_obj(long pd2fctx, long pd2fob_owner, java.lang.String name, int type)
protected static long _jni_replicate(long pd2fctx, long pd2fob_parent, long pd2fob_src, java.lang.String new_name)
protected static void _jni_reattach(long pd2fctx, long pd2fob)
protected static int _jni_get_prop_type(long pd2fctx, int propertyTypeId)
protected static java.lang.String _jni_get_prop_name(long pd2fctx, int propertyTypeId)
protected static int _jni_get_prop_value_value(long pd2fctx, int propertyTypeId, java.lang.String valName)
protected static java.lang.String _jni_get_prop_value_name(long pd2fctx, int propertyTypeId, int val)
protected static int _jni_get_prop_const_value(long pd2fctx, java.lang.String pname)
protected static java.lang.String _jni_get_prop_const_name(long pd2fctx, int propertyTypeId)
protected static long _jni_initialize(boolean clientData, boolean noDecode, boolean transMode)
protected static void _jni_finalize(long pd2fctx)
protected static void _jni_connect(long pd2fctx, java.lang.String connectString)
protected static void _jni_disconnect(long pd2fctx)
protected static FormModule _jni_load_form(long pd2fctx, java.lang.String fileName, java.lang.String formsPath)
protected static MenuModule _jni_load_menu(long pd2fctx, java.lang.String fileName, java.lang.String formsPath)
protected static ObjectLibrary _jni_load_objlib(long pd2fctx, java.lang.String fileName, java.lang.String formsPath)
protected static void _jni_save_form(long pd2fctx, long pd2ffmd, java.lang.String fileName)
protected static void _jni_save_menu(long pd2fctx, long pd2fmmd, java.lang.String fileName)
protected static void _jni_save_objlib(long pd2fctx, long pd2folb, java.lang.String fileName)
protected static int _jni_builder_version(long pd2fctx)
protected static void _jni_compile_form(long pd2fctx, long pd2ffmd)
protected static void _jni_compile_menu(long pd2fctx, long pd2fmmd)
protected static void _jni_compile_plsqllib(long pd2fctx, long pd2flib)
protected static int _jni_get_form_version(long pd2fctx, java.lang.String fileName)
protected static int _jni_get_menu_version(long pd2fctx, java.lang.String fileName)
protected static int _jni_get_objlib_version(long pd2fctx, java.lang.String fileName)
protected static void _jni_compile_all(long pd2fctx, long pd2fob)
protected static void _jni_remove_obj(long pd2fctx, long pd2folb, long pd2fob)
protected static long _jni_add_obj(long pd2fctx, long pd2folb, long pd2folt, long pd2fob, boolean replace)
protected static long _jni_find_obj_by_pos(long pd2fctx, long pd2folb, int pos)
protected static long _jni_find_olt_obj_by_pos(long pd2fctx, long pd2folt, int pos)
protected static void _jni_set_smart_class(long pd2fctx, long pd2folb, long pd2fob, boolean smart)
protected static boolean _jni_is_smart_class(long pd2fctx, long pd2folb, long pd2fob)
protected static void _jni_set_desc(long pd2fctx, long pd2folb, long pd2fob, java.lang.String desc)
protected static java.lang.String _jni_get_desc(long pd2fctx, long pd2folb, long pd2fob)
protected static java.lang.String _jni_obj_tabname(long pd2fctx, long pd2folb, long pd2fob)
protected static byte[] _jni_get_persist_client_info(long pd2fctx, long pd2fob)
protected static void _jni_set_persist_client_info(long pd2fctx, long pd2fob, byte[] val)
protected static java.util.Hashtable _jni_get_built_ins(long pd2fctx)
protected static PlsqlModule _jni_load_plsqllib(long pd2fctx, java.lang.String fileName, java.lang.String formsPath)
protected static int[] _jni_string_size(long pd2fctx, java.lang.String str, long pd2ffnt, long pd2fcrd)
protected static int[] _jni_char_size(long pd2fctx, int w, int h, long pd2ffnt, long pd2fcrd)
protected static void _jni_coord_extract(long pd2fctx, long pd2fcrd, long pd2ffmd)
protected static void _jni_coord_apply(long pd2fctx, long pd2fcrd, long pd2ffmd)
protected static void _jni_font_extract(long pd2fctx, long pd2ffnt, long pd2fob, int val)
protected static void _jni_font_apply(long pd2fctx, long pd2ffnt, long pd2fob, int val)
protected static void _jni_gra_export_image(long pd2fctx, long pd2fgra, java.lang.String filename)
protected static void _jni_gra_import_image(long pd2fctx, long pd2fgra, java.lang.String filename, int format)
protected static long _jni_attach_lib(long pd2fctx, long parent, boolean db, java.lang.String name)
protected static void _jni_detach_lib(long pd2fctx, long pd2falb)
protected static void _jni_rcg_qry_noparse(long pd2fctx, long pd2frcg, java.lang.String query)
protected static void _jni_itm_insert_element(long pd2fctx, long pd2fitm, int index, java.lang.String label, java.lang.String value)
protected static void _jni_itm_delete_element(long pd2fctx, long pd2fitm, int index)
protected static java.lang.String _jni_itm_get_element_label(long pd2fctx, long pd2fitm, int index)
protected static java.lang.String _jni_itm_get_element_value(long pd2fctx, long pd2fitm, int index)
protected static void _jni_rcs_insert_row(long pd2fctx, long pd2frcs, int index, java.lang.String text, java.lang.String fmtMask)
protected static void _jni_rcs_delete_row(long pd2fctx, long pd2frcs, int index)
protected static java.lang.String _jni_rcs_get_row(long pd2fctx, long pd2frcs, int index)
protected static java.lang.String _jni_rcs_get_row_name(long pd2fctx, long pd2frcs, int index)
protected static void _jni_mmd_add_role(long pd2fctx, long pd2fmmd, int index, java.lang.String role)
protected static void _jni_mmd_remove_role(long pd2fctx, long pd2fmmd, int index)
protected static java.lang.String _jni_mmd_get_role(long pd2fctx, long pd2fmmd, int index)
protected static void _jni_mni_add_role(long pd2fctx, long pd2fmni, int index, java.lang.String role)
protected static void _jni_mni_remove_role(long pd2fctx, long pd2fmni, int index)
protected static java.lang.String _jni_mni_get_role(long pd2fctx, long pd2fmni, int index)
protected static java.util.Vector _jni_trn_get_translations(long pd2fctx, long pd2fob)
protected static java.lang.Object[] _jni_trn_get_module_translations(long pd2fctx, long pd2fob)
protected static int _jni_trn_add_translation(long pd2fctx, long pd2fob, java.lang.String lang, int char_set)
protected static void _jni_trn_del_translation(long pd2fctx, long pd2fob, int trans_idx)
protected static int _jni_trn_string_count(long pd2fctx, long pd2fob)
protected static boolean _jni_trn_string_in_use(long pd2fctx, long pd2fob, int sring_id)
protected static java.lang.String _jni_trn_get_string(long pd2fctx, long pd2fob, int trans_idx, int string_id)
protected static void _jni_trn_set_string(long pd2fctx, long pd2fob, int trans_idx, int string_id, java.lang.String val)
protected static int[] _jni_trn_get_string_info(long pd2fctx, long pd2fob, int strid)
protected static void _jni_trn_wrap_translated_text(long pd2fctx, long pd2fob, int trans_idx)