Changeset 374 for branches


Ignore:
Timestamp:
02/03/14 17:29:10 (6 years ago)
Author:
jls17
Message:
Location:
branches/work_304/doc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/work_304/doc/DocActionSetFieldsHelper.cpp

    r373 r374  
    2121#include "../core/ARAssignHelper.h" 
    2222 
    23 CDocActionSetFieldsHelper::CDocActionSetFieldsHelper(CARInside &arInside, CARServerObject &arServerObject, const ARSetFieldsActionStruct& sFieldStruct, int structItemType, IfElseState ifElseMode, int numAction, int rootLevel) 
    24 : arIn(arInside), obj(arServerObject), setFieldsStruct(sFieldStruct), ifElse(ifElseMode), rootLevel(rootLevel) 
     23CDocActionSetFieldsHelper::CDocActionSetFieldsHelper(CARInside &arInside, CARServerObject &arServerObject, const string& objAttachedToSchemaName, const ARSetFieldsActionStruct& sFieldStruct, int structItemType, IfElseState ifElseMode, int numAction, int rootLevel) 
     24: arIn(arInside), obj(arServerObject), attachedSchemaName(objAttachedToSchemaName), setFieldsStruct(sFieldStruct), ifElse(ifElseMode), rootLevel(rootLevel) 
    2525{ 
    2626        arStructItemType = structItemType; 
     
    3838} 
    3939 
    40 void CDocActionSetFieldsHelper::SetFieldsGetSecondaryForm(const string& fromSchema, stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual) 
     40void CDocActionSetFieldsHelper::SetFieldsGetSecondaryForm(stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual) 
    4141{ 
    4242        bool useDefaultFieldMappingTable = true; 
    4343 
    44         CARSchema wfSchema(fromSchema); 
     44        CARSchema wfSchema(attachedSchemaName); 
    4545        if (wfSchema.Exists()) 
    4646        { 
     
    5757                case SFT_SAMPLEDATA: 
    5858                        { 
    59                                 int pFormId = arIn.SchemaGetInsideId(fromSchema); 
     59                                int pFormId = arIn.SchemaGetInsideId(attachedSchemaName); 
    6060                                int sFormId = -1; 
    6161                                string readServer = sfh.GetServerName(); 
     
    6464                                if (readSchema.compare("@") == 0) 
    6565                                { 
    66                                         readSchema = fromSchema; 
     66                                        readSchema = attachedSchemaName; 
    6767                                } 
    6868 
     
    7070                                { 
    7171                                        int fieldId = sfh.GetServerFieldId(); 
    72                                         strmServer << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn.LinkToField(fromSchema, fieldId, rootLevel)) << "$ (Sample Server: " << arIn.LinkToServerInfo(readServer, rootLevel) << ")"; 
     72                                        strmServer << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn.LinkToField(attachedSchemaName, fieldId, rootLevel)) << "$ (Sample Server: " << arIn.LinkToServerInfo(readServer, rootLevel) << ")"; 
    7373 
    7474                                        CRefItem refItemServer(obj, ifElse, nAction, REFM_SETFIELDS_SERVER); 
     
    7676 
    7777                                        fieldId = sfh.GetSchemaFieldId(); 
    78                                         strmSchemaDisplay << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn.LinkToField(fromSchema, fieldId, rootLevel)) << "$ (Sample Form: " << arIn.LinkToSchema(readSchema, rootLevel) << ")"; 
     78                                        strmSchemaDisplay << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn.LinkToField(attachedSchemaName, fieldId, rootLevel)) << "$ (Sample Form: " << arIn.LinkToSchema(readSchema, rootLevel) << ")"; 
    7979                                        strmSchema << readSchema; 
    8080 
     
    126126                                { 
    127127                                        CRefItem refItem(obj, ifElse, nAction, REFM_SETFIELDS_SQL_QUALIFICATION); 
    128                                         strmQual << arIn.TextFindFields(sfh.GetSqlCommand(), "$", arIn.SchemaGetInsideId(fromSchema), rootLevel, true, &refItem) << "<br/><br/>" << endl; 
     128                                        strmQual << arIn.TextFindFields(sfh.GetSqlCommand(), "$", arIn.SchemaGetInsideId(attachedSchemaName), rootLevel, true, &refItem) << "<br/><br/>" << endl; 
    129129                                } 
    130130                                else 
     
    143143                                { 
    144144                                        CRefItem refItem(obj, ifElse, nAction, REFM_SETFIELDS_FILTERAPI_PLUGINNAME); 
    145                                         schemaName = arIn.TextFindFields(sfh.GetSchemaName(), "$", arIn.SchemaGetInsideId(fromSchema), rootLevel, true, &refItem); 
     145                                        schemaName = arIn.TextFindFields(sfh.GetSchemaName(), "$", arIn.SchemaGetInsideId(attachedSchemaName), rootLevel, true, &refItem); 
    146146                                } 
    147147 
     
    151151 
    152152                                strmSchemaDisplay << "Input-Mapping: " << "<br/>"; 
    153                                 CARAssignHelper docInput(arIn, rootLevel, obj, fromSchema, fromSchema); 
     153                                CARAssignHelper docInput(arIn, rootLevel, obj, attachedSchemaName, attachedSchemaName); 
    154154                                strmSchemaDisplay << docInput.FilterApiInputAssignment(sfh.GetFilterAPIInputs(), sfh.GetFilterAPINumItems(), nAction, ifElse); 
    155155 
    156156                                strmSchemaDisplay << "Output-Mapping: " << "<br/>"; 
    157                                 CARAssignHelper assignHelper(arIn, rootLevel, obj, fromSchema, fromSchema); 
     157                                CARAssignHelper assignHelper(arIn, rootLevel, obj, attachedSchemaName, attachedSchemaName); 
    158158                                strmSchemaDisplay << assignHelper.SetFieldsAssignment(setFieldsStruct, nAction, ifElse); 
    159159                         
     
    263263        if (useDefaultFieldMappingTable) 
    264264        { 
    265                 GenerateDefaultMappingTable(fromSchema, strmSchema, strmSchemaDisplay, strmServer, strmQual); 
    266         } 
    267 } 
    268  
    269 void CDocActionSetFieldsHelper::GenerateDefaultMappingTable(const string& fromSchema, stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual) 
     265                GenerateDefaultMappingTable(strmSchema, strmSchemaDisplay, strmServer, strmQual); 
     266        } 
     267} 
     268 
     269void CDocActionSetFieldsHelper::GenerateDefaultMappingTable(stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual) 
    270270{ 
    271271        //For the following internal calculations we need a secondary form 
     
    290290        { 
    291291                strmSchemaDisplay << " All Matching Ids<br/>"; 
    292                 CDocAllMatchingIdsTable allMatchingFieldsTable(fromSchema, readFromSchemaName, obj, CDocAllMatchingIdsTable::AMM_SETFIELDS, nAction, ifElse, rootLevel); 
     292                CDocAllMatchingIdsTable allMatchingFieldsTable(attachedSchemaName, readFromSchemaName, obj, CDocAllMatchingIdsTable::AMM_SETFIELDS, nAction, ifElse, rootLevel); 
    293293                allMatchingFieldsTable.ToStream(strmSchemaDisplay); 
    294294        } 
     
    296296        { 
    297297                strmSchemaDisplay << "<br/>" << endl; 
    298                 CARAssignHelper assignHelper(arIn, rootLevel, obj, fromSchema, readFromSchemaName); 
     298                CARAssignHelper assignHelper(arIn, rootLevel, obj, attachedSchemaName, readFromSchemaName); 
    299299                strmSchemaDisplay << assignHelper.SetFieldsAssignment(setFieldsStruct, nAction, ifElse); 
    300300        } 
  • branches/work_304/doc/DocActionSetFieldsHelper.h

    r373 r374  
    2323{ 
    2424public: 
    25         CDocActionSetFieldsHelper(CARInside &arInside, CARServerObject &arServerObject, const ARSetFieldsActionStruct& sFieldStruct, int structItemType, IfElseState ifElse, int numAction, int rootLevel); 
     25        CDocActionSetFieldsHelper(CARInside &arInside, CARServerObject &arServerObject, const string& objAttachedToSchemaName, const ARSetFieldsActionStruct& sFieldStruct, int structItemType, IfElseState ifElse, int numAction, int rootLevel); 
    2626        ~CDocActionSetFieldsHelper(void); 
    2727 
    28         void SetFieldsGetSecondaryForm(const string& fromSchema, stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual); 
     28        void SetFieldsGetSecondaryForm(stringstream &strmSchema, stringstream &strmSchemaDisplay, stringstream &strmServer, stringstream &strmQual); 
    2929        void ShowActionWithServerName(bool showIt); 
    3030 
     
    3838        CARInside& arIn; 
    3939        CARServerObject& obj; 
     40        const std::string& attachedSchemaName; 
    4041        const ARSetFieldsActionStruct& setFieldsStruct; 
    4142        int arStructItemType; 
     
    4647 
    4748private: 
    48         void GenerateDefaultMappingTable(const string& fromSchema, std::stringstream &strmSchema, std::stringstream &strmSchemaDisplay, std::stringstream &strmServer, std::stringstream &strmQual); 
     49        void GenerateDefaultMappingTable(std::stringstream &strmSchema, std::stringstream &strmSchemaDisplay, std::stringstream &strmServer, std::stringstream &strmQual); 
    4950        string processMappingXML( TiXmlNode* pParent, string sParent, CTable &tblFieldList, string form, WebserviceMappingMode type); 
    5051}; 
  • branches/work_304/doc/DocAlActionStruct.cpp

    r372 r374  
    260260                qualification.str(""); 
    261261 
    262                 CDocActionSetFieldsHelper *alHelper = new CDocActionSetFieldsHelper(*arIn, *obj, action, structItemType, ifElse, nAction, rootLevel); 
     262                CDocActionSetFieldsHelper *alHelper = new CDocActionSetFieldsHelper(*arIn, *obj, schemaName, action, structItemType, ifElse, nAction, rootLevel); 
    263263                alHelper->ShowActionWithServerName(true); 
    264                 alHelper->SetFieldsGetSecondaryForm(schemaName, secondaryFormRaw, secondaryFormDisplay, serverRaw, qualification); 
     264                alHelper->SetFieldsGetSecondaryForm(secondaryFormRaw, secondaryFormDisplay, serverRaw, qualification); 
    265265                delete alHelper; 
    266266 
  • branches/work_304/doc/DocFilterActionStruct.cpp

    r373 r374  
    350350                stringstream secondaryFormRaw, secondaryFormDisplay, serverRaw, qualification; 
    351351 
    352                 CDocActionSetFieldsHelper* filterHelper = new CDocActionSetFieldsHelper(*arIn, *obj, action, structItemType, ifElse, nAction, rootLevel); 
    353                 filterHelper->SetFieldsGetSecondaryForm(schemaName, secondaryFormRaw, secondaryFormDisplay,  serverRaw, qualification); 
     352                CDocActionSetFieldsHelper* filterHelper = new CDocActionSetFieldsHelper(*arIn, *obj, schemaName, action, structItemType, ifElse, nAction, rootLevel); 
     353                filterHelper->SetFieldsGetSecondaryForm(secondaryFormRaw, secondaryFormDisplay,  serverRaw, qualification); 
    354354                delete filterHelper; 
    355355 
Note: See TracChangeset for help on using the changeset viewer.