Пример #1
0
    def jar_decompile_proc(name, jarfullpath, unzip_path):
        '''
        Jar decompile process
        '''
        print('Run child process %s (%s) start.' % (name, os.getpid()))

        #jar unzip
        Java_processor.java_decomp_ftdJD(jarfullpath, unzip_path)
        print('Run child process %s (%s) end.' % (name, os.getpid()))
Пример #2
0
    def verify_files(self, fullpath):
        '''
        verify the file according to the file type
        @param fullpath: the selected file fullpath in textarea
        @return: result status
        @return: error message if validation failed
        '''
        if self.__fileinfo['filetype'] == 'ViewMetadata':
            return Xmlfile_processor.veriy_view_metadata(fullpath)
        elif self.__fileinfo['filetype'] == 'ResourceMetadata':
            return Xmlfile_processor.veriy_resource_metadata(fullpath)
        elif self.__fileinfo['filetype'] == 'POM':
            return Xmlfile_processor.verify_pom(fullpath)
        elif self.__fileinfo['filetype'] == 'beans':
            return Xmlfile_processor.verify_beans_app_context(fullpath)
        elif self.__fileinfo['filetype'] == 'entityMap':
            return Xmlfile_processor.verify_entity_map(fullpath)
        elif self.__fileinfo['filetype'] == 'JAR':
            return Java_processor.verify_jar_type(fullpath)

        return True, None
Пример #3
0
    def before_next(self):
        '''
        overwrite the function in super class
        verify the input directory
        '''
        if not self.__result:
            showwarning(
                'Warning',
                'There are error existing, the ServiceImpl cannot be generated.'
            )
            return

        # write serviceImpl
        result, message, filefullpath, javaDTO = Java_processor.create_serviceImpl(
            self.__feet.get(), self.get_trans(), self.get_dtos(),
            self.__listboxright.get(0, END), self.__vari1.get())
        if not result:
            showerror('Error', message)
            return False

        # store the serviceImpl full path
        self.get_dtos().set_serviceImplInfo(self.__feet.get(), filefullpath,
                                            javaDTO)
        return True
Пример #4
0
    for ii in dic.items():
        if ii[0] == 111:
            print(ii)
    for ii in dic.keys():
        print(ii)

elif testType == 5:
    str1 = 123  # input('input a value:')
    data = MyDef.my_abs(str1)
    print(data)

elif testType == 6:
    MyDef.my_keyword01('Dai', 36, 'USA', 'a', job='SE', test='aaa')
    MyDef.my_keyword02('Dai', 36, 'England', city='Qingdao', job='QA')

elif testType == 7:
    data = MyDef.my_fact(7)
    print(data)

elif testType == 8:
    tempstr = 'Holder<abcd>'
    left_dash_idx = tempstr.index('<')
    right_dash_idx = tempstr.index('>')
    temp_param = tempstr[left_dash_idx + 1:right_dash_idx]
    print(temp_param)

elif testType == 9:
    Java_processor.java_decomp_ftdJD(
        'C:\\Users\\Raistlin\\Desktop\\PyWorkspace\\FtdJD.jar',
        'C:\\Users\\Raistlin\\Desktop\\PyWorkspace\\output\\')
