parameters: (self, filePaths)
docstring: Add any new wsdl and schema namespaces to bpel files
docstring_summary: Add any new wsdl and schema namespaces to bpel files
docstring_tokens: Add any new wsdl and schema namespaces to bpel files
function: def AddNameSpaces(self, filePaths):
          """ Add any new wsdl and schema namespaces to bpel files """
          """ Add any new schema namespaces to wsdl files """
          if ACTIVEGRID_BASE_IDE:
              return
  
          processRefs = self.GetAppDocMgr().findRefsByFileType(basedocmgr.FILE_TYPE_PROCESS) # bpel
          schemaRefs = self.GetAppDocMgr().findRefsByFileType(basedocmgr.FILE_TYPE_SCHEMA) # xsd
          serviceRefs = self.GetAppDocMgr().allServiceRefs  # wsdl
          
          # update bpel files
          if processRefs and (serviceRefs or schemaRefs):
              for processRef in processRefs:
                  processDoc = processRef.ideDocument
                  process = processDoc.GetModel()
                  
                  if processDoc and process:
                      modified = False
                      
                      # add wsdl namespaces to bpel file
                      for serviceRef in serviceRefs:
                          wsdl = serviceRef.document
                          if (wsdl
                          and (wsdl.fileName in filePaths
                          or serviceRef.filePath in filePaths)):
                              wsdlLongNS = wsdl.targetNamespace
                              wsdlShortNS = self.GetAppDocMgr().findShortNS(wsdlLongNS)
                              if not wsdlShortNS:
                                  wsdlShortNS = xmlutils.genShortNS(process, wsdlLongNS)
                              xmlutils.addNSAttribute(process, wsdlShortNS, wsdlLongNS)
                              modified = True
                              
                      # add schema namespaces to bpel file
                      for schemaRef in schemaRefs:
                          schema = schemaRef.document
                          if schema and schema.fileName in filePaths:
                              schemaLongNS = schema.targetNamespace
                              schemaShortNS = self.GetAppDocMgr().findShortNS(schemaLongNS)
                              if not schemaShortNS:
                                  schemaShortNS = xmlutils.genShortNS(process, schemaLongNS)
                              xmlutils.addNSAttribute(process, schemaShortNS, schemaLongNS)
                              modified = True
      
                      if modified:
                          processDoc.OnSaveDocument(processDoc.GetFilename())
  
  
          # update wsdl files
          if serviceRefs and schemaRefs:
              for serviceRef in serviceRefs:
                  wsdl = serviceRef.document
                  wsdlDoc = serviceRef.ideDocument
                  
                  if wsdl and wsdlDoc:
                      modified = False
                      
                      # add schema namespace to wsdl file
                      for schemaRef in schemaRefs:
                          schema = schemaRef.document
                          if schema and schema.fileName in filePaths:
                              schemaLongNS = schema.targetNamespace
                              schemaShortNS = self.GetAppDocMgr().findShortNS(schemaLongNS)
                              if not schemaShortNS:
                                  schemaShortNS = xmlutils.genShortNS(wsdl, schemaLongNS)
                              xmlutils.addNSAttribute(wsdl, schemaShortNS, schemaLongNS)
                              modified = True
                              
                      if modified:
                          wsdlDoc.OnSaveDocument(wsdlDoc.GetFilename())
function_tokens: def AddNameSpaces ( self , filePaths ) : """ Add any new schema namespaces to wsdl files """ if ACTIVEGRID_BASE_IDE : return processRefs = self . GetAppDocMgr ( ) . findRefsByFileType ( basedocmgr . FILE_TYPE_PROCESS ) # bpel schemaRefs = self . GetAppDocMgr ( ) . findRefsByFileType ( basedocmgr . FILE_TYPE_SCHEMA ) # xsd serviceRefs = self . GetAppDocMgr ( ) . allServiceRefs # wsdl # update bpel files if processRefs and ( serviceRefs or schemaRefs ) : for processRef in processRefs : processDoc = processRef . ideDocument process = processDoc . GetModel ( ) if processDoc and process : modified = False # add wsdl namespaces to bpel file for serviceRef in serviceRefs : wsdl = serviceRef . document if ( wsdl and ( wsdl . fileName in filePaths or serviceRef . filePath in filePaths ) ) : wsdlLongNS = wsdl . targetNamespace wsdlShortNS = self . GetAppDocMgr ( ) . findShortNS ( wsdlLongNS ) if not wsdlShortNS : wsdlShortNS = xmlutils . genShortNS ( process , wsdlLongNS ) xmlutils . addNSAttribute ( process , wsdlShortNS , wsdlLongNS ) modified = True # add schema namespaces to bpel file for schemaRef in schemaRefs : schema = schemaRef . document if schema and schema . fileName in filePaths : schemaLongNS = schema . targetNamespace schemaShortNS = self . GetAppDocMgr ( ) . findShortNS ( schemaLongNS ) if not schemaShortNS : schemaShortNS = xmlutils . genShortNS ( process , schemaLongNS ) xmlutils . addNSAttribute ( process , schemaShortNS , schemaLongNS ) modified = True if modified : processDoc . OnSaveDocument ( processDoc . GetFilename ( ) ) # update wsdl files if serviceRefs and schemaRefs : for serviceRef in serviceRefs : wsdl = serviceRef . document wsdlDoc = serviceRef . ideDocument if wsdl and wsdlDoc : modified = False # add schema namespace to wsdl file for schemaRef in schemaRefs : schema = schemaRef . document if schema and schema . fileName in filePaths : schemaLongNS = schema . targetNamespace schemaShortNS = self . GetAppDocMgr ( ) . findShortNS ( schemaLongNS ) if not schemaShortNS : schemaShortNS = xmlutils . genShortNS ( wsdl , schemaLongNS ) xmlutils . addNSAttribute ( wsdl , schemaShortNS , schemaLongNS ) modified = True if modified : wsdlDoc . OnSaveDocument ( wsdlDoc . GetFilename ( ) )