Produced by Araxis Merge on 6/9/2017 3:50:04 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:50:04 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-env\src\main\python\util | propertyhelp.py | Fri Apr 21 20:03:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 121 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | from java. util impor t Properti es | |||||
| 2 | from java. io import FileInputS tream, Fil e | |||||
| 3 | ||||||
| 4 | class Prop ertyHelper : | |||||
| 5 | ||||||
| 6 | __doma inProps = None | |||||
| 7 | ||||||
| 8 | def __ init__(sel f, domainP ropsPath ) : | |||||
| 9 | pr int "" | |||||
| 10 | pr int "Initi alizing do main prope rties at p ath: " +do mainPropsP ath | |||||
| 11 | pr int "" | |||||
| 12 | ||||||
| 13 | se lf.__domai nProps = P roperties( ); | |||||
| 14 | fi leInputStr eam = File InputStrea m(File(dom ainPropsPa th)); | |||||
| 15 | se lf.__domai nProps.loa d(fileInpu tStream); | |||||
| 16 | ||||||
| 17 | pr int "" | |||||
| 18 | pr int "Prope rties init ialized su ccessfully ." | |||||
| 19 | pr int "" | |||||
| 20 | ||||||
| 21 | ||||||
| 22 | ||||||
| 23 | def ge tPropertie s(self): | |||||
| 24 | re turn domai nProps; | |||||
| 25 | ||||||
| 26 | def ge tAdminServ erAttribut es(self): | |||||
| 27 | ||||||
| 28 | # get the ap p name | |||||
| 29 | ap p = self.g etAppName( ) | |||||
| 30 | ||||||
| 31 | # build the admin serv er base ke y | |||||
| 32 | ba seKey = ap p + '.serv er.admin' | |||||
| 33 | se rverAttrib s = {} | |||||
| 34 | ||||||
| 35 | # read all p roperties from the p roperties object who se key sta rts with t he baseKey value | |||||
| 36 | fo r key in s elf.__doma inProps.ke ys() : | |||||
| 37 | if key.s tartswith( baseKey) : | |||||
| 38 | val = self.__d omainProps .getProper ty(key); | |||||
| 39 | key = key.repl ace(baseKe y+'.', '') | |||||
| 40 | serv erAttribs[ key] = val | |||||
| 41 | ||||||
| 42 | re turn serve rAttribs | |||||
| 43 | ||||||
| 44 | def ge tManagedSe rvers(self ): | |||||
| 45 | re turn self. __buildMap FromProper ties(self. getAppName () + ".ser ver.manage d") | |||||
| 46 | ||||||
| 47 | def ge tMachines( self): | |||||
| 48 | re turn self. __buildMap FromProper ties(self. getAppName () + ".mac hine") | |||||
| 49 | ||||||
| 50 | def ge tClusters( self): | |||||
| 51 | re turn self. __buildMap FromProper ties(self. getAppName () + ".clu ster") | |||||
| 52 | ||||||
| 53 | def ge tJmsResour ces(self): | |||||
| 54 | re turn self. __buildMap FromProper ties(self. getAppName () + ".jms .resource" ) | |||||
| 55 | ||||||
| 56 | def ge tConnectio nFactories (self): | |||||
| 57 | re turn self. __buildMap FromProper ties(self. getAppName () + ".jms .connectio n.factory" ) | |||||
| 58 | ||||||
| 59 | def ge tQueues(se lf): | |||||
| 60 | re turn self. __buildMap FromProper ties(self. getAppName () + ".jms .queue") | |||||
| 61 | ||||||
| 62 | def ge tDatasourc es(self): | |||||
| 63 | re turn self. __buildMap FromProper ties(self. getAppName () + ".ds" ) | |||||
| 64 | ||||||
| 65 | def ge tNodeManag erAttribut es(self): | |||||
| 66 | re turn self. __buildMap FromProper ties(self. getAppName () + ".nm" ) | |||||
| 67 | ||||||
| 68 | def ge tAppName(s elf): | |||||
| 69 | re turn self. __domainPr ops.get('a pp.name') | |||||
| 70 | ||||||
| 71 | def ge tApplicati onInfo(sel f, applica tionName): | |||||
| 72 | ke y = self.g etAppName( ) + ".appl ication" | |||||
| 73 | ma p = self._ _buildMapF romPropert ies(key) | |||||
| 74 | re turn map.g et(applica tionName); | |||||
| 75 | ||||||
| 76 | def ge tDomainNam e(self): | |||||
| 77 | ap p = self.g etAppName( ) | |||||
| 78 | re turn self. __domainPr ops.getPro perty(app + '.domain .name'); | |||||
| 79 | ||||||
| 80 | def ge tDomainsDi rectory(se lf, machin e): | |||||
| 81 | pr int "Getti ng domain directory for machin e: " + mac hine | |||||
| 82 | pr opKey = se lf.getAppN ame() + ". machine." + machine + ".domain Directory" | |||||
| 83 | pr int "Domai n Director y Property Key: " + propKey | |||||
| 84 | re turn self. __domainPr ops.getPro perty(prop Key) | |||||
| 85 | ||||||
| 86 | def ge tDomainsDi rectoryByM achineName (self, mac hineName): | |||||
| 87 | re tVal = Non e | |||||
| 88 | ma chines = s elf.getMac hines() | |||||
| 89 | if (machines != None) : | |||||
| 90 | for name , m in mac hines.iter items() : | |||||
| 91 | if( m['name'] == machine Name) : | |||||
| 92 | retVal = s elf.getDom ainsDirect ory(name) | |||||
| 93 | re turn retVa l | |||||
| 94 | ||||||
| 95 | def ge tOverwrite RootDir(se lf): | |||||
| 96 | pr int domain Props | |||||
| 97 | ap p = getApp Name() | |||||
| 98 | re turn self. __domainPr ops.getPro perty(app + '.script .overwrite ') | |||||
| 99 | ||||||
| 100 | def ge tConnectio nTimeout(s elf): | |||||
| 101 | ap p = getApp Name() | |||||
| 102 | re turn self. __domainPr ops.getPro perty(app + '.script .timeout') | |||||
| 103 | ||||||
| 104 | def __ buildMapFr omProperti es(self, b aseKey): | |||||
| 105 | ||||||
| 106 | ma p = {} | |||||
| 107 | ||||||
| 108 | fo r key in s elf.__doma inProps.ke ys() : | |||||
| 109 | if(key.s tartswith( baseKey)) : | |||||
| 110 | val = self.__d omainProps .getProper ty(key); | |||||
| 111 | key = key.repl ace(baseKe y+'.', '') ; | |||||
| 112 | tupl e = key.sp lit('.') | |||||
| 113 | ||||||
| 114 | if( map.get(tu ple[0]) == None ) : | |||||
| 115 | map.setdef ault(tuple [0], {tupl e[1]:val}) | |||||
| 116 | else : | |||||
| 117 | submap = m ap.get(tup le[0]) | |||||
| 118 | submap[tup le[1]] = v al | |||||
| 119 | ||||||
| 120 | re turn map | |||||
| 121 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.