Пример #5
0
    def __load_jar_and_java(self):
        '''
        this method will load the info from imp & api jar, and will also load the serviceImpl and dataController java files
        '''
        #analysis the serviceImpl
        self.__result, self.__error, business_entity_name, self.__classlist = Java_processor.validate_lib_javas(
            self.get_trans(), self.get_dtos())
        # ---- set serviceImpl name
        if business_entity_name:
            self.get_dtos().set_businessentityname(business_entity_name)
        if not self.__result:
            #---- panel 02 ----------
            self.__pack_errorpanel()
            return False

        # --------- analysis the api service
        if not self.get_dtos().get_serviceInterDTO().get_class_name():
            self.__result, self.__error, serviceInterDTO = Java_processor.read_java_interface(
                self.__classlist[0])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_serviceInterDTO(serviceInterDTO)

        if not self.get_dtos().get_serviceQraDTO().get_class_name():
            self.__result, self.__error, serviceQraDTO = Java_processor.read_java_class(
                self.__classlist[2])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_serviceQraDTO(serviceQraDTO)

        # --------- analysis the factory
        if not self.get_dtos().get_factoryInterDTO().get_class_name():
            self.__result, self.__error, factoryInterDTO = Java_processor.read_java_interface(
                self.__classlist[1])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_factoryInterDTO(factoryInterDTO)

        if not self.get_dtos().get_factoryQraDTO().get_class_name():
            self.__result, self.__error, factoryQraDTO = Java_processor.read_java_class(
                self.__classlist[3])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_factoryQraDTO(factoryQraDTO)

        # --------- analysis the container
        if not self.get_dtos().get_entContInterDTO().get_class_name():
            self.__result, self.__error, containerInterDTO = Java_processor.read_java_interface(
                self.__classlist[4])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_entContInterDTO(containerInterDTO)

        if not self.get_dtos().get_entContQraDTO().get_class_name():
            self.__result, self.__error, containerQraDTO = Java_processor.read_java_class(
                self.__classlist[5])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_entContQraDTO(containerQraDTO)

        # --------- analysis the main table interface
        if not self.get_dtos().get_maintableInterDTO().get_class_name():
            self.__result, self.__error, maintableInterDTO = Java_processor.read_java_interface(
                self.__classlist[6])
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return False
            else:
                self.get_dtos().set_maintableInterDTO(maintableInterDTO)

        return True
Пример #6
0
    def before_next(self):
        '''
        overwrite the function in super class
        generating the next frames according to the selections
        '''
        #check box flag
        frame_constant = Frame_constant()
        checkFlag = False
        selections = dict(self.__checkvalues01, **self.__checkvalues02,
                          **self.__checkvalues03)

        for val in selections.values():
            if val.get() == 1:
                checkFlag = True
                break

        if checkFlag:
            #merge the selections into process flow
            self.get_trans().update_process_flow_by_gene_selection(selections)

            # --------- analysis the serviceImpl and datacontroller class if needed
            fileconstant = File_constant()
            tempstr01, tempstr02, parent_pack, tempstr03 = Java_processor.analysis_jar_package_name(
                self.get_dtos().get_serviceInterDTO().get_class_package())
            self.__result, self.__error, business_entity_name, self.__classlist = Java_processor.validate_lib_javas(
                self.get_trans(), self.get_dtos())

            proc = self.get_trans().get_processflow()
            if self.__checkvalues02[frame_constant.DATA_CONTROLLER].get(
            ) == 1 and self.__checkvalues02[
                    frame_constant.SERVICE_IMPL].get() != 1 in proc:
                if not self.get_dtos().get_serviceImplPath():
                    serviceImpl_path = self.get_trans().get_projectpath(
                    ) + fileconstant.JAVA_SERVICEIMPL_PATH % (
                        parent_pack, business_entity_name +
                        fileconstant.SERVICEIMPL_SUFFIX +
                        fileconstant.JAVA_SUFFIX)
                    self.__result, self.__error, dcJavaDTO = Java_processor.analysis_serviceImpl(
                        business_entity_name + fileconstant.SERVICEIMPL_SUFFIX,
                        serviceImpl_path, self.get_dtos())
                    if not self.__result:
                        #---- panel 02 ----------
                        self.__pack_errorpanel()
                        return
                    else:
                        self.get_dtos().set_serviceImplInfo(
                            business_entity_name +
                            fileconstant.SERVICEIMPL_SUFFIX +
                            fileconstant.JAVA_SUFFIX, serviceImpl_path,
                            dcJavaDTO)

            if (self.__checkvalues03[frame_constant.TS_HANDLER].get() == 1 or self.__checkvalues03[frame_constant.OBSERVABLE_OBJ].get() == 1) and \
                self.__checkvalues02[frame_constant.DATA_CONTROLLER].get() != 1:

                if not self.get_dtos().get_dataControllerPath():
                    dataController_path = self.get_trans().get_projectpath(
                    ) + fileconstant.JAVA_DATACONTROLLER_PATH % (
                        parent_pack, business_entity_name +
                        fileconstant.DATACONTROLLER_SUFFIX +
                        fileconstant.JAVA_SUFFIX)
                    self.__result, self.__error, dcJavaDTO = Java_processor.analysis_dataController(
                        business_entity_name +
                        fileconstant.DATACONTROLLER_SUFFIX,
                        dataController_path, self.get_dtos())
                    if not self.__result:
                        #---- panel 02 ----------
                        self.__pack_errorpanel()
                        return
                    else:
                        self.get_dtos().set_dataControllerInfo(
                            business_entity_name +
                            fileconstant.DATACONTROLLER_SUFFIX +
                            fileconstant.JAVA_SUFFIX, dataController_path,
                            dcJavaDTO)

            return True
        else:
            showerror('Error', 'You must select at least one generation file!')
            return False
