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.
170 lines
10 KiB
170 lines
10 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, Val1CfgAgentRevisionDelegate
|
|
Filename: Val1CfgAgentRevisionDelegate.hxx
|
|
Module: Val1cfgvalidation
|
|
@BMIDE autogenerated
|
|
==================================================================================================*/
|
|
|
|
#ifndef VAL1CFGVALIDATION__VAL1CFGAGENTREVISIONDELEGATE_HXX
|
|
#define VAL1CFGVALIDATION__VAL1CFGAGENTREVISIONDELEGATE_HXX
|
|
|
|
#include <common/tc_deprecation_macros.h>
|
|
#include <Val1cfgvalidation/Val1CfgAgentRevision.hxx>
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_exports.h>
|
|
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgAgentRevisionDelegate;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgAgentRevisionImpl;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgAgentRevision;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgAgentRevisionGenImpl;
|
|
}
|
|
|
|
namespace val1cfgvalidation_alias = ::val1cfgvalidation;
|
|
|
|
|
|
class VAL1CFGVALIDATION_API val1cfgvalidation_alias::Val1CfgAgentRevisionDelegate
|
|
{
|
|
public:
|
|
// Method to initialize this Class
|
|
static int initializeClass();
|
|
|
|
// Method to get the Val1CfgAgentRevisionDelegate instance
|
|
static Val1CfgAgentRevisionDelegate& getInstance();
|
|
|
|
// Method to create the Val1CfgAgentRevisionImpl pointer
|
|
static Val1CfgAgentRevisionImpl* createImpl( Val1CfgAgentRevision& ifObj );
|
|
|
|
// Method to delete the Val1CfgAgentRevisionImpl pointer
|
|
static void deleteImpl( Val1CfgAgentRevisionImpl* 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 - 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 Val1CfgAgentRevision &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 objects from the given selected objects for validation checkers to perform validation business logic. These objects collected by the closure rule will be the owning objects of its associated validation results. Valdiation checkers will perform validation functions for these 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 Val1CfgAgentRevision &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 its validation target objects vector.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1GetTargetObjectsFromOwningObjsBase(const Val1CfgAgentRevision &ifObj, const std::vector< tag_t > &owningObjsForValidationVec, const std::string &targetClosureRule, std::map< tag_t,std::vector< tag_t > > &owningObjectToTargetObjectsVec );
|
|
|
|
|
|
///
|
|
/// This operation will return the associated validation results after performing the required validation function of the specified checkers on the selected business objects. The associated validation result data that require further processing will be returned in the form of result properties structure vector for validation result objects that will be created and/or updated. This operation will be called by performValidationAndProcessResults operation.
|
|
/// @version Teamcenter 12.1
|
|
/// @param val1ValDataRevVec - The checker revision vector.
|
|
/// @param owningObjectToTargetObjectsVec - The map for owning object to the validation target objects vector.
|
|
/// @param resultData - A vector of structure for result properties name/value pairs.
|
|
/// @return - Status. 0 if successful
|
|
///
|
|
int val1PerformValidationBase(const Val1CfgAgentRevision &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 Val1CfgAgentRevision &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 Val1CfgAgentRevision &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 Val1CfgAgentRevision &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 Val1CfgAgentRevision &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 Val1CfgAgentRevisionDelegate* m_pInstance;
|
|
|
|
Val1CfgAgentRevisionDelegate();
|
|
virtual ~Val1CfgAgentRevisionDelegate();
|
|
static void setInstance( Val1CfgAgentRevisionDelegate* instance );
|
|
|
|
|
|
private:
|
|
friend class ::val1cfgvalidation::Val1CfgAgentRevisionGenImpl;
|
|
|
|
};
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_undef.h>
|
|
#endif // VAL1CFGVALIDATION__VAL1CFGAGENTREVISIONDELEGATE_HXX
|