2013年11月28日的总结

今天学到了不少东西,最主要的是对现有系统的理解更进一步。因为我的需求是故障模块的,所以呢,了解也仅仅局限于故障模块。

CommonFaultAction 继承 SheetAction 继承 NewSheetAction 继承 BaseAction 继承一个系统的类DispacherAction

与故障有关的请求都经过 struts-config-sheet-commonfault.xml 
进入CommonFaultAction类里,这个类继承了父类的众多方法。

另外,按照结构化的要求,Action里的方法都应该当初的取出来放到CommonFaultSheetMethod这个类里面,前辈们是这么设计的,可是后辈们没有好好遵守,大家都乱写了。

CommonFaultMethod这个类继承了BaseSheet这个抽象类,BaseSheet这个抽象类继承了NewBaseSheet这个抽象类同时实现了IBaseSheet这个接口,IBaseSheet这个接口则继承了NewIBaseSheet这个接口。

下面这些代码都写在CommonFaultMethod这个类里面

        //获得网管告警ID
        CommonFaultMain commonFaultMain = (CommonFaultMain)getMainService().getSingleMainPO(sheetKey);
        String aralmId = commonFaultMain.getMainAlarmId();
        //获取当前用户的email
        TawSystemSessionForm sessionform = (TawSystemSessionForm) request.getSession().getAttribute("sessionform");
        ApplicationContextHolder holder = ApplicationContextHolder.getInstance();
        ITawSystemUserManager userManager = (ITawSystemUserManager)holder.getBean("ItawSystemUserSaveManagerFlush");
        TawSystemUser user = (TawSystemUser) userManager.getUserByuserid(sessionform.getUserid());
        String email = user.getEmail();
        if(email==null){
            email="";
        }
原文地址:https://www.cnblogs.com/coolgame/p/3448282.html