Пример #7
0
    def create_TS_CommonService(entityDto, transDto, ts_name):
        '''
        This method is used to create the CommonService TSHandler 
        '''
        #path constant
        fileconstant = File_constant()
        tsconstant = TS_constant()
        proj_path = transDto.get_projectpath()

        # get the main table interface name
        controller_dto = entityDto.get_dataControllerDTO()
        business_entity_name = entityDto.get_businessentityname()
        # get the parent package name
        parent_pack = Java_processor.analysis_dataController_package_name(
            controller_dto.get_class_package())

        # get the generated constant full path
        commsev_filefullpath = proj_path + fileconstant.RESOURCE_TS_MAIN_PATH + parent_pack + '\\' + business_entity_name.lower(
        ) + '\\' + ts_name

        # create the header for constant file
        temp_lines = []
        additional_reference = []
        import_list = []

        # ------------------------------------------------------- #
        # ----- Prepare the imports -----
        # ------------------------------------------------------- #
        import_list.append(tsconstant.TS_TAB +
                           tsconstant.TS_FIN_COMMONSERVICE_IMPORT)

        # DTO import
        #tempStr = tsconstant.TS_DTO_IMPORT_TEMP % (dsName,parent_pack,business_entity_name.lower(),business_entity_name,)
        #import_list.append(tsconstant.TS_TAB + tempStr)

        # ------------------------------------------------------- #
        # ----- Create the file -----
        # ------------------------------------------------------- #
        if not File_processor.verify_dir_existing(commsev_filefullpath):
            # create file
            Path(commsev_filefullpath).touch()

        # ------------------------------------------------------- #
        # ----- open the observable object file -----
        # ------------------------------------------------------- #
        file = open(commsev_filefullpath, 'w')

        # ------------------------------------------------------- #
        # ----- write the common references -----
        # ------------------------------------------------------- #
        for temp_ref in tsconstant.TS_REFERENCE_COMMON_REFERENCES:
            file.write(temp_ref)
            file.write('\n')

        for temp_ref in tsconstant.TS_REFERENCE_UTIL_REFERENCES:
            file.write(temp_ref)
            file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the common references -----
        # ------------------------------------------------------- #
        for temp_ref in additional_reference:
            file.write(temp_ref)
            file.write('\n')

        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the observable object header -----
        # ------------------------------------------------------- #
        temp_header = tsconstant.TS_COMMONSERVICE_HEADER % (
            parent_pack, business_entity_name.lower())
        file.write(temp_header)
        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the imports -----
        # ------------------------------------------------------- #
        for temp_ref in import_list:
            file.write(temp_ref)
            file.write('\n')

        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the observable object content -----
        # ------------------------------------------------------- #
        for sub_line in temp_lines:
            file.write(sub_line)

        file.write(tsconstant.TS_RIGHT_BRACE)

        file.close()

        return True, None
