資源描述:
《MAXIMO開發(fā)總結(jié)》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、1、MAXIMO源碼常用包MAXIMO源碼有很多包,開發(fā)經(jīng)常用到的是下面幾個:psdi.app???????????每個模塊對應(yīng)的商業(yè)邏輯,例如psdi.app.po下面的類就為采購單對應(yīng)的業(yè)務(wù)邏輯。psdi.jsp.app?????每個模塊對應(yīng)的頁面流轉(zhuǎn)代碼,例如頁面上的菜單及按鈕。psdi.jsptags????JSP標簽psdi.mbo?????????最核心的包psdi.util???????????工具類psdi.workflow???工作流對應(yīng)的類2、MAXIMO源碼常見類psdi.mbo.Mbo,psdi.mbo
2、.MboRemote與psdi.mbo.MboSet,psdi.mbo.MboSetRemote這幾個個類是最常見的類,所有帶業(yè)務(wù)邏輯的類都是繼承Mbo和MboSet。例如WO和WOSET、PR和PRSET。Mbo類是處理單條記錄的類。MboSet類是包含多個Mbo的類,可以看成是Mbo的數(shù)組。一般都是由Mbo調(diào)用MboSet,是用getThisMboSet()來得到。有MboSet得到Mbo是用getMbo()或getMbo(i)得到。例如:?int?i=0;for(MboRemote?mboRemote=mboSetRem
3、ote.getMbo(i);mboRemote?!=null;mboRemote=mboSetRemote.getMbo(i))???????.....???????i++;}psdi.jsp.beans.MboSetBean這個類是用于存放JSP上輸入的數(shù)據(jù)的類,例如頁面上的mbosetid="rec"就是指的是這個類。FldXXXX類,是操作字段的類,一般有下面四個方法Init()????初始化工作initValue()初始化值時的工作。validate()數(shù)據(jù)校驗,一般在光標離開此字段的輸入框時校驗。action()??
4、當validate執(zhí)行完時,執(zhí)行的動作3.客戶化修改在實施MAXIMO經(jīng)常需要根據(jù)客戶要求做客戶化修改操作,一般我都盡量不改變MAXIMO源碼,而是在源碼的基礎(chǔ)上選擇繼承或者覆蓋。例如:我要修改工單的save方法,就必須做以下操作:1)繼承WOSet?public?class?MyWOSet?extends?WOSet?implements?MyWOSetRemote...{????private?static?Logger?logger?=?Logger.getLogger(MyWOSet.class);????/**?*/
5、/**?????*?構(gòu)造函數(shù) 一定要有的?????*?@param?mboserverinterface?MboServerInterface?????*?@throws?MXException?????*?@throws?RemoteException?????*/????public?MyWOSet(MboServerInterface?mboserverinterface)?throws?MXException,?RemoteException?...{???????super(mboserverinterface);?
6、??}???/**?*//**????*?采用自己定義的類????*?@param?ms?MboSet????*?@return?Mbo????*?@throws?MXException????*?@throws?RemoteException????*/???public?Mbo?getMboInstance(MboSet?ms)?throws?MXException,?RemoteException?...{???????return?new?MyWO(ms);???}}?2)繼承WOpublic?class?MyWO?e
7、xtends?WO?implements?WoRemote?...{????/**?*//**?????*?一定要有的東東?????*?????*?@param?ms?????*????????????MboSet?????*?@throws?MXException?????*?@throws?RemoteException?????*/????public?MyWO(MboSet?ms)?throws?MXException,?RemoteException?...{????????super(ms);????}????pu
8、blic?void?save()?throws?MXException,?RemoteException?...{???????????????????????????????????????????super.save();????????customMethod();??