class acb(object): def __init__(self,location = '/acb/WEB-INF/classes/'): self.location = location self.user_input = User_Input() self.user_input.input_user() self.user_input.input_cas_config() self.user_input.input_db_config() self.user_input.input_project_config() self.user_input.input_ip_port_config() self.user_input.input_bpm_config() self.user_input.input_superMap_config() self.user_input.input_redis_config() # jeesite.properties def je_properties(self): old_str = 'jeesite.properties' location_str = self.user_input.location find_list = ['cas.server.url','cas.project.url','jdbc.url'] for find_str in find_list: if self.user_input.config.get(find_str): if find_str == 'cas.project.url': Edit_Congif(location_str + self.location + old_str, find_str, self.user_input.config[find_str] + 'acb').Globa_Edit() else: Edit_Congif(location_str + self.location + old_str, find_str, self.user_input.config[find_str]).Globa_Edit() # raqreport.properties def ra_properties(self): old_str = 'acbReport.properties' location_str = self.user_input.location Edit_Congif(location_str+self.location+old_str, new_str=self.user_input.ip_port).Re_Edit() # systemUrl.properties def sy_properties(self): old_str = 'systemUrl.properties' location_str = self.user_input.location Edit_Congif(location_str+self.location+old_str, new_str=self.user_input.ip_port).Re_Edit() find_list = ['bpmUrl','superMapUrl'] for find_str in find_list: if self.user_input.acb_config.get(find_str): Edit_Congif(location_str+self.location+old_str,find_str, self.user_input.acb_config[find_str]).Globa_Edit() def redis_conf(self): old_str = 'spring-context-jedis.xml' location_str = self.user_input.location find_str = 'bean' Edit_Congif(location_str + self.location + old_str, find_str, self.user_input.redis).Xml_Redis2()
class demonarea(object): def __init__(self,location = '/demonarea/WEB-INF/classes/'): self.location = location self.user_input = User_Input() self.user_input.input_user() self.user_input.input_cas_config() self.user_input.input_db_config() self.user_input.input_project_config() self.user_input.input_ip_port_config() self.user_input.input_superMap_config() self.user_input.input_bas5Url_config() # jeesite.properties def je_properties(self): old_str = 'jeesite.properties' location_str = self.user_input.location find_list = ['cas.server.url','cas.project.url','jdbc.url'] for find_str in find_list: if self.user_input.config.get(find_str): if find_str == 'cas.project.url': Edit_Congif(location_str + self.location + old_str, find_str, self.user_input.config[find_str] + 'demonarea').Globa_Edit() else: Edit_Congif(location_str + self.location + old_str, find_str, self.user_input.config[find_str]).Globa_Edit() # raqreport.properties def ra_properties(self): old_str = 'raqreport.properties' location_str = self.user_input.location Edit_Congif(location_str+self.location+old_str, new_str=self.user_input.ip_port).Re_Edit() # systemUrl.properties def sy_properties(self): old_str = 'systemUrl.properties' location_str = self.user_input.location Edit_Congif(location_str+self.location+old_str, new_str=self.user_input.ip_port).Re_Edit() find_list = ['bas5Url','superMapUrl'] for find_str in find_list: if self.user_input.demonarea_config.get(find_str): Edit_Congif(location_str+self.location+old_str,find_str, self.user_input.demonarea_config[find_str]).Globa_Edit()