Пример #8
0
    def create_TS_Constant(entityDto, transDto, tsConstant_name):
        '''
        create TS Constant
        '''
        #path constant
        fileconstant = File_constant()
        tsconstant = TS_constant()
        proj_path = transDto.get_projectpath()

        # get the main table interface name
        controller_dto = entityDto.get_dataControllerDTO()
        business_entity_name = entityDto.get_businessentityname()
        # get the parent package name
        parent_pack = Java_processor.analysis_dataController_package_name(
            controller_dto.get_class_package())

        # get the generated constant full path
        const_filefullpath = proj_path + fileconstant.RESOURCE_TS_MAIN_PATH + parent_pack + '\\' + business_entity_name.lower(
        ) + '\\' + tsConstant_name

        # create the header for constant file
        tempLines = []
        fieldLines = []
        gridLines = []
        gridfieldLines = {}

        tempStr = tsconstant.TS_CONSTANT_HEADER % (
            parent_pack, business_entity_name.lower())
        tempLines.append(tempStr)
        tempLines.append('\n')

        viewMetaDataDTO = entityDto.get_viewDTO()

        if not viewMetaDataDTO:
            return False, 'The View Metadata has not been analyzed, please do it first.'

        # ------------------------------------------------------- #
        # ----- prepare the field & labels -----
        # ------------------------------------------------------- #
        for datafield in viewMetaDataDTO.get_datafields():
            if datafield.get_name():
                tempName = datafield.get_name()
                constName = TS_processor.convertConstName(tempName)

                # add fields into const file
                fieldLines.append(tsconstant.TS_CONSTANT_FIELD_LINE_TEMP %
                                  (constName, tempName))

        for datalabels in viewMetaDataDTO.get_datalabels():
            if datalabels.get_name():
                tempName = datalabels.get_name()
                constName = TS_processor.convertConstName(tempName)

                # add fields into const file
                fieldLines.append(tsconstant.TS_CONSTANT_FIELD_LINE_TEMP %
                                  (constName, tempName))

        # create field&label constant
        if len(fieldLines) > 0:
            fieldContent = ''
            for fieldLine in fieldLines:
                fieldContent = fieldContent + fieldLine

            tempLines.append(tsconstant.TS_CONSTANT_FIELDS_TEMP %
                             (business_entity_name, fieldContent))

        # ------------------------------------------------------- #
        # ----- prepare the grids -----
        # ------------------------------------------------------- #
        for datagrids in viewMetaDataDTO.get_datagrids():
            if datagrids.get_name():
                tempGridName = datagrids.get_name()
                constGridName = TS_processor.convertConstName(tempGridName)

                # add fields into const file
                gridLines.append(tsconstant.TS_CONSTANT_FIELD_LINE_TEMP %
                                 (constGridName, tempGridName))

                # ------------------------------------------------------- #
                # ----- prepare the grid fields -----
                # ------------------------------------------------------- #
                if datagrids.get_datagridtable(
                ) and datagrids.get_datagridtable().get_datagridfields(
                ) and len(datagrids.get_datagridtable().get_datagridfields()
                          ) > 0:

                    tempGridFieldList = []

                    for datagridfield in datagrids.get_datagridtable(
                    ).get_datagridfields():
                        if datagridfield.get_fieldname():
                            tempFieldName = datagridfield.get_fieldname()
                            constFieldName = TS_processor.convertConstName(
                                tempFieldName)

                            # add grid fields into const file
                            tempGridFieldList.append(
                                tsconstant.TS_CONSTANT_FIELD_LINE_TEMP %
                                (constFieldName, tempFieldName))

                    gridfieldLines[tempGridName] = tempGridFieldList

        # create grid constant
        if len(gridLines) > 0:
            gridContent = ''
            for gridLine in gridLines:
                gridContent = gridContent + gridLine

            tempLines.append(tsconstant.TS_CONSTANT_GRIDS_TEMP %
                             (business_entity_name, gridContent))

        # create gridfield constant
        for key, value in gridfieldLines.items():
            gridFieldContent = ''
            for gridFieldLine in value:
                gridFieldContent = gridFieldContent + gridFieldLine

            tempLines.append(tsconstant.TS_CONSTANT_GRIDFIELD_TEMP %
                             (key, gridFieldContent))

        # write the constant file
        if not File_processor.verify_dir_existing(const_filefullpath):
            # create file
            Path(const_filefullpath).touch()

        # ------------------------------------------------------- #
        # ----- open the constant file -----
        # ------------------------------------------------------- #
        newfile = open(const_filefullpath, 'w')

        for line in tempLines:
            newfile.write(line)

        newfile.write(tsconstant.TS_RIGHT_BRACE)

        newfile.close()

        return True, None
