|
enum | AOM_sync_state_e {
AOM_SYNC_STATE_UP_TO_DATE = 1,
AOM_SYNC_STATE_OUT_OF_DATE = 2,
AOM_SYNC_STATE_REPLICA_HAS_LATER_DATE = 3,
AOM_SYNC_STATE_UNKNOWN = 4,
AOM_SYNC_STATE_NOT_REPLICATED = 5,
AOM_SYNC_STATE_MASTER_DOES_NOT_EXIST = 6,
AOM_SYNC_STATE_UP_TO_DATE_PER_HUB = 7,
AOM_SYNC_STATE_UNKNOWN_OWNING_SITE = 8,
AOM_SYNC_STATE_REPLICA_HAS_BEEN_SUPERSEDED = 9,
AOM_SYNC_STATE_NOT_A_REPLICA = 10
} |
|
enum | AOM_sync_type_e { OBJECT_SYNC = 1,
COMPONENT_SYNC = 2,
ASSEMBLY_SYNC = 3
} |
|
|
TCCORE_API int | AOM_ask_archive_date (tag_t object_tag, char date_string[WSO_date_size_c+1]) |
|
TCCORE_API int | AOM_ask_archive_date2 (tag_t object_tag, char **date_string) |
|
TCCORE_API int | AOM_ask_archive_info (tag_t obj, char archive_info[AOM_archive_size_c+1]) |
|
TCCORE_API int | AOM_ask_archive_info2 (tag_t obj, char **archive_info) |
|
TCCORE_API int | AOM_ask_backup_date (tag_t obj, date_t *backup_date) |
|
TCCORE_API int | AOM_ask_creation_date (tag_t obj, date_t *creation_date) |
|
TCCORE_API int | AOM_ask_group (tag_t obj, tag_t *owning_group) |
|
TCCORE_API int | AOM_ask_if_frozen (tag_t obj, logical *frozen) |
|
TCCORE_API int | AOM_ask_if_modifiable (tag_t object_tag, logical *verdict) |
|
TCCORE_API int | AOM_ask_import_record (tag_t object_tag, tag_t *import_record) |
|
TCCORE_API int | AOM_ask_import_record_associated_object (tag_t import_record, tag_t *obj_tag) |
|
TCCORE_API int | AOM_ask_last_modifier (tag_t obj, tag_t *a_user) |
|
TCCORE_API int | AOM_ask_modified_date (tag_t obj, date_t *modified_date) |
|
TCCORE_API int | AOM_ask_name (tag_t obj, char **name) |
|
TCCORE_API int | AOM_ask_owner (tag_t obj, tag_t *owning_user) |
|
TCCORE_API int | AOM_ask_query_locale_neutral (logical *mode) |
|
TCCORE_API int | AOM_ask_query_rewrite_mode (logical *mode) |
|
TCCORE_API int | AOM_bulk_save_instances (int n_instances, const tag_t *instances) |
|
TCCORE_API int | AOM_check_sync_state (int n_replicas, tag_t *replica_tags, int **owning_site_ids, AOM_sync_state_t **sync_state, date_t **master_lmd, date_t **replica_lmd, int **error_codes) |
|
TCCORE_API int | AOM_delete (tag_t obj) |
|
TCCORE_API int | AOM_delete_from_parent (tag_t obj, tag_t parent) |
|
TCCORE_API int | AOM_describe_class (tag_t class_id, int n_names, char **attr_names, char **application_name, int *descriptor, int *n_attrs, tag_t **attr_ids) |
|
TCCORE_API int | AOM_exit_module () |
|
TCCORE_API int | AOM_freeze (tag_t obj) |
|
TCCORE_API int | AOM_get_export_info (tag_t object_tag, int *n_export_info, AOM_export_info_entry_t **export_info) |
|
TCCORE_API int | AOM_get_publication_info (tag_t object_tag, int *n_publication_info, AOM_publication_info_entry_t **publication_info) |
|
TCCORE_API int | AOM_init_module () |
|
TCCORE_API int | AOM_is_archived (tag_t object_tag, logical *answer) |
|
TCCORE_API int | AOM_is_type_of (tag_t object_tag, tag_t type_tag, logical *answer) |
|
TCCORE_API int | AOM_load (tag_t obj) |
|
TCCORE_API int | AOM_load_instances (int n, tag_t *objs, int *n_loaded, tag_t **objs_loaded) |
|
TCCORE_API int | AOM_lock (tag_t obj) |
|
TCCORE_API int | AOM_lock_for_delete (tag_t obj) |
|
TCCORE_API int | AOM_refresh (tag_t obj, int lockFlag) |
|
TCCORE_API int | AOM_register_localized_attribute (tag_t class_id, tag_t source_att, tag_t target_att) |
|
TCCORE_API int | AOM_save (tag_t obj) |
|
TCCORE_API int | AOM_save_with_extensions (tag_t obj) |
|
TCCORE_API int | AOM_save_without_extensions (tag_t object) |
|
TCCORE_API int | AOM_set_ownership (tag_t obj, tag_t user, tag_t group) |
|
TCCORE_API int | AOM_set_query_locale_neutral (logical mode) |
|
TCCORE_API int | AOM_set_query_rewrite_mode (logical mode) |
|
TCCORE_API int | AOM_unfreeze (tag_t obj) |
|
TCCORE_API int | AOM_unload (tag_t obj) |
|
This module provides the implementation for load, unload, delete, and save for all applications that use POM tags as their means of identifying objects passed through the ITK interface. These functions correspond to the methods of the abstract class POM Application Object.
The prototypes for these functions are in aom.h.
It is suggested that AOM be used by code using Teamcenter Engineering supplied classes (i.e., datasets, Items, etc.) and POM be used directly when dealing with your extensions to the schema.
For example, a Form can use a POM class to store the data. Any searches or reports against the same must be done through POM since the AOM only loads classes known to the C++ encapsulation. This layer cannot be user-extended at present.
Also, the POM should not be used directly against AOM loaded classes since the correspondence between the POM object and its C++ encapsulation can be broken (with unpredictable results).
Restrictions:
These functions do not work with tags to instances of classes that are subclasses of POM_system_class (i.e., Groups, Users, and GroupMembers).
#define AOM_archive_size_c 127 |
Definition at line 45 of file aom.h.
#define AOM_ixr_transactionid_size_c 1023 |
Definition at line 46 of file aom.h.
#define AOM_max_VLA_size 3952 |
Define max VLA size as 4000-48(header) = 3952
Definition at line 48 of file aom.h.
Unlocks an object for modification by another process.
Definition at line 250 of file aom.h.
Enumerator |
---|
AOM_SYNC_STATE_UP_TO_DATE |
|
AOM_SYNC_STATE_OUT_OF_DATE |
|
AOM_SYNC_STATE_REPLICA_HAS_LATER_DATE |
|
AOM_SYNC_STATE_UNKNOWN |
|
AOM_SYNC_STATE_NOT_REPLICATED |
|
AOM_SYNC_STATE_MASTER_DOES_NOT_EXIST |
|
AOM_SYNC_STATE_UP_TO_DATE_PER_HUB |
|
AOM_SYNC_STATE_UNKNOWN_OWNING_SITE |
|
AOM_SYNC_STATE_REPLICA_HAS_BEEN_SUPERSEDED |
|
AOM_SYNC_STATE_NOT_A_REPLICA |
|
Definition at line 66 of file aom.h.
Enumerator |
---|
OBJECT_SYNC |
|
COMPONENT_SYNC |
|
ASSEMBLY_SYNC |
|
Definition at line 80 of file aom.h.
TCCORE_API int AOM_ask_archive_date |
( |
tag_t |
object_tag, |
|
|
char |
date_string[WSO_date_size_c+1] |
|
) |
| |
- Deprecated:
- It will be removed from Tc12.
From Tc10 onwards, please use AOM_ask_archive_date2().
Asks for the archive date of an object.
- Parameters
-
object_tag | (I) |
date_string | (O) |
TCCORE_API int AOM_ask_archive_date2 |
( |
tag_t |
object_tag, |
|
|
char ** |
date_string |
|
) |
| |
Asks for the archive date of an object.
- Parameters
-
object_tag | (I) |
date_string | (OF) |
TCCORE_API int AOM_ask_archive_info |
( |
tag_t |
obj, |
|
|
char |
archive_info[AOM_archive_size_c+1] |
|
) |
| |
- Deprecated:
- It will be removed from Tc12.
From Tc10 onwards, please use AOM_ask_archive_info2().
Returns a string containing information on archived data associated with this object.
- Parameters
-
TCCORE_API int AOM_ask_archive_info2 |
( |
tag_t |
obj, |
|
|
char ** |
archive_info |
|
) |
| |
Returns a string containing information on archived data associated with this object.
- Parameters
-
TCCORE_API int AOM_ask_backup_date |
( |
tag_t |
obj, |
|
|
date_t * |
backup_date |
|
) |
| |
Returns the date on which the object was last backed up.
- Parameters
-
TCCORE_API int AOM_ask_creation_date |
( |
tag_t |
obj, |
|
|
date_t * |
creation_date |
|
) |
| |
Returns the creation date of the object.
- Parameters
-
TCCORE_API int AOM_ask_group |
( |
tag_t |
obj, |
|
|
tag_t * |
owning_group |
|
) |
| |
Returns the owning group for the object.
- Parameters
-
TCCORE_API int AOM_ask_if_frozen |
( |
tag_t |
obj, |
|
|
logical * |
frozen |
|
) |
| |
Inquires whether an object is frozen or not. If the object is frozen, then answer is set to TRUE, otherwise answer is set to FALSE.
- Parameters
-
TCCORE_API int AOM_ask_if_modifiable |
( |
tag_t |
object_tag, |
|
|
logical * |
verdict |
|
) |
| |
TCCORE_API int AOM_ask_import_record |
( |
tag_t |
object_tag, |
|
|
tag_t * |
import_record |
|
) |
| |
- Parameters
-
object_tag | (I) Tag of an object. |
import_record | (O)Tag of Import Record |
TCCORE_API int AOM_ask_import_record_associated_object |
( |
tag_t |
import_record, |
|
|
tag_t * |
obj_tag |
|
) |
| |
- Parameters
-
import_record | (I) Tag of an import record. |
obj_tag | (O) Tag of an object. |
TCCORE_API int AOM_ask_last_modifier |
( |
tag_t |
obj, |
|
|
tag_t * |
a_user |
|
) |
| |
Returns the tag of the last user to modify this object.
- Parameters
-
TCCORE_API int AOM_ask_modified_date |
( |
tag_t |
obj, |
|
|
date_t * |
modified_date |
|
) |
| |
Returns the date on which the object was last modified.
- Parameters
-
TCCORE_API int AOM_ask_name |
( |
tag_t |
obj, |
|
|
char ** |
name |
|
) |
| |
TCCORE_API int AOM_ask_owner |
( |
tag_t |
obj, |
|
|
tag_t * |
owning_user |
|
) |
| |
Returns the owning user for the object.
- Parameters
-
TCCORE_API int AOM_ask_query_locale_neutral |
( |
logical * |
mode | ) |
|
- Parameters
-
mode | (O) logical to indicate whether this query is locale neutral and will search ALL locales |
TCCORE_API int AOM_ask_query_rewrite_mode |
( |
logical * |
mode | ) |
|
- Parameters
-
mode | (O) logical to show if query rewrite has been enabled/disabled. |
TCCORE_API int AOM_bulk_save_instances |
( |
int |
n_instances, |
|
|
const tag_t * |
instances |
|
) |
| |
Saves the business objects in bulk through a single transaction. Caller reponsible for locking the business objects before the call unlocking them after the call
Restrictions:
This bulk save function must be called ONLY with bulk create ITK, TCTYPE_create_objects.
- Parameters
-
n_instances | (I) Number of instances to be saved in bulk |
instances | (I) n_instances Instances to be saved in bulk |
TCCORE_API int AOM_check_sync_state |
( |
int |
n_replicas, |
|
|
tag_t * |
replica_tags, |
|
|
int ** |
owning_site_ids, |
|
|
AOM_sync_state_t ** |
sync_state, |
|
|
date_t ** |
master_lmd, |
|
|
date_t ** |
replica_lmd, |
|
|
int ** |
error_codes |
|
) |
| |
- Parameters
-
n_replicas | (I) Number of replica objects to check. |
replica_tags | (I) Tags of replica objects to check. |
owning_site_ids | (OF) n_replicas Array of owning sites |
sync_state | (OF) n_replicas Array of sync state returns. |
master_lmd | (OF) n_replicas Array of master site last mod dates. |
replica_lmd | (OF) n_replicas Array of replica site last mod dates. |
error_codes | (OF) n_replicas Array of error codes. |
TCCORE_API int AOM_delete |
( |
tag_t |
obj | ) |
|
Deletes an application object. Before deleting, the object must first be loaded or refreshed for modify. The object can be unloaded automatically if necessary.
- Parameters
-
TCCORE_API int AOM_delete_from_parent |
( |
tag_t |
obj, |
|
|
tag_t |
parent |
|
) |
| |
TCCORE_API int AOM_describe_class |
( |
tag_t |
class_id, |
|
|
int |
n_names, |
|
|
char ** |
attr_names, |
|
|
char ** |
application_name, |
|
|
int * |
descriptor, |
|
|
int * |
n_attrs, |
|
|
tag_t ** |
attr_ids |
|
) |
| |
AOM_describe_class is similar to POM_describe_class but will hide attributes for internal use only.
- Parameters
-
class_id | (I) |
n_names | (I) |
attr_names | (I) n_names |
application_name | (OF) |
descriptor | (O) |
n_attrs | (O) |
attr_ids | (OF) |
TCCORE_API int AOM_exit_module |
( |
| ) |
|
Shuts down the AOM module.
TCCORE_API int AOM_freeze |
( |
tag_t |
obj | ) |
|
Freezes an object so that all of its freezable attributes can no longer be modified.
- Parameters
-
Returns export information about the specified object. The export information is basically the data stored in a Teamcenter Engineering Export Record (one for each site the object was exported to), which consists of the following:
-
The tag of the site the object was exported to
-
The user ID of the user who performed the last export
-
The reason, if any, for exporting the object to the site
-
The date when the object was last exported to the site
Restrictions:
The specified object must be a workspace object. This function will return export information only if run at the site that owns the specified object. If run at a non-owning site, a successful status will be returned and a zero value returned for n_export_info.
- Parameters
-
object_tag | (I) Tag of the exported object. |
n_export_info | (O) Number of sites the object was exported to. |
export_info | (OF) n_export_info Array of structures containing the actual export information. |
Returns publication information about the specified object. The publication information is basically the data stored in a Publication Audit Record (one for each site the object was published to), which consists of the following:
-
The tag of ODS site the object was published to
-
The user ID of the user who performed the last publication or re-publication
-
The date when the object was last published or republished to the site
Restrictions:
The specified object must be a workspace object. This function will return publication information only if run at the site that owns the specified object. If run at a non-owning site, a successful status will be returned and a zero value will returned for n_publish_info.
- Parameters
-
object_tag | (I) Tag of the published object. |
n_publication_info | (O) Number of ODS sites object was published to. |
publication_info | (OF) n_publication_info Array of structures containing the actual publication information. |
TCCORE_API int AOM_init_module |
( |
| ) |
|
Initializes the AOM module. This module provides the implementation for load, unload, delete, and save for all applications that use POM tags as their means of identifying objects passed through the ITK interface.
TCCORE_API int AOM_is_archived |
( |
tag_t |
object_tag, |
|
|
logical * |
answer |
|
) |
| |
Inquires whether an object is archived or not. If the object is archived, then answer is set to TRUE, otherwise answer is set to FALSE.
- Parameters
-
Returns a flag that indicates if the type of a given object is or is a subtype of a given type tag. The answer is TRUE if the object type of the given object tag is type_tag or is a subtype of type_tag.
- Parameters
-
object_tag | (I) Tag of an object. |
type_tag | (I) tag of a type object |
answer | (O) A flag indicating if the object type of the given object (object_tag) is or is a subtype of the given type object (type_tag). |
TCCORE_API int AOM_load |
( |
tag_t |
obj | ) |
|
Loads an application object. This function loads the entire object as its actual class, if it is not already loaded. It is not entirely necessary to call this function since Teamcenter Engineering loads objects on demand; however, using this function is more efficient when loading several objects.
- Parameters
-
TCCORE_API int AOM_load_instances |
( |
int |
n, |
|
|
tag_t * |
objs, |
|
|
int * |
n_loaded, |
|
|
tag_t ** |
objs_loaded |
|
) |
| |
Loads a set of application objects. This is more efficient than loading each object individually.
- Parameters
-
n | (I) Number of objects to load. |
objs | (I) Array of objects to load. |
n_loaded | (O) Number of objects that were successfully loaded. |
objs_loaded | (OF) n_loaded Array of objects that were successfully loaded. |
TCCORE_API int AOM_lock |
( |
tag_t |
obj | ) |
|
Locks an object against modification by another process. This is similar to calling AOM_refresh(object, TRUE) except that this function does not reload the object if it already has a lock (as AOM_refresh would).
- Parameters
-
TCCORE_API int AOM_lock_for_delete |
( |
tag_t |
obj | ) |
|
TCCORE_API int AOM_refresh |
( |
tag_t |
obj, |
|
|
int |
lockFlag |
|
) |
| |
Reloads the in-memory representation of the object from the database. The tag does not change and any references to the object will still be valid. Any in-memory changes to the original object, since it was loaded, will be lost. If the object has been changed in the database since it was last loaded, then those changes will now be present in memory.
-
If lock_flag is set to FALSE (0), then a lock is not placed on the object. You can use this option to discard in memory edits that are no longer desired, or to update the in memory representation to reflect data base changes.
-
If lock_flag is set to TRUE (non 0), then the object is reloaded as described above, and a write lock is obtained on the object. This is required if you wish to save a modified version of the object or delete it.
POM_modifiable can be called before AOM_refresh if you want to avoid reloading an object that has already been loaded for modify. However, AOM_refresh can frequently determine on its own whether a reload is actually necessary or not.
A likely error would be that you are unable to obtain a write lock because somebody else already has it.
- Parameters
-
TCCORE_API int AOM_register_localized_attribute |
( |
tag_t |
class_id, |
|
|
tag_t |
source_att, |
|
|
tag_t |
target_att |
|
) |
| |
- Parameters
-
class_id | (I) |
source_att | (I) |
target_att | (I) |
TCCORE_API int AOM_save |
( |
tag_t |
obj | ) |
|
- Deprecated:
- This function is deprecated and will be removed from Tc13. From Tc11.2 onwards, based on the need/context of use case, please use ITK API AOM_save_with_extensions or AOM_save_without_extensions
Saves an application object to the database.
Restrictions:
Before calling save, the object must first be loaded or refreshed for modify.
- Parameters
-
TCCORE_API int AOM_save_with_extensions |
( |
tag_t |
obj | ) |
|
Saves the object and executes the PreCondition, PreAction and PostAction extensions if TC_save_msg is implemented on the type of the object; For example, this generic ITK will execute TC_save_msg on Item in the same way as ITEM_save_item does.
Restrictions:
Before calling save, the object must first be loaded or refreshed for modify.
- Parameters
-
TCCORE_API int AOM_save_without_extensions |
( |
tag_t |
object | ) |
|
Saves the object and will not execute the PreCondition, PreAction and PostAction extensions even if TC_save_msg is implemented on the type of the object.
<b>Restrictions:</b>
<br/>Before calling save, the object must first be loaded or refreshed for modify.
- Returns
-
- Parameters
-
object | (I) Tag of input object to save. |
Sets the user and group ownership for the object.
- Warning
- When you change ownership on a dataset then all versions of that dataset and all AE_PART_OF named references will have their ownership changed as well.
- Parameters
-
TCCORE_API int AOM_set_query_locale_neutral |
( |
logical |
mode | ) |
|
- Parameters
-
mode | (I) logical to indicate whether this query is locale neutral and will search ALL locales |
TCCORE_API int AOM_set_query_rewrite_mode |
( |
logical |
mode | ) |
|
- Parameters
-
mode | (I) logical to enable/disable query rewrite. |
TCCORE_API int AOM_unfreeze |
( |
tag_t |
obj | ) |
|
Unfreezes an object so that all of its freezable attributes can be unfrozen and modified.
- Parameters
-
TCCORE_API int AOM_unload |
( |
tag_t |
obj | ) |
|
Removes an object from your local POM memory. You can reload the object later with the same tag if necessary.
- Parameters
-