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.
183 lines
9.6 KiB
183 lines
9.6 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, Val1CfgToolAgentRevision
|
|
Filename: Val1CfgToolAgentRevision.hxx
|
|
Module: Val1cfgvalidation
|
|
@BMIDE autogenerated
|
|
==================================================================================================*/
|
|
|
|
#ifndef VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISION__HXX
|
|
#define VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISION__HXX
|
|
|
|
#include <vector>
|
|
#include <metaframework/CreateInput.hxx>
|
|
#include <unidefs.h>
|
|
#include <string>
|
|
#include <map>
|
|
#include <common/tc_deprecation_macros.h>
|
|
#include <validation/ValToolAgentRevision.hxx>
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_exports.h>
|
|
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevision;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionImpl;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionDelegate;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionDispatch;
|
|
}
|
|
namespace val1cfgvalidation
|
|
{
|
|
class Val1CfgToolAgentRevisionGenImpl;
|
|
}
|
|
namespace Teamcenter
|
|
{
|
|
class RootObjectImpl;
|
|
}
|
|
|
|
class VAL1CFGVALIDATION_API val1cfgvalidation::Val1CfgToolAgentRevision
|
|
: public ::Teamcenter::ValToolAgentRevision
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Get the Interface Name
|
|
* @return - return desc for getInterfaceName
|
|
*/
|
|
static const std::string& getInterfaceName();
|
|
|
|
|
|
///
|
|
/// 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 val1CreateOrUpdateResults( 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 val1GetOwningObjsForValidationFromSelectedObj( 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 val1GetTargetObjectsFromOwningObjs( 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 val1GetToolForValidation( 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 val1GetUtilAndArgsForValidation( 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 val1PerformValidation( 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 val1RunValidation( 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 );
|
|
protected:
|
|
// Method to initialize
|
|
virtual void initialize( ::Teamcenter::RootObjectImpl* impl );
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
Val1CfgToolAgentRevision();
|
|
|
|
/**
|
|
* Destructor
|
|
*/
|
|
virtual ~Val1CfgToolAgentRevision();
|
|
|
|
private:
|
|
// Getter method for the Implementation Object
|
|
Val1CfgToolAgentRevisionImpl* getVal1CfgToolAgentRevisionImpl() const;
|
|
// Setter method for the Implementation Object
|
|
::Teamcenter::RootObjectImpl* setVal1CfgToolAgentRevisionImpl( ::Teamcenter::RootObjectImpl* impl );
|
|
|
|
// Method to set the delete impl boolean
|
|
void setDeleteImpl( bool del );
|
|
|
|
// Pointer to the Implementation object
|
|
Val1CfgToolAgentRevisionImpl* m_val1cfgtoolagentrevisionImpl;
|
|
|
|
// Flag to indicate if Implementation object needs to be deleted
|
|
bool m_deleteImpl;
|
|
|
|
/**
|
|
* Name of the Business Object
|
|
*/
|
|
static std::string name;
|
|
|
|
/**
|
|
* Private default constructor. We do not want this class instantiated without the business object passed in.
|
|
* @param Val1CfgToolAgentRevision - desc for Val1CfgToolAgentRevision parameter
|
|
*/
|
|
Val1CfgToolAgentRevision( const Val1CfgToolAgentRevision& );
|
|
Val1CfgToolAgentRevision& operator=( const Val1CfgToolAgentRevision& );
|
|
|
|
friend class Val1CfgToolAgentRevisionDelegate;
|
|
friend class Val1CfgToolAgentRevisionDispatch;
|
|
friend class Val1CfgToolAgentRevisionGenImpl;
|
|
};
|
|
|
|
#include <Val1cfgvalidation/libval1cfgvalidation_undef.h>
|
|
#endif // VAL1CFGVALIDATION__VAL1CFGTOOLAGENTREVISION__HXX
|