Пример #9
0
    def create_TS_ObserObj(entityDto, transDto, filename):
        '''
        create Observable Object
        '''
        #path constant
        fileconstant = File_constant()
        tsconstant = TS_constant()
        business_entity_name = entityDto.get_businessentityname()
        proj_path = transDto.get_projectpath()
        controller_dto = entityDto.get_dataControllerDTO()

        # get the parent package name
        parent_pack = Java_processor.analysis_dataController_package_name(
            controller_dto.get_class_package())
        # get the file full path
        filefullpath = proj_path + fileconstant.RESOURCE_TS_MAIN_PATH + fileconstant.RESOURCE_TS_DTO_UI_FOLDER + filename
        # additional references
        additional_reference = []
        # imports
        import_list = []
        # temp lines
        temp_lines = []

        # ------------------------------------------------------- #
        # ----- preparation -----
        # TODO: grid obj
        # ------------------------------------------------------- #
        for ajaxMtd in controller_dto.get_class_methods():
            # skip the method without parameters
            if len(ajaxMtd.get_method_ajax_resp()) == 0:
                continue

            # get the response parameters
            ajax_temp = ''
            for ajaxResp in ajaxMtd.get_method_ajax_resp():
                # convert the java type to TS type
                ajax_para_type_temp = TS_processor.convertJavaTypeToTSType(
                    ajaxResp.get_parameter_type())
                # verify and convert container type
                if ajax_para_type_temp.endswith(
                        fileconstant.JAVA_CONTAINER_SUFFIX):
                    # add import
                    import_name = ajax_para_type_temp[:-9]
                    import_prefix_part = ''
                    import_cells = ajaxResp.get_parameter_import().split(
                        tsconstant.TS_DOT_MARK)
                    idx = 0
                    while idx < len(import_cells):
                        if idx != len(import_cells) - 1:
                            import_prefix_part = import_prefix_part + import_cells[
                                idx] + tsconstant.TS_DOT_MARK
                        idx = idx + 1

                    import_temp = tsconstant.TS_OBSERVABLE_OBJ_NAMESPACE_TEMP % (
                        import_name, import_prefix_part, business_entity_name,
                        import_name + 's')
                    import_list.append(tsconstant.TS_TAB + import_temp)

                    # add additional references
                    reference_temp = tsconstant.TS_OBSERVABLE_OBJ_REFERENCE_TEMP % (
                        'bl', import_name)
                    additional_reference.append(reference_temp)

                    # convert the Container type to import name
                    ajax_para_type_temp = import_name

                ajax_temp = ajax_temp + '\n' + tsconstant.TS_TAB + tsconstant.TS_TAB + ajaxResp.get_parameter_name(
                ) + ': ' + ajax_para_type_temp + tsconstant.TS_END_MARK

            ajaxMtd_name = ajaxMtd.get_method_name()
            ajaxMtd_name = ajaxMtd_name[:1].upper() + ajaxMtd_name[1:]
            line = tsconstant.TS_TAB + tsconstant.TS_OBSERVABLE_OBJ_RESPONSE_TEMPLATE % (
                ajaxMtd_name, ajax_temp)

            temp_lines.append(line)
            temp_lines.append('\n')

        if not File_processor.verify_dir_existing(filefullpath):
            # create file
            Path(filefullpath).touch()

        # ------------------------------------------------------- #
        # ----- open the observable object file -----
        # ------------------------------------------------------- #
        file = open(filefullpath, 'w')

        # ------------------------------------------------------- #
        # ----- write the common references -----
        # ------------------------------------------------------- #
        for temp_ref in tsconstant.TS_REFERENCE_COMMON_REFERENCES:
            file.write(temp_ref)
            file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the common references -----
        # ------------------------------------------------------- #
        for temp_ref in additional_reference:
            file.write(temp_ref)
            file.write('\n')

        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the observable object header -----
        # ------------------------------------------------------- #
        temp_header = tsconstant.TS_OBSERVABLE_OBJ_HEADER % (
            parent_pack, business_entity_name.lower(), business_entity_name)
        file.write(temp_header)
        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the imports -----
        # ------------------------------------------------------- #
        for temp_ref in import_list:
            file.write(temp_ref)
            file.write('\n')

        file.write('\n')

        # ------------------------------------------------------- #
        # ----- write the observable object content -----
        # ------------------------------------------------------- #
        for sub_line in temp_lines:
            file.write(sub_line)

        file.write(tsconstant.TS_RIGHT_BRACE)

        file.close()

        return True, None
