|
| METAFRAMEWORK_API int | BO_get_recoverable_object_tag (const char *uid, logical persist_recipe, tag_t *tag) |
| |
| METAFRAMEWORK_API int | BO_get_recoverable_object_uid (tag_t bus_obj_tag, logical persist_recipe, char **uid) |
| |
| METAFRAMEWORK_API int | BO_is_recoverable (tag_t obj_tag, logical *is_recoverable, logical *persist_recipe) |
| |
| METAFRAMEWORK_API int | BO_lookup_recoverable_object_tag (const char *uid, logical persist_recipe, tag_t *tag) |
| |
| METAFRAMEWORK_API int | BO_register_recoverable_business_object (const char *name, ReconstructFn fn, RecoverableKeyFn key_function) |
| |
| METAFRAMEWORK_API int | BO_remove_recoverable_business_object (const char *uid) |
| |
| METAFRAMEWORK_API int | BO_get_children (tag_t object, int property_names_count, const char **property_names, int *child_count, tag_t **child_tags, char ***child_context_property_names) |
| |
| METAFRAMEWORK_API int | BOREG_tag_to_uid (tag_t tag, char **string) |
| |
| METAFRAMEWORK_API int | BOREG_uid_to_tag (const char *uid, tag_t *tag) |
| |
| METAFRAMEWORK_API int | BOREG_load_bo_extender_lib (const char *bo_name) |
| |
| METAFRAMEWORK_API int | BOREG_init_extender_bo (tag_t type_tag, int operation_id) |
| |
Teamcenter has implemented ITK level functions that allow programmers to register and recover Teamcenter business objects. Those business objects are stored in a registry (cache) of recoverable business objects.
The ITK functions for session recovery include:
-
A function to retrieve a business object so it can be recovered later.
-
A function to determine if a business object is recoverable.
-
A function to retrieve the tag of a recoverable business object.
-
A function to retrieve the UID of a recoverable business object.
To use these functions, include session_recovery.h.
| typedef int(* ReconstructFn)(const char *recipe,tag_t *bus_obj_tag) |
A Reconstruct function pointer for recoverable business objects registered by BO_register_recoverable_business_object.
Definition at line 40 of file session_recovery.h.
| typedef char*(* RecoverableKeyFn)(const char *recipe_uid) |
A Get Recoverable key function pointer for recoverable business objects registered by BO_register_recoverable_business_object
Definition at line 48 of file session_recovery.h.
| METAFRAMEWORK_API int BO_get_children |
( |
tag_t |
object, |
|
|
int |
property_names_count, |
|
|
const char ** |
property_names, |
|
|
int * |
child_count, |
|
|
tag_t ** |
child_tags, |
|
|
char *** |
child_context_property_names |
|
) |
| |
Retrieves the children for the input BusinessObject.
- Parameters
-
| object | (I) The object for which to get children. |
| property_names_count | (I) The number of propertyNames which are input |
| property_names | (I) Optional listing of children (property names) to return.
If empty, then the TYPE_DefaultChildProperties preference is used. |
| child_count | (O) The count of child_tags and child_context_property_names being returned. |
| child_tags | (OF) child_count The tags of the children |
| child_context_property_names | (OF) child_count The context (property name) in which the child exists in relationship to the input object. |
| METAFRAMEWORK_API int BO_get_recoverable_object_tag |
( |
const char * |
uid, |
|
|
logical |
persist_recipe, |
|
|
tag_t * |
tag |
|
) |
| |
Retrieves the tag associated with the UID of a recoverable object
- Returns
-
- Parameters
-
| uid | (I) UID of object to recover |
| persist_recipe | (I) Indicates if the recipe should be persisted to the db |
| tag | (O) Tag of recoverable object |
| METAFRAMEWORK_API int BO_get_recoverable_object_uid |
( |
tag_t |
bus_obj_tag, |
|
|
logical |
persist_recipe, |
|
|
char ** |
uid |
|
) |
| |
Retrieves the uid associated with a recoverable object
- Returns
-
ITK_ok on success
-
ITK_internal_error if an internal error has occurred. Check the Teamcenter system log for more information.
- Parameters
-
| bus_obj_tag | (I) The tag of a Teamcenter business object |
| persist_recipe | (I) Indicates if the recipe should be persisted to the database |
| uid | (OF) The UID for the input Teamcenter business object |
| METAFRAMEWORK_API int BO_is_recoverable |
( |
tag_t |
obj_tag, |
|
|
logical * |
is_recoverable, |
|
|
logical * |
persist_recipe |
|
) |
| |
Checks whether the business object is recoverable
- Returns
-
ITK_ok Success.
-
ITK_internal_error if an internal error has occurred. Check the Teamcenter system log for more information.
- Parameters
-
| obj_tag | (I) The tag of the Teamcenter object |
| is_recoverable | (O) True if the object is recoverable. False if it is not. |
| persist_recipe | (O) Indicates whether the recipe should be persisted to the DB |
| METAFRAMEWORK_API int BO_lookup_recoverable_object_tag |
( |
const char * |
uid, |
|
|
logical |
persist_recipe, |
|
|
tag_t * |
tag |
|
) |
| |
Finds a recoverable object tag in the runtime cache.
If no tag can be found using the provided UID, no object is created. If the object needs to be created, use the BO_get_recoverable_object_tag API instead.
- Returns
-
- Parameters
-
| uid | (I) UID of object to recover |
| persist_recipe | (I) Indicates if the recipe should be persisted to the db |
| tag | (O) Tag of recoverable object |
Registers a business object class for recovery.
- Returns
-
- Parameters
-
| name | (I) Name to Register |
| fn | (I) Funtion pointer to the function used to recover the Teamcenter BusinessObject |
| key_function | (I) Function pointer to the recoverable Key function. |
| METAFRAMEWORK_API int BO_remove_recoverable_business_object |
( |
const char * |
uid | ) |
|
Removes an entry corresponding to input uid if present in the cache of recoverable business objects.
- Returns
-
ITK_ok on success.
-
ITK_internal_error if an internal error has occurred. Check the Teamcenter system log for more information.
- Parameters
-
| uid | (I) UID of business object to be removed. |
| METAFRAMEWORK_API int BOREG_init_extender_bo |
( |
tag_t |
type_tag, |
|
|
int |
operation_id |
|
) |
| |
Initializes all the extender objects for the indicated type and operation.
This function is used by generated metamodel code and is for internal use only.
- Returns
-
ITK_ok on success
-
Possibly other errors.
- Deprecated:
- This function is not supported after V10.1.3
- Parameters
-
| type_tag | (I) The tag of the type to initialize |
| operation_id | (I) The operation ID |
| METAFRAMEWORK_API int BOREG_load_bo_extender_lib |
( |
const char * |
bo_name | ) |
|
Loads the libraries required by all extenders defined for the given business object during extender object initialization.
This function is used by generated metamodel code and is for internal use only.
- Returns
-
ITK_ok on success
-
Possibly other errors.
- Deprecated:
- This function is not supported after V10.1.3
- Parameters
-
| bo_name | (I) The Business Object internal name |
| METAFRAMEWORK_API int BOREG_tag_to_uid |
( |
tag_t |
tag, |
|
|
char ** |
string |
|
) |
| |
Transforms the tag for a type of type ImanType to a string of format TYPE::<typeName>::<ClassName>::<ParentTypeName>.
For example, calling with the tag for a type of type "Document" would result in the following string: "TYPE::Document::Item::Item".
- Returns
-
ITK_ok on success
-
Possibly other errors.
- Parameters
-
| tag | (I) Tag of the ImanType |
| string | (OF) UID of the ImanType |
| METAFRAMEWORK_API int BOREG_uid_to_tag |
( |
const char * |
uid, |
|
|
tag_t * |
tag |
|
) |
| |
Transforms a UID string to the tag for a type of type ImanType.
For example, calling with a UID "TYPE::Document::Item::Item" will result in the tag for a type of type "Document".
- Returns
-
ITK_ok on success
-
Possibly other errors.
- Parameters
-
| uid | (I) UID string of the ImanType |
| tag | (O) Tag of the ImanType |