You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
12 KiB
188 lines
12 KiB
//Copyright 2020 Siemens Digital Industries Software
|
|
//==================================================
|
|
//Copyright $2020.
|
|
//Siemens Product Lifecycle Management Software Inc.
|
|
//All Rights Reserved.
|
|
//==================================================
|
|
//Copyright 2020 Siemens Digital Industries Software
|
|
|
|
/*==================================================================================================
|
|
File description:
|
|
This file contains the declaration for the Business Object, Val1CfgToolAgentRevisionDelegate
|
|
Filename: Val1CfgToolAgentRevisionDelegate.hxx
|
|
Module: Val1cfgvalidation
|
|
@BMIDE autogenerated
|
|
==================================================================================================*/
|
|
|
|
#ifndef VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISIONDELEGATE_HXX
|
|
#define VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISIONDELEGATE_HXX
|
|
|
|
#include <common/tc_deprecation_macros.h>
|
|
#include <Val1cfgvalidation/Val1CfgToolAgentRevision.hxx>
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_exports.h>
|
|
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionDelegate;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionImpl;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevision;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionGenImpl;
|
|
}
|
|
|
|
namespace val1cfgvalidation_alias = ::val1cfgvalidation;
|
|
|
|
|
|
class VAL1CFGVALIDATION_API val1cfgvalidation_alias::Val1CfgToolAgentRevisionDelegate
|
|
{
|
|
public:
|
|
// Method to initialize this Class
|
|
static int initializeClass();
|
|
|
|
// Method to get the Val1CfgToolAgentRevisionDelegate instance
|
|
static Val1CfgToolAgentRevisionDelegate& getInstance();
|
|
|
|
// Method to create the Val1CfgToolAgentRevisionImpl pointer
|
|
static Val1CfgToolAgentRevisionImpl* createImpl( Val1CfgToolAgentRevision& ifObj );
|
|
|
|
// Method to delete the Val1CfgToolAgentRevisionImpl pointer
|
|
static void deleteImpl( Val1CfgToolAgentRevisionImpl* impl );
|
|
|
|
|
|
///
|
|
/// This operation will create new validation results and/or update existing validation results. The getValidationResults operation will be invoked to find all existing validation results for the given checkers and selected business objects. The given resultData will be used to determine whether the Teamcenter::CreateInput structure represents a new validation result or an existing validaiton result. This operation will be called by the OOTB performValidationAndProcessResults operation.
|
|
/// @version Teamcenter 12.1
|
|
/// @param resultData - The vector of structure represents a new validation result or an existing validaiton result.
|
|
/// @param newResults - newResults" description="A list of newly created validation result objects.
|
|
/// @param changedResults - A list of changed validation result objects.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1CreateOrUpdateResultsBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< ::Teamcenter::CreateInput* > &resultData, std::vector< tag_t > &newResults, std::vector< tag_t > &changedResults );
|
|
|
|
|
|
///
|
|
/// This operation will use the configured closure rule to find the target owning objects of results from the given selected objects for validation checkers to perform validation business logic. These objects will be the owning objects of its associated validation results. Valdiation checkers will perform validation functions for these target ItemRevision objects.This operation will be called by runValidation operation before the validation tasks will be handed to each specified checkers.
|
|
/// @version Teamcenter 12.1
|
|
/// @param selectedObjectsVec - The vector of selected objects.
|
|
/// @param owningObjsClosureRule - The name of a closure rule that will be used to get owning objects of results from a list of selected objects.
|
|
/// @param owningObjsForValidationVec - The vector of objects for validation.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1GetOwningObjsForValidationFromSelectedObjBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &selectedObjectsVec, const std::string &owningObjsClosureRule, std::vector< tag_t > &owningObjsForValidationVec );
|
|
|
|
|
|
///
|
|
/// This operation will use the configured closure rule to find the target objects from each object for validation checkers to perform validation business logic.
|
|
/// @version Teamcenter 12.1
|
|
/// @param owningObjsForValidationVec - The vector of objects for validation.
|
|
/// @param targetClosureRule - The name of a closure rule that will be used to get validation target objects from a list of owning objects.
|
|
/// @param owningObjectToTargetObjectsVec - The map for owning object to the target objects vector.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1GetTargetObjectsFromOwningObjsBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &owningObjsForValidationVec, const std::string &targetClosureRule, std::map< tag_t,std::vector< tag_t > > &owningObjectToTargetObjectsVec );
|
|
|
|
|
|
///
|
|
/// This operation will retrieve the designated Tool object in the database that contains the detailed information on the validation utility for this agent. The data for the associated validation results will need to be available for retrieval after the validation process(es) ends.
|
|
/// @version Teamcenter 12.1
|
|
/// @param toolTag - The tag for validation tool.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1GetToolForValidationBase(const Val1CfgToolAgentRevision &ifObj, tag_t &toolTag );
|
|
|
|
|
|
///
|
|
/// This OOTB operation will retrieve the Tool object and the required OS command string to spawn the validation utility to generate the data required for creating and/or updating the associated validation results for the specified checkers and selected business objects. The OS command strings that will be used to create validation process(es) from Teamcenter to perform the required validation functionalities specified by the checkers and selected objects.
|
|
/// @version Teamcenter 12.1
|
|
/// @param utilCommandsToRun - The util commands for validation.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1GetUtilAndArgsForValidationBase(const Val1CfgToolAgentRevision &ifObj, std::string &utilCommandsToRun );
|
|
|
|
|
|
///
|
|
/// This operation returns the associated validation results after performing the required validation function of the specified checkers on the selected business objects. The specialized behavior will take into consideration of the specified Tool for this agent revision in order to perform validation functionalities using the external Tool. The Tool object will provide information about the utility that will be used when validation functionalities are performed.
|
|
/// @version Teamcenter 12.1
|
|
/// @param val1ValDataRevVec - The vector of checker revision.
|
|
/// @param owningObjectToTargetObjectsVec - The map for owning object to the validation target objects vector.
|
|
/// @param resultData - The vector of create input for validation result.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1PerformValidationBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &val1ValDataRevVec, const std::map< tag_t,std::vector< tag_t > > &owningObjectToTargetObjectsVec, std::vector< ::Teamcenter::CreateInput* > &resultData );
|
|
|
|
|
|
///
|
|
/// This operation will perform the validation tasks. Each validation agent revision must implement this method to process the validation tasks.
|
|
/// @version Teamcenter 12.1
|
|
/// @param valDataRevisionObjects - A list of ValDataRevision objects that will be used to validate against the validation targets.
|
|
/// @param selectedObjects - A list of selected objects that this validation agent will use to find the actual validation targets for this validation run.
|
|
/// @param owningObjsClosureRule - The name of a closure rule that will be used to get owning objects of results from a list of selected objects.
|
|
/// @param targetClosureRule - The name of a closure rule that will be used to get validation target objects from a list of owning objects.
|
|
/// @param newResults - A list of newly created validation result objects.
|
|
/// @param changedResults - A list of changed validation result objects.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1RunValidationBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &valDataRevisionObjects, const std::vector< tag_t > &selectedObjects, const std::string &owningObjsClosureRule, const std::string &targetClosureRule, std::vector< tag_t > &newResults, std::vector< tag_t > &changedResults );
|
|
|
|
|
|
///
|
|
/// This ioperation will retun a vector of ValidationResult object tags via an ouput paramter.
|
|
/// @version Teamcenter 8.2
|
|
/// @param valDataRevisions - A vector of ValDataRevision objects that will be used to limit the scope of the ValidationResult objects.
|
|
/// @param selectedObjects - A vector of selected objects that the system will use to find the actual target objects. The resulting target objects will be used to find the associated ValidationResult objects.
|
|
/// @param targetObjects - A vector objects that will be used to find the associated ValidationResult objects.
|
|
/// @param validationResultObjects - A vector of ValidationResult tags that are found from the given inut criteria.
|
|
/// @return - The status code. ITK_ok indicates that this operation is successfully executed.
|
|
///
|
|
int getValidationResultsBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &valDataRevisions, const std::vector< tag_t > &selectedObjects, const std::vector< tag_t > &targetObjects, std::vector< tag_t > &validationResultObjects );
|
|
|
|
|
|
///
|
|
/// This operation will return a vector of validation target object tags via an output parameter.
|
|
/// @version Teamcenter 8.2
|
|
/// @param valDataRevisions - A vector of ValDataRevision objects that will be used to limit the scope of the targets.
|
|
/// @param selectedObjects - A vector of selected objects that the system will use to find the actual target objects.
|
|
/// @param targetObjects - A vector of target object tags that are found from the given input criteria.
|
|
/// @return - The return status code. ITK_ok means thatthe operation is successfully executed.
|
|
///
|
|
int getValidationTargetsBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &valDataRevisions, const std::vector< tag_t > &selectedObjects, std::vector< tag_t > &targetObjects );
|
|
|
|
|
|
///
|
|
/// This operation will perform the validation tasks. Each validation agent revision must implement this method to process the validation tasks.
|
|
/// @version Teamcenter 8.2
|
|
/// @param valDataRevisionObjects - A vector of ValDataRevision objects that will be used to validate against the validation targets
|
|
/// @param selectedObjects - A vector of selected objects that this validation agent will use to find the actual validation targets for this validation run.
|
|
/// @param targetObjects - A vector of validation targets for this validation run.
|
|
/// @return - The status code returned from the run. TIK_ok indicates that the validation run is executed successfully.
|
|
///
|
|
int runValidationBase(const Val1CfgToolAgentRevision &ifObj, const std::vector< tag_t > &valDataRevisionObjects, const std::vector< tag_t > &selectedObjects, const std::vector< tag_t > &targetObjects );
|
|
|
|
|
|
|
|
protected:
|
|
// Pointer to the instance
|
|
static Val1CfgToolAgentRevisionDelegate* m_pInstance;
|
|
|
|
Val1CfgToolAgentRevisionDelegate();
|
|
virtual ~Val1CfgToolAgentRevisionDelegate();
|
|
static void setInstance( Val1CfgToolAgentRevisionDelegate* instance );
|
|
|
|
|
|
private:
|
|
friend class ::val1cfgvalidation::Val1CfgToolAgentRevisionGenImpl;
|
|
|
|
};
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_undef.h>
|
|
#endif // VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISIONDELEGATE_HXX
|