Пример #10
0
    def create_widges(self):

        fileconstant = File_constant()

        #frame
        self.__frame1 = FormatableFrame(self)
        self.__frame1.pack(side=TOP)
        #Title
        self.__label01 = Label(self.__frame1,
                               text="TS Constants generator options",
                               width=45)
        self.__label01.pack(side=TOP, fill=X, ipady=10)

        #---- panel 01 ----------
        canv1 = Canvas(self, height=30, width=550)
        #label
        self.__label01 = Label(canv1, text='TS Constants name :')
        self.__label01.place(height=20, width=130, relx=0.03, rely=0.2)
        #input
        self.__feet = StringVar()
        self.__dicinput = Entry(canv1,
                                textvariable=self.__feet,
                                borderwidth=3,
                                bg='black',
                                foreground='yellow',
                                highlightcolor='red',
                                insertbackground='red')
        self.__dicinput.place(height=20, width=250, relx=0.3, rely=0.2)

        if self.get_dtos().get_businessentityname():
            temp_name = self.get_dtos().get_businessentityname(
            ) + fileconstant.TS_CONSTANT_SUFFIX + fileconstant.TS_SUFFIX
            self.__feet.set(temp_name)
        else:
            self.__result, self.__error, business_entity_name, self.__classlist = Java_processor.validate_lib_javas(
                self.get_trans(), self.get_dtos())
            if not self.__result:
                #---- panel 02 ----------
                self.__pack_errorpanel()
                return
            if business_entity_name:
                self.get_dtos().set_businessentityname(business_entity_name)
                temp_name = self.get_dtos().get_businessentityname(
                ) + fileconstant.TS_CONSTANT_SUFFIX + fileconstant.TS_SUFFIX
                self.__feet.set(temp_name)

        canv1.pack()

        #---- panel 02 ----------
        canv2 = Canvas(self, height=100, width=550)
        #label
        label1 = Label(canv2, text='Options:')
        label1.place(height=20, width=60, relx=0, rely=0)
        #radio box
        self.__vari1 = IntVar()
        self.__rad1 = Radiobutton(canv2,
                                  text='Re-write the previous file',
                                  variable=self.__vari1,
                                  value=1)
        self.__rad1.place(height=20, width=170, relx=0.1, rely=0.2)
        self.__rad1.select()
        self.__rad2 = Radiobutton(canv2,
                                  text='Attach new functions to the file',
                                  variable=self.__vari1,
                                  value=2)
        self.__rad2.place(height=20, width=210, relx=0.1, rely=0.45)
        self.__rad2.deselect()
        self.__rad3 = Radiobutton(canv2,
                                  text='Save the previous file as backup',
                                  variable=self.__vari1,
                                  value=3)
        self.__rad3.place(height=20, width=220, relx=0.1, rely=0.7)
        self.__rad3.deselect()
        canv2.pack()
