The system employs an object-oriented design and these functions implement the methods found at the top of the hierarchy. The hierarchy starts with POM objects at the top. This means all descendant objects may use POM functions.
Each of these modules introduces a specialized interface to the objects. Therefore, the super class interface (e.g., POM) may no longer be applicable and/or allowed.
These constants specify the size of variables returned in the get_info entries. Do not write more than this number of bytes into the buffers.
WSO_name_size_c
WSO_desc_size_c
WSO_date_size_c
WSO_revision_size_c
Search Criteria
The following structure allows you to specify a query:
Status
The following structure is used for returning status information for a workspace object from WSOM_ask_status:
Basic Information
The following structure contains basic information about a workspace object:
The values in square brackets indicate the amount of memory allocated for the storage of the value of the corresponding attribute. For those that can be changed care must be taken not to overwrite the limits.
Dates are returned as: yyyy-mm-dd hh:mm:ss
Common Return Values
CXPOM_invalid_tag | Function specified a tag that is either no longer existent or is not a tag_t. |
CXPOM_wrong_class | Tag supplied is not a valid WorkspaceObject. |
WSO_wr_invalid_depth | Invalid depth (zero or negative). |
WSOM_invalid_eff | Effectivity tag being queried does not exist. |
WSOM_bad_effectivity_text_format | This error is returned when difficulty is encountered parsing a string into a set of start-end range values. The problem might be one or more of the following:
|
WSOM_range_overlap | A correctly formatted discontinuous range must contain values that are in ascending order, otherwise this error will result. Go to WSOM_eff_set_range for additional information. |
WSOM_eff_with_end_item_in_rs | The WSOM_eff_with_end_item_in_rs error code is deprecated and will be removed from Teamcenter 11. |
WSOM_cannot_edit_protected | A protected effectivity cannot be edited. To make the effectivity editable, it must first be unlocked. This can only be done by a user with the correct permissions. |
WSOM_no_mixed_range_types | The range text contains both date and unit values; effectivities can have either a date range or a unit range, but not both. |
WSOM_closed_status_open_range | A range being set with an array has an odd number of values, suggesting an open-ended range, but the WSOM_open_ended_status_t parameter is set to EFFECTIVITY_closed. |
WSOM_open_status_closed_range | A range being set with an array has an even number of values, suggesting a closed range, but the WSOM_open_ended_status_t parameter is set to EFFECTIVITY_open_ended or EFFECTIVITY_stock_out. |
WSOM_cant_save_eff_with_no_rs | An effectivity must be attached to a release status before it can be saved. This error results if an ITK program is still working with an effectivity that has been removed from its release status. |
WSOM_init_module WSOM_exit_module | WSOM_init/exit_module are the standard wrappers round any module; they are called by Teamcenter startup / TC_stop so the normal ITK programmer can ignore them. Repeated calls to WSOM_init_module are harmless. |
WSOM_extent | WSOM_extent returns all the workspace objects in the database (an unlikely event for any real site - but potentially useful on a test database). |
WSOM_cannot_destroy_eff | An attempt is being made to destroy an effectivity attached to a release status. This should be done by removing the effectivity from the release status. |
#define Describe_application 0x8 |
Definition at line 176 of file workspaceobject.h.
#define Describe_archive_date 0x2000 |
Definition at line 186 of file workspaceobject.h.
#define Describe_backup_date 0x4000 |
Definition at line 187 of file workspaceobject.h.
#define Describe_date_created 0x10 |
Definition at line 177 of file workspaceobject.h.
#define Describe_date_modified 0x20 |
Definition at line 178 of file workspaceobject.h.
#define Describe_date_released 0x40 |
Definition at line 179 of file workspaceobject.h.
#define Describe_description 0x8000 |
Definition at line 188 of file workspaceobject.h.
#define Describe_id_string 0x100 |
Definition at line 181 of file workspaceobject.h.
#define Describe_is_frozen 0x10000 |
Definition at line 189 of file workspaceobject.h.
#define Describe_is_reserved 0x20000 |
Definition at line 190 of file workspaceobject.h.
#define Describe_last_mod_user 0x1000 |
Definition at line 185 of file workspaceobject.h.
#define Describe_object_name 0x1 |
Definition at line 173 of file workspaceobject.h.
#define Describe_object_type 0x2 |
Definition at line 174 of file workspaceobject.h.
#define Describe_owner 0x4 |
Definition at line 175 of file workspaceobject.h.
#define Describe_owning_group 0x800 |
Definition at line 184 of file workspaceobject.h.
#define Describe_owning_site 0x80000 |
Definition at line 192 of file workspaceobject.h.
#define Describe_released_for 0x80 |
Definition at line 180 of file workspaceobject.h.
#define Describe_revision_id 0x40000 |
Definition at line 191 of file workspaceobject.h.
#define Describe_revision_limit 0x400 |
Definition at line 183 of file workspaceobject.h.
#define Describe_revision_number 0x200 |
Definition at line 182 of file workspaceobject.h.
#define RLM_followup_action_size_c 32 |
Definition at line 167 of file workspaceobject.h.
#define RLM_tasktype_desc_size_c 32 |
Definition at line 166 of file workspaceobject.h.
#define RLM_tasktype_name_size_c 32 |
Definition at line 165 of file workspaceobject.h.
#define TC_LEGACY_ID_NAME_SIZE 32 |
Definition at line 141 of file workspaceobject.h.
#define WSO_date_size_c 21 |
Definition at line 146 of file workspaceobject.h.
#define WSO_desc_size_c 240 |
POM's current max string length.
Definition at line 144 of file workspaceobject.h.
#define WSO_gov_class_size_c 128 |
Definition at line 152 of file workspaceobject.h.
#define WSO_ip_class_size_c 128 |
Definition at line 151 of file workspaceobject.h.
#define WSO_name_size_c 128 |
Definition at line 140 of file workspaceobject.h.
#define WSO_object_type_size_c 32 |
Definition at line 147 of file workspaceobject.h.
#define WSO_release_status_size_c 128 |
Definition at line 149 of file workspaceobject.h.
#define WSO_revision_size_c 15 |
Definition at line 148 of file workspaceobject.h.
#define WSO_search_HOR 0 |
Definition at line 253 of file workspaceobject.h.
#define WSO_search_Vault 1 |
Definition at line 254 of file workspaceobject.h.
#define WSO_where_ref_any_depth -1 |
Used to indicate that a where referenced search should proceed until no more references are found. Note there is currently no published ITK for where referenced.
Definition at line 159 of file workspaceobject.h.
typedef struct WSO_description_s * WSO_description_p_t |
typedef struct WSO_description_s WSO_description_t |
typedef struct WSO_descriptor_s * WSO_descriptor_p_t |
typedef struct WSO_descriptor_s WSO_descriptor_t |
typedef struct WSO_get_info_entry_s * WSO_get_info_entry_p_t |
typedef struct WSO_get_info_entry_s WSO_get_info_entry_t |
typedef struct WSO_search_criteria_s * WSO_search_criteria_p_t |
typedef struct WSO_search_criteria_s WSO_search_criteria_t |
typedef struct WSO_status_s WSO_status_t |
typedef struct WSOM_effectivity_info_s WSOM_effectivity_info_t |
typedef enum WSOM_open_ended_status_e WSOM_open_ended_status_t |
typedef enum WSOM_range_type_e WSOM_range_type_t |
Effectivity open ended status
Definition at line 328 of file workspaceobject.h.
enum WSOM_range_type_e |
Effectivity range types
Effectivity ranges are either dates or units and this is enforced in the code. However, legacy data upgraded to the new model may contain both dates and units.
EFFECTIVITY_range_not_defined | |
EFFECTIVITY_range_unit | |
EFFECTIVITY_range_date | |
EFFECTIVITY_range_legacy_unit_and_date |
Definition at line 340 of file workspaceobject.h.
Gives the tag of the original object on which the input WorkspaceObject was based (i.e., copied from). If no based-on information is stored for this WorkspaceObject then NULLTAG is specified .
Based-on information is only stored for subclasses of Dataset, Item and Item Revision.
When either the original or the derived object is deleted, the based-on information that links them is lost.
Based-on information is not stored for objects created in Teamcenter versions prior to 3.4.
wso | (I) Tag of the workspace object |
based_on_wso | (O) Tag of the object that the input object is based-on. NULLTAG if no based on information. |
TCCORE_API int WSOM_ask_description | ( | tag_t | a_WSO_tag, | |
char | a_description[WSO_desc_size_c+1] | |||
) |
a_WSO_tag | (I) Tag of the object |
a_description | (O) Description of the object |
TCCORE_API int WSOM_ask_description2 | ( | tag_t | a_WSO_tag, | |
char ** | a_description | |||
) |
Returns the description of the specified WorkspaceObject.
a_WSO_tag | (I) Tag of the object |
a_description | (OF) Description of the object |
TCCORE_API int WSOM_ask_ead_paragraph | ( | tag_t | aWSOTag, | |
int * | num, | |||
char *** | paragraph | |||
) |
aWSOTag | (I) |
num | (O) |
paragraph | (OF) |
TCCORE_API int WSOM_ask_effectivity_mode | ( | logical * | is_v7 | ) |
Identifies whether or not the database is in v7 effectivity mode. If not in v7 mode, the new effectivity functionality will not be available. However, in a Multi-Site Collaboration environment, all sites must be in v7 effectivity mode to safely exchange effectivity data. See change_effectivity_mode utility for more information.
is_v7 | (O) True if the database is in v7 effectivity mode, otherwise false. |
TCCORE_API int WSOM_ask_gov_classification | ( | tag_t | aWSOsTag, | |
char | classification[WSO_gov_class_size_c+1] | |||
) |
aWSOsTag | (I) |
classification | (O) |
TCCORE_API int WSOM_ask_gov_classification2 | ( | tag_t | aWSOsTag, | |
char ** | classification | |||
) |
aWSOsTag | (I) |
classification | (OF) |
TCCORE_API int WSOM_ask_id_string | ( | tag_t | a_WSO_tag, | |
char ** | an_id | |||
) |
Returns the ID string of the specified Item or Item Revision. This string is the same as displayed in the Workspace ID column. If the tag passed to this routine is a WorkspaceObject other than an Item or Item Revision, an empty string is returned.
a_WSO_tag | (I) Tag of the object |
an_id | (OF) ID string of the object |
TCCORE_API int WSOM_ask_ip_classification | ( | tag_t | aWSOsTag, | |
char | aClassification[WSO_ip_class_size_c+1] | |||
) |
aWSOsTag | (I) |
aClassification | (O) |
TCCORE_API int WSOM_ask_ip_classification2 | ( | tag_t | aWSOsTag, | |
char ** | aClassification | |||
) |
aWSOsTag | (I) |
aClassification | (OF) |
aWSOsTag | (I) |
logged | (O) |
aWSOTag | (I) |
licenseCount | (O) |
licenses | (OF) license_count |
TCCORE_API int WSOM_ask_name | ( | tag_t | a_WSO_tag, | |
char | a_name[WSO_name_size_c+1] | |||
) |
a_WSO_tag | (I) Tag of the object |
a_name | (O) Name of the object |
TCCORE_API int WSOM_ask_name2 | ( | tag_t | a_WSO_tag, | |
char ** | a_name | |||
) |
This function returns the name of the input WorkspaceObject.
a_WSO_tag | (I) Tag of the object |
a_name | (OF) Name of the object |
TCCORE_API int WSOM_ask_object_id_string | ( | tag_t | a_WSO_tag, | |
char ** | object_id | |||
) |
Returns the object ID of the specified WorkspaceObject. The string is the object ID as it appears in the Object column of the Workspace display.
a_WSO_tag | (I) Tag of the object |
object_id | (OF) Object ID of the object |
TCCORE_API int WSOM_ask_object_type | ( | tag_t | a_WSO_tag, | |
char | object_type[WSO_name_size_c+1] | |||
) |
a_WSO_tag | (I) |
object_type | (O) |
TCCORE_API int WSOM_ask_object_type2 | ( | tag_t | a_WSO_tag, | |
char ** | object_type | |||
) |
Returns the object type of the specified WorkspaceObject.
a_WSO_tag | (I) |
object_type | (OF) |
TCCORE_API int WSOM_ask_release_status_list | ( | tag_t | workspace_object, | |
int * | status_count, | |||
tag_t ** | status_list | |||
) |
Lists release statuses attached to a workspace object.
workspace_object | (I) Workspace object tag |
status_count | (O) Number of release statuses attached to the workspace object |
status_list | (OF) status_count Tags of release statuses attached to the workspace object |
TCCORE_API int WSOM_ask_revision | ( | tag_t | a_WSO_tag, | |
int * | rev_number | |||
) |
Returns the revision number of the WorkspaceObject.
a_WSO_tag | (I) Tag of the object |
rev_number | (O) Revision of the object |
TCCORE_API int WSOM_ask_revision_limit | ( | tag_t | a_WSO_tag, | |
int * | rev_limit | |||
) |
Returns the revision limit for the input object.
a_WSO_tag | (I) Tag of the object |
rev_limit | (O) Revision limit of the object |
TCCORE_API int WSOM_ask_status | ( | tag_t | a_WSO_tag, | |
int * | status_count, | |||
WSO_status_t ** | status_structures | |||
) |
a_WSO_tag | (I) |
status_count | (O) |
status_structures | (OF) status_count |
aWSOsTag | (I) |
can_unmanage | (O) |
TCCORE_API int WSOM_clear_search_criteria | ( | WSO_search_criteria_t * | criteria | ) |
This function initializes a search criteria structure. This would be used in preparation for doing another search.
criteria | (I) |
Creates a copy of the input WorkspaceObject. This will actually invoke the copy method of the actual class of the object passed in. A new name can be specified for the copied object if desired, or a NULL pointer can be passed in.
Restrictions:
Some subclasses may enforce unique names among instances of that class. In that case a new name is required or an error returns.
a_WSO_tag | (I) |
new_name | (I) |
copy_tag | (O) |
TCCORE_API int WSOM_describe | ( | tag_t | a_WSO_tag, | |
WSO_description_t * | description | |||
) |
Returns a structure containing basic information about a workspace object. This is a convenience function, as all of this information can also be obtained using other POM, AOM and WSOM functions.
a_WSO_tag | (I) |
description | (O) |
TCCORE_API int WSOM_eff_ask_date_range | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
char ** | range_text | |||
) |
Gives a text representation of the date range values of a given effectivity. Formatting takes place according to the restrictions of WSOM_eff_set_range.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
range_text | (OF) Text representation of the date range values |
TCCORE_API int WSOM_eff_ask_dates | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
int * | n_dates, | |||
date_t ** | start_end_values, | |||
WSOM_open_ended_status_t * | open_ended_or_stock_out | |||
) |
Converts the date range into an array of start-end values. If size of the array is odd, the date range is open-ended.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
n_dates | (O) The size of the array or start-end values |
start_end_values | (OF) n_dates The array of start-end values |
open_ended_or_stock_out | (O) One of the following constants: EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed. |
Gives the end item against which a given effectivity is qualified.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity |
end_item | (O) Tag of the end item |
TCCORE_API int WSOM_eff_ask_end_item_rev | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
tag_t * | end_item_rev | |||
) |
Gives the end item revision against which a given effectivity is qualified.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity |
end_item_rev | (O) Tag of the end item revision |
TCCORE_API int WSOM_eff_ask_is_protected | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
logical * | is_protected | |||
) |
Gives the protection set on a given effectivity. A protected effectivity is one that cannot be edited.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
is_protected | (O) True if the effectivity is being protected to prevent editing, otherwise, false. |
Gives a text representation of both the unit and date range values of a given effectivity concatenated together. Formatting takes place according to the restrictions of WSOM_eff_set_range.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
range_text | (OF) Text representation of the date range values |
TCCORE_API int WSOM_eff_ask_range_type | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
WSOM_range_type_t * | range_type | |||
) |
Identifies whether an effectivity contains no ranges, unit ranges, date ranges, or both in the case of legacy data.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
range_type | (O) One of the following constants: EFFECTIVITY_range_not_defined, EFFECTIVITY_range_unit, EFFECTIVITY_range_date or EFFECTIVITY_range_legacy_unit_and_date. |
TCCORE_API int WSOM_eff_ask_ranges | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
int * | n_units, | |||
int * | n_dates, | |||
int ** | units, | |||
date_t ** | dates, | |||
WSOM_open_ended_status_t * | unit_open_ended_status, | |||
WSOM_open_ended_status_t * | date_open_ended_status | |||
) |
Converts both effectivity ranges into arrays of start-end values. Although as indicated in the comments for WSOM_eff_set_range, only one range type is permitted per effectivity, legacy data does not have this restriction. This method will extract both ranges for such data. This method may also be of use if it is unknown what range type a particular effectivity is, although in this respect, the function WSOM_eff_ask_range_type may be of some use.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
n_units | (O) The size of the array or start-end values |
n_dates | (O) |
units | (OF) n_units The array of start-end values |
dates | (OF) n_dates |
unit_open_ended_status | (O) One of the following constants: EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed. |
date_open_ended_status | (O) |
TCCORE_API int WSOM_eff_ask_unit_range | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
char ** | range_text | |||
) |
Gives a text representation of the unit range values of a given effectivity. Formatting takes place according to the restrictions of WSOM_effectivity_set_range.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
range_text | (OF) Text representation of the unit range values |
TCCORE_API int WSOM_eff_ask_units | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
int * | n_units, | |||
int ** | start_end_values, | |||
WSOM_open_ended_status_t * | open_ended_or_stock_out | |||
) |
Converts the unit range into an array of start-end values. If size of the array is odd, the unit range is open-ended.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being queried |
n_units | (O) The size of the array or start-end values |
start_end_values | (OF) n_units The array of start-end values |
open_ended_or_stock_out | (O) One of the following constants: EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed. |
Clears any existing effectivity ranges from this effectivity object. Required if you want to change from unit to date ranges or vice versa.
release_status | (I) |
effectivity | (I) |
TCCORE_API int WSOM_eff_create_with_date_text | ( | tag_t | release_status, | |
tag_t | end_item, | |||
const char * | range_text, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity with the date range specified by a text string.
release_status | (I) |
end_item | (I) |
range_text | (I) |
effectivity | (O) |
TCCORE_API int WSOM_eff_create_with_unit_text | ( | tag_t | release_status, | |
tag_t | end_item, | |||
const char * | range_text, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity with the unit range specified by a text string.
release_status | (I) |
end_item | (I) |
range_text | (I) |
effectivity | (O) |
TCCORE_API int WSOM_eff_set_date_range | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
const char * | range_text, | |||
logical | append | |||
) |
Parses the range_text string and sets the effectivity range to the values extracted. If append is true, the range values are added to the existing date range, otherwise the range is replaced with the values specified.
release_status | (I) |
effectivity | (I) |
range_text | (I) |
append | (I) |
TCCORE_API int WSOM_eff_set_dates | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
int | n_dates, | |||
date_t * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
logical | append | |||
) |
Uses an array of dates to set the date range for a given effectivity. The release status is locked by this call; call AOM_save to commit the changes to the database.
Restrictions:
Go to WSOM_eff_set_units for additional information.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity |
n_dates | (I) The size of the array or start-end values |
start_end_values | (I) The array of start-end values of the discontinuous range. For example, consider a discontinuous range consisting of continuous ranges r1, r2, ..., rn where rx has start and end values, rx.start and rx.end. The array of start_end_vals for this discontinuous range will be constructed as { r1.start, r1.end, r2.start, r2.end, ..., rn.start, rn.end }. The last value, rn.end should be omitted if the discontinuous range is open ended. |
open_ended_or_stock_out | (I) One of the following constants: EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed. |
append | (I) If set to true, the values in the array will be added to the date range, otherwise they will replace them |
Sets the end item against which a given effectivity is qualified. The release status is locked by this call; call AOM_save to commit the changes to the database.
Restrictions:
An effectivity containing unit ranges cannot have a NULLTAG end item.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being qualified with an end item |
end_item | (I) Tag of the end item |
TCCORE_API int WSOM_eff_set_end_item_rev | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
tag_t | end_item_rev | |||
) |
Sets the end item revision against which a given effectivity is qualified. The release status is locked by this call; call AOM_save to commit the changes to the database.
Restrictions:
Setting or clearing the end item revision also changes the end item to match. An effectivity containing unit ranges cannot have a NULLTAG end item.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being qualified with an end item |
end_item_rev | (I) Tag of the end item revision |
TCCORE_API int WSOM_eff_set_protection | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
logical | protection | |||
) |
Set the protection on a given effectivity. A protected effectivity is one that cannot be edited. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity being locked or unlocked |
protection | (I) True if the effectivity is to be protected to prevent editing, otherwise, false. |
TCCORE_API int WSOM_eff_set_range | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
const char * | range_text, | |||
logical | append | |||
) |
Replaces or appends the date or unit range with the values extracted from the range text. The release status is locked by this call; call AOM_save to commit the changes to the database.
Restrictions:
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity in which the date or unit range will be replaced |
range_text | (I) Correctly formatted text representation of unit or date range values |
append | (I) If set to true, the date or unit range within the effectivity will have the range_text values appended to it, otherwise they will be replaced. |
TCCORE_API int WSOM_eff_set_range_type | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
WSOM_range_type_t | range_type | |||
) |
Sets the range type.
release_status | (I) |
effectivity | (I) |
range_type | (I) |
TCCORE_API int WSOM_eff_set_unit_range | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
const char * | range_text, | |||
logical | append | |||
) |
Parses the range_text string and sets the effectivity range to the values extracted. If append is true, the range values are added to the existing unit range, otherwise the range is replaced with the values specified.
release_status | (I) |
effectivity | (I) |
range_text | (I) |
append | (I) |
TCCORE_API int WSOM_eff_set_units | ( | tag_t | release_status, | |
tag_t | effectivity, | |||
int | n_units, | |||
int * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
logical | append | |||
) |
Uses an array of integers to set the unit range for a given effectivity. The release status is locked by this call; call AOM_save to commit the changes to the database.
Restrictions:
release_status | (I) Tag of the release status to which the effectivity belongs |
effectivity | (I) Tag of the effectivity |
n_units | (I) The size of the array or start-end values |
start_end_values | (I) The array of start-end values of the discontinuous range. For example, consider a discontinuous range consisting of continuous ranges r1, r2, ..., rn where rx has start and end values, rx.start and rx.end. The array of start_end_vals for this discontinuous range will be constructed as { r1.start, r1.end, r2.start, r2.end, ..., rn.start, rn.end }. The last value, rn.end should be omitted if the discontinuous range is open ended. |
open_ended_or_stock_out | (I) One of the following constants: EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed. |
append | (I) If set to true, the values in the array will be added to the unit range, otherwise they will replace them. |
TCCORE_API int WSOM_effectivity_ask_date_range | ( | tag_t | effectivity, | |
char ** | range_text | |||
) |
effectivity | (I) |
range_text | (OF) |
TCCORE_API int WSOM_effectivity_ask_dates | ( | tag_t | effectivity, | |
int * | n_dates, | |||
date_t ** | start_end_values, | |||
WSOM_open_ended_status_t * | open_ended_or_stock_out | |||
) |
effectivity | (I) |
n_dates | (O) |
start_end_values | (OF) n_dates |
open_ended_or_stock_out | (O) |
effectivity | (I) |
end_item | (O) |
TCCORE_API int WSOM_effectivity_ask_range | ( | tag_t | effectivity, | |
char ** | range_text | |||
) |
effectivity | (I) |
range_text | (OF) |
TCCORE_API int WSOM_effectivity_ask_range_type | ( | tag_t | effectivity, | |
WSOM_range_type_t * | range_type | |||
) |
effectivity | (I) |
range_type | (O) |
TCCORE_API int WSOM_effectivity_ask_ranges | ( | tag_t | effectivity, | |
int * | n_units, | |||
int * | n_dates, | |||
int ** | units, | |||
date_t ** | dates, | |||
WSOM_open_ended_status_t * | unit_open_ended_status, | |||
WSOM_open_ended_status_t * | date_open_ended_status | |||
) |
effectivity | (I) |
n_units | (O) |
n_dates | (O) |
units | (OF) n_units |
dates | (OF) n_dates |
unit_open_ended_status | (O) |
date_open_ended_status | (O) |
TCCORE_API int WSOM_effectivity_ask_unit_range | ( | tag_t | effectivity, | |
char ** | range_text | |||
) |
effectivity | (I) |
range_text | (OF) |
TCCORE_API int WSOM_effectivity_ask_units | ( | tag_t | effectivity, | |
int * | n_units, | |||
int ** | start_end_values, | |||
WSOM_open_ended_status_t * | open_ended_or_stock_out | |||
) |
effectivity | (I) |
n_units | (O) |
start_end_values | (OF) n_units |
open_ended_or_stock_out | (O) |
TCCORE_API int WSOM_effectivity_create | ( | tag_t | release_status, | |
tag_t | end_item, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity qualified against an end item. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity will be attached |
end_item | (I) Tag of the end item against which the effecitivity is to be qualified |
effectivity | (O) Tag of the newly created effectivity |
Creates an empty effectivity. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity will be attached |
effectivity | (O) Tag of the newly created effectivity |
TCCORE_API int WSOM_effectivity_create_with_dates | ( | tag_t | release_status, | |
tag_t | end_item, | |||
int | n_dates, | |||
date_t * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity qualified against an end item. Also sets the effectivity range to the units in the array supplied. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity will be attached |
end_item | (I) Tag of the end item against which the effectivity is to be qualified |
n_dates | (I) Number of dates in the array |
start_end_values | (I) Array of date start, end values. Go to WSOM_eff_set_dates for additional information. |
open_ended_or_stock_out | (I) One of the constants either EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed |
effectivity | (O) Tag of the newly created effectivity |
TCCORE_API int WSOM_effectivity_create_with_effectivitygroup | ( | tag_t | effectivitygroup_rev, | |
tag_t | end_item, | |||
const char * | unit_text, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity with effectivity group.
effectivitygroup_rev | (I) |
end_item | (I) |
unit_text | (I) |
effectivity | (O) |
TCCORE_API int WSOM_effectivity_create_with_text | ( | tag_t | release_status, | |
tag_t | end_item, | |||
const char * | range_text, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity qualified against an end item. Also sets the effectivity range to the values in the string supplied. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity will be attached |
end_item | (I) Tag of the end item against which the effecitivity is to be qualified |
range_text | (I) Correctly formatted text of the effectivity range |
effectivity | (O) Tag of the newly created effectivity |
TCCORE_API int WSOM_effectivity_create_with_units | ( | tag_t | release_status, | |
tag_t | end_item, | |||
int | n_units, | |||
int * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
tag_t * | effectivity | |||
) |
Creates an effectivity qualified against an end item. Also sets the effectivity range to the units in the array supplied. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to which the effectivity will be attached |
end_item | (I) Tag of the end item against which the effectivity is to be qualified |
n_units | (I) Number of units in the array |
start_end_values | (I) Array of unit start, end values. Go to WSOM_eff_set_units for additional information. |
open_ended_or_stock_out | (I) One of the constants either EFFECTIVITY_open_ended, EFFECTIVITY_stock_out or EFFECTIVITY_closed |
effectivity | (O) Tag of the newly created effectivity |
effectivity | (I) |
is_protected | (O) |
TCCORE_API int WSOM_effectivity_set_dates | ( | tag_t | effectivity, | |
int | n_dates, | |||
date_t * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
logical | append | |||
) |
effectivity | (I) |
n_dates | (I) |
start_end_values | (I) |
open_ended_or_stock_out | (I) |
append | (I) |
effectivity | (I) |
end_item | (I) |
effectivity | (I) |
protection | (I) |
TCCORE_API int WSOM_effectivity_set_range | ( | tag_t | effectivity, | |
const char * | range_text, | |||
logical | append | |||
) |
effectivity | (I) |
range_text | (I) |
append | (I) |
TCCORE_API int WSOM_effectivity_set_range_type | ( | tag_t | effectivity, | |
WSOM_range_type_t | range_type | |||
) |
effectivity | (I) |
range_type | (I) |
TCCORE_API int WSOM_effectivity_set_units | ( | tag_t | effectivity, | |
int | n_units, | |||
int * | start_end_values, | |||
WSOM_open_ended_status_t | open_ended_or_stock_out, | |||
logical | append | |||
) |
effectivity | (I) |
n_units | (I) |
start_end_values | (I) |
open_ended_or_stock_out | (I) |
append | (I) |
TCCORE_API int WSOM_exit_module | ( | ) |
TCCORE_API int WSOM_extent | ( | int * | n_instances, | |
tag_t ** | instances | |||
) |
Lists all instances of WorkspaceObject (well actually subclasses thereof, WorkspaceObject is an abstract class) in the database.
n_instances | (O) |
instances | (OF) n_instances |
TCCORE_API int WSOM_find | ( | const char | name[WSO_name_size_c+1], | |
int * | hits, | |||
tag_t ** | list | |||
) |
Use MEM_free to free up the memory used by the tag list.
name | (I) |
hits | (O) |
list | (OF) hits |
TCCORE_API int WSOM_find2 | ( | const char * | name, | |
int * | hits, | |||
tag_t ** | list | |||
) |
Returns an array of tags of WorkspaceObjects, regardless of subclass, that have a particular name. ITK_ok returns if no error occurs during the query. This does not mean that hits will be greater than 0. That must be a separate check.
Use MEM_free to free up the memory used by the tag list.
name | (I) |
hits | (O) |
list | (OF) hits |
TCCORE_API int WSOM_free_info | ( | tag_t | a_WS0_tag, | |
WSO_descriptor_t * | info | |||
) |
This function frees up all of the memory allocated by WSOM_get_info.
a_WS0_tag | (I) |
info | (I) |
TCCORE_API int WSOM_get_info | ( | tag_t | a_WS0_tag, | |
WSO_descriptor_t * | info | |||
) |
This function fills out the specified structure with the appropriate pieces of data. Do not use MEM_free to free the memory allocated to info. Use WSOM_free_info.
{ tag_t WSO_tag; WSO_descriptor_t info; int stat; stat = WSOM_get_info(WSO_tag, &info); stat = WSOM_free_info (WSO_tag, info); }
a_WS0_tag | (I) |
info | (O) |
aWSOsTag | (I) |
hasGovClassification | (O) |
aWSOsTag | (I) |
hasIPClassification | (O) |
TCCORE_API int WSOM_init_module | ( | ) |
TCCORE_API int WSOM_initialize | ( | tag_t | a_WSO_tag, | |
const char | a_name[WSO_name_size_c+1], | |||
const char | a_description[WSO_desc_size_c+1] | |||
) |
a_WSO_tag | (I) |
a_name | (I) |
a_description | (I) |
TCCORE_API int WSOM_initialize2 | ( | tag_t | a_WSO_tag, | |
const char * | a_name, | |||
const char * | a_description | |||
) |
This function is used to initialize the WorkspaceObject attributes of an object. It would normally be called for an object that is an instance of a subclass of WorkspaceObject.
a_WSO_tag | (I) |
a_name | (I) |
a_description | (I) |
Lists the tags of all the WorkspaceObjects derived from the specified input Workspace Object (i.e., all those objects that have the input Workspace Object as their based-on object).
Based-on information is only stored for subclasses of Dataset, Item, and Item Revision.
When either the original or the derived object is deleted, the based-on information that links them is lost.
Based-on information is not stored for objects created in Teamcenter versions prior to 3.4.
wso | (I) Tag of the workspace object |
n_derived | (O) Number of objects derived from the input object |
derived_wsos | (OF) n_derived Array of the tags of the objects derived from the input object |
TCCORE_API int WSOM_search | ( | WSO_search_criteria_t | criteria, | |
int * | hits, | |||
tag_t ** | list | |||
) |
Returns an array of POMObject or subclasses of POMObject tags that match the previously specified search criteria. Use MEM_free to free the space used by the tag list.
This function allocates memory sufficient to return a list of all matching POMObject object tags. The client is expected to free the memory using MEM_free.
Fill out the WSO_search_criteria_t structure as necessary. Use NULLTAG to ignore owners as necessary and minimum/maximum dates for the *Before and *After date specifiers. Therefore, you will set before dates to maximumDate and the after dates to minimumDate so that all dates are valid or simply NULLDATE so dates are not used as a search criteria.
The following list describes the effect of setting various values in the structure WSO_search_criteria_t.
class_name | If set, must be set to the name of an object type as displayed in the workspace. |
name | Can contain wild card characters. The percent sign and underscore are the only valid wild card characters, where:
% Represents any set of characters in the substring. |
owner | If set, means only select objects belonging to the owner you specify. |
group | If set, means only select objects belonging to the group you specify. |
dates | You must select objects created/modified/released_before first, then specify dates after. |
scope | WSO_search_HOR searches the entire database. WSO_search_Vault searches for objects that have at least one status of approval. |
{ int error_code; int number_found; tag_t* list_of_WSO_tags; WSOM_search_criteria_t criteria; WSOM_clear_search_criteria(criteria); strcpy(criteria.name,"My Friend's Current Design"); error_code = WSOM_search(criteria, &number_found,&list_of_WSO_tags); MEM_free(list_of_WSO_tags); }
Restrictions:
Do not forget to free the returned list as illustrated.
See AE_find_dataset, AE_find_tool, and WSOM_clear_search_criteria
criteria | (I) |
hits | (O) |
list | (OF) hits |
TCCORE_API int WSOM_set_description | ( | tag_t | a_WSO_tag, | |
const char | new_description[WSO_desc_size_c+1] | |||
) |
a_WSO_tag | (I) |
new_description | (I) |
TCCORE_API int WSOM_set_description2 | ( | tag_t | a_WSO_tag, | |
const char * | new_description | |||
) |
Sets the description for a WorkspaceObject.
a_WSO_tag | (I) |
new_description | (I) |
TCCORE_API int WSOM_set_gov_classification | ( | tag_t | aWSOsTag, | |
const char | classification[WSO_gov_class_size_c+1] | |||
) |
aWSOsTag | (I) |
classification | (I) |
TCCORE_API int WSOM_set_gov_classification2 | ( | tag_t | aWSOsTag, | |
const char * | classification | |||
) |
aWSOsTag | (I) |
classification | (I) |
TCCORE_API int WSOM_set_info | ( | tag_t | a_WS0_tag, | |
WSO_descriptor_t * | info | |||
) |
Uses a WSO_descriptor_t as input to actually change the values of the associated attributes of the workspace object.
a_WS0_tag | (I) |
info | (I) |
TCCORE_API int WSOM_set_ip_classification | ( | tag_t | aWSOsTag, | |
const char | newClassn[WSO_ip_class_size_c+1] | |||
) |
aWSOsTag | (I) |
newClassn | (I) |
TCCORE_API int WSOM_set_ip_classification2 | ( | tag_t | aWSOsTag, | |
const char * | newClassn | |||
) |
aWSOsTag | (I) |
newClassn | (I) |
TCCORE_API int WSOM_set_name | ( | tag_t | a_WSO_tag, | |
const char | new_name[WSO_name_size_c+1] | |||
) |
a_WSO_tag | (I) |
new_name | (I) |
TCCORE_API int WSOM_set_name2 | ( | tag_t | a_WSO_tag, | |
const char * | new_name | |||
) |
This function assigns a new name to a WorkspaceObject.
a_WSO_tag | (I) |
new_name | (I) |
TCCORE_API int WSOM_set_object_type | ( | tag_t | wso_tag, | |
const char | object_type[WSO_name_size_c+1] | |||
) |
The object_type field cannot be switched to a new Business Object that has different storage class from the original Business Object.
Since certain Teamcenter algorithms depend upon the object type of an object being correct, a restriction has been added to the system that requires a TcType to exist for all objects for which you attempt to set the object type. Thus, if you create a new class in the system, and try to set its type, you must create a new TcType to correspond to the class before attempting to call WSOM_set_object_type on that object.
wso_tag | (I) |
object_type | (I) |
TCCORE_API int WSOM_set_object_type2 | ( | tag_t | wso_tag, | |
const char * | object_type | |||
) |
Sets the object type for a specified Workspaceobject. You can use this for setting the type of a Folder that you use for some special purpose so that you can differentiate it from other Folders in the workspace or so you can key on it in some ITK program algorithm.
The object_type field cannot be switched to a new Business Object that has different storage class from the original Business Object.
Since certain Teamcenter algorithms depend upon the object type of an object being correct, a restriction has been added to the system that requires a TcType to exist for all objects for which you attempt to set the object type. Thus, if you create a new class in the system, and try to set its type, you must create a new TcType to correspond to the class before attempting to call WSOM_set_object_type on that object.
wso_tag | (I) |
object_type | (I) |
TCCORE_API int WSOM_set_revision | ( | tag_t | a_WSO_tag, | |
int | rev_number | |||
) |
Revision numbers are normally controlled automatically by Teamcenter. If this routine is used improperly, you may end up with an inconsistent or confusing set of revision numbers. WSOM_set_revision sets the revision number for a workspace object. Revision number should be greater than 0.
a_WSO_tag | (I) |
rev_number | (I) |
TCCORE_API int WSOM_set_revision_limit | ( | tag_t | a_WSO_tag, | |
int | rev_limit | |||
) |
Allows you to alter the version limit of a dataset. Normally, version limit is only applicable to datasets. However, this attribute can be made editable for other workspace objects via Properties ITK.
a_WSO_tag | (I) |
rev_limit | (I) |
Gets the release date of a given release status.
release_status | (I) Release status tag |
release_date | (O) Release date |
TCCORE_API int WSOM_status_ask_effectivities | ( | tag_t | release_status, | |
int * | n_effectivities, | |||
tag_t ** | effectivities | |||
) |
Gives all the effectivities attached to a given release status.
In 'V7 effectivity mode' a status can have multiple effectivities, each one qualified by a different end item.
release_status | (I) Tag of the release status being queried |
n_effectivities | (O) Number of effectivities attached to the release status |
effectivities | (OF) n_effectivities Tags of all the effectivities attached to the release status |
TCCORE_API int WSOM_status_clear_effectivities | ( | tag_t | release_status | ) |
Removes all effectivities from the release status. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status to be cleared of effectivities |
Removes an effectivity from a release status. The release status is locked by this call; call AOM_save to commit the changes to the database.
release_status | (I) Tag of the release status |
effectivity | (I) Tag of the effectivity to be removed |
TCCORE_API int WSOM_where_referenced | ( | tag_t | wso, | |
int | n_levels, | |||
int * | n_referencers, | |||
int ** | levels, | |||
tag_t ** | referencers, | |||
char *** | relations | |||
) |
Finds all WorkspaceObjects that reference the specified WorkspaceObject. If the specified number of levels > 1, then all WorkspaceObjects that reference the referencers are found, and so on, building up a reference tree of the specified number of levels.
The user is responsible to free each string returned in the array individually before freeing up the the array itself. Use MEM_free to free up the memory.
The figure below shows a reference tree structure to illustrate the result of a where-referenced search on My_Dataset (using a depth of WSO_where_ref_any_depth).
Calling a where-referenced function on My_Dataset in the above example will return the following arrays:
index | level | referencer | relation |
0 | 1 | 4545 | "Reference" |
1 | 2 | 3476/A-view | "Occurrence" |
2 | 3 | 3476/A | "" |
3 | 4 | 3476 | "" |
4 | 5 | My_Folder | "" |
5 | 5 | 2355/B-view | "Occurrence" |
6 | 6 | 2355/B | "" |
7 | 7 | 2355 | "" |
8 | 8 | My_Folder | "" |
9 | 2 | Newstuff | "" |
wso | (I) Tag of the WorkspaceObject whose referencers are sought |
n_levels | (I) Depth of search. WSO_where_ref_any_depth means report all referencers up to WorkspaceObjects that are not referenced at all. |
n_referencers | (O) The total number of referencers found |
levels | (OF) n_referencers Array containing the level of each referencer found, starting from 1 for a direct reference to the specified WorkspaceObject |
referencers | (OF) n_referencers Array of tags of the referencers found |
relations | (OF) n_referencers Array of strings describing the relations between the referencers and the referenced |