Ejemplo n.º 1
0
	def grabBundleSource(self, mf):
		"""The <c:set> points to an adfBundle.  This function go directly to the source of these bundles"""

		#adfBundle precompile a list of adfBundle keys pointing to their respective URLs		
		valueHashPattern = re.compile('^#\{(\w+)\[\'([\w.]+)\'\]\}')
		
		for key, value in self.bundlePathDict.items():
			#Transform the bundle value to a directory path
			match = re.match(valueHashPattern, value)
			if match:
				adfBundleDictName = match.group(1) #adfBundle
				adfBundleKey = match.group(2) #oracle.apps.atk.essMeta.resource.AtkEssMetaEHBundle   	
				
				try:
					if ADFBundle.bundleSoup[adfBundleKey] != None:  #grab bundle source if already defined						
						self.bundlePathURL[(key)] = ADFBundle.bundleAddress[adfBundleKey]
						self.bundlePathSoup[(key)] = ADFBundle.bundleSoup[(adfBundleKey)]							
					else:
						print "bundleSoup does not exist"
				except:						
					try:
						if ADFBundle.bundleAddress[adfBundleKey]:
							#url = ADFBundle.bundleAddress[adfBundleKey] + '&content=1'
							self.bundlePathURL[(key)] = ADFBundle.bundleAddress[adfBundleKey]
							try:
								ADFBundle.grabBundleSource(adfBundleKey)
								#Save the soup object for all the dialogs within the JSF
								self.bundlePathSoup[(key)] = ADFBundle.bundleSoup[(adfBundleKey)]
							except:
								print "ADFBundle cannot be created"
					except:
						print "Sorry, this bundle key is not recognized"
						print >>mf, adfBundleKey	
				finally:
					print adfBundleKey, " scanned"	
Ejemplo n.º 2
0
    def grabBundleSource(self, mf):
        """The <c:set> points to an adfBundle.  This function go directly to the source of these bundles"""

        #adfBundle precompile a list of adfBundle keys pointing to their respective URLs
        valueHashPattern = re.compile('^#\{(\w+)\[\'([\w.]+)\'\]\}')

        for key, value in self.bundlePathDict.items():
            #Transform the bundle value to a directory path
            match = re.match(valueHashPattern, value)
            if match:
                adfBundleDictName = match.group(1)  #adfBundle
                adfBundleKey = match.group(
                    2)  #oracle.apps.atk.essMeta.resource.AtkEssMetaEHBundle

                try:
                    if ADFBundle.bundleSoup[
                            adfBundleKey] != None:  #grab bundle source if already defined
                        self.bundlePathURL[(
                            key)] = ADFBundle.bundleAddress[adfBundleKey]
                        self.bundlePathSoup[(key)] = ADFBundle.bundleSoup[(
                            adfBundleKey)]
                    else:
                        print "bundleSoup does not exist"
                except:
                    try:
                        if ADFBundle.bundleAddress[adfBundleKey]:
                            #url = ADFBundle.bundleAddress[adfBundleKey] + '&content=1'
                            self.bundlePathURL[(
                                key)] = ADFBundle.bundleAddress[adfBundleKey]
                            try:
                                ADFBundle.grabBundleSource(adfBundleKey)
                                #Save the soup object for all the dialogs within the JSF
                                self.bundlePathSoup[(
                                    key)] = ADFBundle.bundleSoup[(
                                        adfBundleKey)]
                            except:
                                print "ADFBundle cannot be created"
                    except:
                        print "Sorry, this bundle key is not recognized"
                        print >> mf, adfBundleKey
                finally:
                    print adfBundleKey, " scanned"