Пример #11
0
    def verify_proj_files(self):
        '''
        verify the project fiels
        '''
        #path constant
        fileconstant = File_constant()
        entity_name = self.get_dtos().get_entityname()
        proj_path = self.get_trans().get_projectpath()

        #verify view metadata
        view_exist = False
        viewfullpath = self.get_dtos().get_viewfullpath()
        if not viewfullpath and entity_name:
            viewfullpath = proj_path + fileconstant.VIEW_METADATA_PATH + entity_name + fileconstant.XML_SUFFIX
            view_exist, self.__message = Xmlfile_processor.veriy_view_metadata(
                viewfullpath)
        elif viewfullpath:
            view_exist = True
        if view_exist:
            newlabel01 = "< passed >"
            self.__label04.config(text=newlabel01, fg='blue')
            self.get_dtos().set_viewfullpath(viewfullpath)
            self.__checkstatus['ViewMetadata'] = [True, self.__checkval01]
        else:
            newlabel01 = "< failed >"
            self.__label04.config(text=newlabel01, fg='red')
            btnlabel = 'Correct'
            self.__button01.config(text=btnlabel)
            self.__checkstatus['ViewMetadata'] = [False, self.__checkval01]
        self.__checkval01.set(1)
        #bind button click event
        self.__button01.bind(
            '<Button-1>',
            self.event_adapter(self.detal_button_click,
                               iscorrect=self.__checkstatus['ViewMetadata'][0],
                               filename=entity_name + fileconstant.XML_SUFFIX,
                               filetype='ViewMetadata',
                               filepath=viewfullpath))

        #verify source metadata
        resource_exist = False
        resourcefullpath = self.get_dtos().get_resourcefullpath()
        if not resourcefullpath and entity_name:
            resourcefullpath = proj_path + fileconstant.RESOURCE_METADATA_PATH + entity_name + fileconstant.RESOURCE_METADATA_SUFFIX
            resource_exist, self.__message = Xmlfile_processor.veriy_resource_metadata(
                resourcefullpath)
        if resource_exist:
            newlabel = "< passed >"
            self.__label06.config(text=newlabel, fg='blue')
            self.get_dtos().set_resourcefullpath(resourcefullpath)
            self.__checkstatus['ResourceMetadata'] = [True, self.__checkval02]
        else:
            newlabel = "< failed >"
            self.__label06.config(text=newlabel, fg='red')
            btnlabel = 'Correct'
            self.__button02.config(text=btnlabel)
            self.__checkstatus['ResourceMetadata'] = [False, self.__checkval02]
        self.__checkval02.set(1)
        self.__button02.bind(
            '<Button-1>',
            self.event_adapter(
                self.detal_button_click,
                iscorrect=self.__checkstatus['ResourceMetadata'][0],
                filename=entity_name + fileconstant.RESOURCE_METADATA_SUFFIX,
                filetype='ResourceMetadata',
                filepath=resourcefullpath))

        #verify pom
        result, self.__message = Xmlfile_processor.verify_pom(
            proj_path + fileconstant.POM_PATH)
        if result:
            #read the pom
            result, pomDto, self.__message = Xmlfile_processor.read_pom(
                proj_path + fileconstant.POM_PATH)
            newlabel = "< passed >"
            self.__label08.config(text=newlabel, fg='blue')
            self.get_trans().set_pomDto(pomDto)
            self.__checkstatus['Pom'] = [True, self.__checkval03]
        else:
            newlabel = "< failed >"
            self.__label08.config(text=newlabel, fg='red')
            btnlabel = 'Correct'
            self.__button03.config(text=btnlabel)
            self.__checkstatus['Pom'] = [False, self.__checkval03]
        self.__checkval03.set(1)
        self.__button03.bind(
            '<Button-1>',
            self.event_adapter(self.detal_button_click,
                               iscorrect=self.__checkstatus['Pom'][0],
                               filename='pom.xml',
                               filetype='POM',
                               filepath=proj_path + fileconstant.POM_PATH))

        #verify beans-app-context
        result, self.__message = Xmlfile_processor.verify_beans_app_context(
            proj_path + fileconstant.BEAN_APP_CONTEXT_PATH)
        if result:
            newlabel = "< passed >"
            self.__label10.config(text=newlabel, fg='blue')
            self.get_trans().set_pomDto(pomDto)
            self.__checkstatus['beans-app-context'] = [True, self.__checkval04]
        else:
            newlabel = "< failed >"
            self.__label10.config(text=newlabel, fg='red')
            btnlabel = 'Correct'
            self.__button04.config(text=btnlabel)
            self.__checkstatus['beans-app-context'] = [
                False, self.__checkval04
            ]
        self.__checkval04.set(1)
        self.__button04.bind(
            '<Button-1>',
            self.event_adapter(
                self.detal_button_click,
                iscorrect=self.__checkstatus['beans-app-context'][0],
                filename='beans-app-server.xml',
                filetype='beans',
                filepath=proj_path + fileconstant.BEAN_APP_CONTEXT_PATH))

        #verify entityMap
        result, self.__message = Xmlfile_processor.verify_entity_map(
            proj_path + fileconstant.ENTITY_MAP_PATH)
        if result:
            newlabel = "< passed >"
            self.__label12.config(text=newlabel, fg='blue')
            self.get_trans().set_pomDto(pomDto)
            self.__checkstatus['entityMap'] = [True, self.__checkval05]
        else:
            newlabel = "< failed >"
            self.__label12.config(text=newlabel, fg='red')
            btnlabel = 'Correct'
            self.__button05.config(text=btnlabel)
            self.__checkstatus['entityMap'] = [False, self.__checkval05]
        self.__checkval05.set(1)
        self.__button05.bind(
            '<Button-1>',
            self.event_adapter(self.detal_button_click,
                               iscorrect=self.__checkstatus['entityMap'][0],
                               filename='entityMap.xml',
                               filetype='entityMap',
                               filepath=proj_path +
                               fileconstant.ENTITY_MAP_PATH))

        #verify jar
        result = False
        jarname = None
        implJarfullpath = self.get_trans().get_finImplJarPath()
        apiJarfullpath = self.get_trans().get_finApiJarPath()
        #verify if jar is existing at the Maven's default repository
        #impl jar
        if not implJarfullpath:
            userhomepath = File_processor.get_user_home(
            ) + fileconstant.IMPL_JAR_LIB_PATH
            #jar name and full path
            implJarfullpath = userhomepath + pomDto.get_financials_api_version(
            ) + '\\' + fileconstant.FIN_IMPL_JAR_PREFIX + pomDto.get_financials_api_version(
            ) + fileconstant.JAR_SUFFIX
            jarname = fileconstant.FIN_IMPL_JAR_PREFIX + pomDto.get_financials_api_version(
            ) + fileconstant.JAR_SUFFIX

            result, self.__message = Java_processor.verify_jar_type(
                implJarfullpath)

            if result:
                newlabel = "< passed >"
                self.__label92.config(text=newlabel, fg='blue')
                self.get_trans().set_finImplJarPath(implJarfullpath)
                self.__checkstatus['ImplJAR'] = [True, self.__checkval91]
            else:
                newlabel = "< failed >"
                self.__label92.config(text=newlabel, fg='red')
                btnlabel = 'Correct'
                self.__button91.config(text=btnlabel)
                self.__checkstatus['ImplJAR'] = [False, self.__checkval91]
        else:
            newlabel = "< passed >"
            self.__label92.config(text=newlabel, fg='blue')
            self.__checkstatus['ImplJAR'] = [True, self.__checkval91]
            #jar name
            jarname = File_processor.get_file_name(
                self.get_trans().get_finImplJarPath())

        self.__checkval91.set(1)
        self.__button91.bind(
            '<Button-1>',
            self.event_adapter(self.detal_button_click,
                               iscorrect=self.__checkstatus['ImplJAR'][0],
                               filename=jarname,
                               filetype='ImplJAR',
                               filepath=implJarfullpath))
        # api jar
        if not apiJarfullpath:
            userhomepath = File_processor.get_user_home(
            ) + fileconstant.API_JAR_LIB_PATH
            #jar name and full path
            apiJarfullpath = userhomepath + pomDto.get_financials_api_version(
            ) + '\\' + fileconstant.FIN_API_JAR_PREFIX + pomDto.get_financials_api_version(
            ) + fileconstant.JAR_SUFFIX
            jarname = fileconstant.FIN_IMPL_JAR_PREFIX + pomDto.get_financials_api_version(
            ) + fileconstant.JAR_SUFFIX

            result, self.__message = Java_processor.verify_jar_type(
                apiJarfullpath)

            if result:
                newlabel = "< passed >"
                self.__label94.config(text=newlabel, fg='blue')
                self.get_trans().set_finApiJarPath(apiJarfullpath)
                self.__checkstatus['ApiJAR'] = [True, self.__checkval92]
            else:
                newlabel = "< failed >"
                self.__label94.config(text=newlabel, fg='red')
                btnlabel = 'Correct'
                self.__button92.config(text=btnlabel)
                self.__checkstatus['ApiJAR'] = [False, self.__checkval92]
        else:
            newlabel = "< passed >"
            self.__label94.config(text=newlabel, fg='blue')
            self.__checkstatus['ApiJAR'] = [True, self.__checkval92]
            #jar name
            jarname = File_processor.get_file_name(
                self.get_trans().get_finImplJarPath())

        self.__checkval92.set(1)
        self.__button92.bind(
            '<Button-1>',
            self.event_adapter(self.detal_button_click,
                               iscorrect=self.__checkstatus['ApiJAR'][0],
                               filename=jarname,
                               filetype='ApiJAR',
                               filepath=apiJarfullpath))