m ,Ec@sdZdkZdkZdkZdkZdkZdklZdkl Z dk Z dk Z dk Z dkZ dkZdkZdk lZdkZdk lZdklZdklZdklZd klZd klZdkZd klZdkZei d d dddz dk!Z!Wdei"d=y[#Wne$j onXXdefdYZ%ee%deefdYZ&ee&dfdYZ'dfdYZ(dZ)dZ*dZ+dS(sProduct objects N(sescape(squote(sInitializeClass(sFolder(s ProductHelp(s Unauthorized(sClassSecurityInfo(sFactory(sPermissionManager(sgetConfigurationtignoretmessages ^ZClassestappendiit ProductFoldercBstZdZdZdZZdZdZhdd<dd((R tmanage_addPrincipiaFactorys  cCs=||_||_y|idtd|WnnXdS(NR8(RR RRt ProductHelp(R RR((R t__init__s   t DestinationcCs|S(s)Return the destination for factory outputN(R (R ((R RCstDestinationURLcCs |idS(s5Return the URL for the destination for factory outputtBASE4N(R R(R ((R RDssdtml/tracebacks dtml/readmecCsTxMdD]E}tii|i|}tii|ot|iSqqWdS(Ns README.txts README.TXTs readme.txtR'(s README.txts README.TXTs readme.txt( RtostpathtjoinR thometisfiletopentread(R RGR((R tmanage_get_product_readme__s cCs |iS(N(R tpossible_permissions(R ((R tpermissionMappingPossibleValuesscCs|iS(N(R R(R ((R tzclass_product_namescCs7t|dp |idtd|in|iS(sU Returns the ProductHelp object associated with the Product. R8N(thasattrR RRARR8(R ((R tgetProductHelps s dtml/refreshc Csd}|djo |i}nxtiD]}d}xDdD]<}t i i |||}t i i|o d}Pq=q=W|o;y-t|}|i}|i|}PWqqXq*q*W|S(Nis refresh.txts REFRESH.txts REFRESH.TXTi(s refresh.txts REFRESH.txts REFRESH.TXT(Rt refresh_txttpidR RRt__path__t productDirtfoundRRFRGRHtptexistsRKtfileRLttexttclose( R RTRVRRSRXRZR[RW((R t_readRefreshTxts,        cCsd} }} ti|i}|dj o|\} }} d}n|i }ti |i |i} ti|i |i}ti|i}g} d|i}|d}t|}x^|D]V\}}||jp|| |jo||}|p d}q n| i|qWti|i }x5|D]-}|i |djo|i|q7q7Wt|id|} |i |d|id|d| d|d | d t"i#d | d | d |d| d|dd S(s9 Displays the refresh management screen. s Products.%st.RBcCs ||jS(N(t productIdtmyId(R_R`((R tsRRSt error_typet error_valueterror_tbt devel_modetauto_refresh_enabledtauto_refresh_othertdependent_productstloaded_modulestmanage_tabs_messagetmanagement_viewtRefreshN(%RRbRcRdt RefreshFuncstgetLastRefreshExceptionR RtexcR]RStisAutoRefreshEnabledt_p_jartautotgetDependentProductstdepstlistRefreshableModulestmodsRitprefixt prefixdottlentlpdotRtmoduleRtlistAutoRefreshableProductstall_autoRTtremovetfiltert auto_othert _refresh_dtmlRR$tDevelopmentModeRj(R RRjRxRTR{RwRcRzRdRbRRiRrRRvRoRSRtR}((R tmanage_refreshsR            cCs|idjo tdnd}ti|i|io!dk l }|i d}nd}|dj o|i |d|SndS(s: Attempts to perform a refresh operation. srefresh.txt not found(s ConnectionsProduct refreshed.sAn exception occurred.RjN(R R]Rt UnauthorizedRRmtperformFullRefreshRqRtZODBt Connectiont resetCachesRR(R RRR((R tmanage_performRefresh*s     cCsx|idjo tdnti|i|i||o d}nd}|dj o|i |d|SndS(sA Changes the auto refresh flag for this product. srefresh.txt not createdsEnabled auto refresh.sDisabled auto refresh.RjN( R R]RRRmtenableAutoRefreshRqRtenableRRR(R RRR((R tmanage_enableAutoRefresh:s   cCs[|idjo tdnti|i|i||dj o|i |SndS(sC Selects which products to refresh simultaneously. srefresh.txt not createdN( R R]RRRmtsetDependentProductsRqRt selectionsRR(R RR((R tmanage_selectDependentProductsHs   (sHelp(2RRRtClassSecurityInfotsecurityRRR)tconfigurable_objects_Rt import_error_t_isBeingUsedAsAMethod_tretcompiletsearchR1tZClassesRtPermissionManagerR9tmethodsR3R4R5tFoldertmanage_optionsttuplet _propertiest_reserved_namesR$R%R&R2R@RBt declarePublicRCRDtmanage_tracebackt manage_readmeRMRORPRRRR]RRRR(((R RbsF  ,   !"          4 tCompressedOutputFilecBs#tZdZdZdZRS(NcCs2ti|_g|_||_|iddS(NR'(tzlibt compressobjR t_ct_rtrott_rottencrypt(R R((R RBVs  cCs,|ii|ii|ii|dS(N(R RRRt encryptmoreRtcompressts(R R((R twrite\scCs5|ii|ii|iidi|iS(NR'(R RRRRRtflushRH(R ((R tgetdata_s%(RRRBRR(((R RUs  tCompressedInputFilecBs5tZdZdZdZddZdZRS(NicCsgti|_d|_t|todk}|i |}n||_ |i d||_ dS(NR'(Rt decompressobjR Rt_bt isinstanceRR(trotortnewrotorRtdecrypttft_f(R RRR((R RBes    cCsy|iodSn|iid}|p|ii}d|_n|ii|ii |}|i ||_ dS(Ni i( R t_doneRRLtlRRt decompressRt decryptmoreR(R R((R t_nextos  cCs|djo/x|ip|iqWt|i}n4x0|t|ijo|i o|iq?W|i| }|i||_|S(N(RRR RRRyRtr(R RR((R RLys  ! cCs|iid}x9|djo+|i o |i|iid}qW|djot|i}n |d}|i| }|i||_|S(Ns ii(R RtfindRRRRyR(R RR((R treadlines    (RRRRBRRRLR(((R Rcs  cCs|ii}d} t|do |i} nd} xld"D]d} yEt i i || }t|d}|ii} |iPWq<tj o q<q<Xq<Wd}yst||o_t||}t|do<|i| jo,t|do|i| jo|SqqnWnnXy$tt|d d |d }Wn1| od | }t|d ||f}n5Xt i!|i"}|i$i%|}|d|_&|dj oY|i'||i(|x<|i)D]*\}} y|i,|| WqqXqWn|i,||d|_-| |_||_d|_.| oA| |_d||_/d|_-hdd<dd