锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品国产成人亚洲午夜福利,亚洲AV日韩精品久久久久,国产偷窥女洗浴在线观看亚洲http://www.tkk7.com/sshwsfc/category/11579.html闃呰鏈珺log璇瘋嚜澶囧鏂欒涓鍙?/description>zh-cnThu, 20 Mar 2008 22:51:55 GMTThu, 20 Mar 2008 22:51:55 GMT60Android涓婄殑MSN鍒濊鎴愭晥锝烇綖錛侊紒http://www.tkk7.com/sshwsfc/archive/2008/03/21/187605.html宸矙宸矙Thu, 20 Mar 2008 17:59:00 GMThttp://www.tkk7.com/sshwsfc/archive/2008/03/21/187605.htmlhttp://www.tkk7.com/sshwsfc/comments/187605.htmlhttp://www.tkk7.com/sshwsfc/archive/2008/03/21/187605.html#Feedback0http://www.tkk7.com/sshwsfc/comments/commentRss/187605.htmlhttp://www.tkk7.com/sshwsfc/services/trackbacks/187605.html緇忚繃涓ゅぉ鐨勫姫鍔涳紝緇堜簬鍦ˋndroid涓婇潰璺戣搗鏉SN浜嗐傜幇鍦ㄥ疄鐜頒簡鍩烘湰鐨勮亰澶╁姛鑳斤紝鎵撶畻闄嗙畫鐨勬妸鍏朵粬鍔熻兘瀹屽杽錛屼竾浜嬪紑澶撮毦錛岀浉淇′互鍚庣殑宸ヤ綔浼氬緢欏哄埄銆?/p>


Gtalk鐨勫姛鑳界敱浜庢湁瀹樻柟鏀寔錛屾棭灝卞紕浜嗚窡榪欎釜宸笉澶氱殑鐗堟湰銆?/p>


鍙﹀錛岃繖涓蔣浠剁洰鍓嶆槸浠ユ彃浠剁殑褰㈠紡寮鍙戯紝澶氫竴涓崗璁氨鏄涓涓猘pk錛屽疄鐜頒竴浜沬ntent鍗沖彲銆傚畼鏂圭殑IM鍖呴噷闈㈡湁寰堝鏀寔錛屽彲鎯滄枃妗f病鏈夋彁鍙娿?/p>

 

Android涓枃璁哄潧鍘熷笘



宸矙 2008-03-21 01:59 鍙戣〃璇勮
]]>
Android鍙戝竷, Android涓浗緗戠珯姝e紡鎴愮珛, 嬈㈣繋璁塊棶http://www.tkk7.com/sshwsfc/archive/2007/11/15/160736.html宸矙宸矙Thu, 15 Nov 2007 05:41:00 GMThttp://www.tkk7.com/sshwsfc/archive/2007/11/15/160736.htmlhttp://www.tkk7.com/sshwsfc/comments/160736.htmlhttp://www.tkk7.com/sshwsfc/archive/2007/11/15/160736.html#Feedback0http://www.tkk7.com/sshwsfc/comments/commentRss/160736.htmlhttp://www.tkk7.com/sshwsfc/services/trackbacks/160736.htmlAndroid鏄痝oogle涓烘墜鏈哄紑鍙戠殑鎿嶄綔緋葷粺, 鍩轟簬Linux2.6鍐呮牳.


2007騫?1鏈?2鏃?鍖楃編鏃墮棿), Android鐨凙PP SDK鍏竷, 寮濮嬩簡google鎵嬫満鐨?a class="external text" title="http://code.google.com/android" rel="nofollow">寮鍙戝ぇ璧?/a>. 鎴戜滑鑷村姏浜嶢ndroid鐨勫紑鍙戞枃妗g炕璇? 寮鍙戞妧鏈氦嫻佺瓑宸ヤ綔, 甯屾湜涓篈ndroid騫沖彴鍦ㄤ腑鍥界殑鎺ㄥ箍璐$尞鑷繁鐨勫姏閲?


Andorid鐨凷DK鏄畬鍏ㄩ拡瀵筳ava璁捐鐨? 鐢氳嚦鎻愪緵eclipse鐨勬彃浠? 浣滀負涓涓猨avaer涓嶇爺絀跺疄鍦ㄥ彲鎯?

鐜板湪涓枃鏂囨。宸茬粡鏈変簡鍒濇榪涘睍,  澶у緲昏瘧鐨勭儹鎯呴兘寰堥珮娑? 璁哄潧閲岀殑璁ㄨ涔熷崄鍒嗙儹鐑? 嬈㈣繋鎮ㄧ殑璁塊棶.

鎴戜滑鐨勭綉绔? http://www.androidcn.net

涓枃鏂囨。璁″垝:

http://www.androidcn.net/wiki

PS: 綆$悊鍛樻偍濂? 涓嶇煡閬撹繖涓涓嶇鍚堥欏靛彂甯冪殑瑙勫垯, 瑕佹槸涓嶅Ε鎴戜細鎾や笅, 鎴戜滑閮芥兂涓篈ndroid涓枃鍖栬礎鐚姏閲?/span>

宸矙 2007-11-15 13:41 鍙戣〃璇勮
]]>
JBPM鐨凾oken璺緞闂http://www.tkk7.com/sshwsfc/archive/2007/04/24/113217.html宸矙宸矙Tue, 24 Apr 2007 08:04:00 GMThttp://www.tkk7.com/sshwsfc/archive/2007/04/24/113217.htmlhttp://www.tkk7.com/sshwsfc/comments/113217.htmlhttp://www.tkk7.com/sshwsfc/archive/2007/04/24/113217.html#Feedback1http://www.tkk7.com/sshwsfc/comments/commentRss/113217.htmlhttp://www.tkk7.com/sshwsfc/services/trackbacks/113217.htmlProcessInstance閲岄潰鏈変竴涓猣indToken(String tokenPath)鏂規硶銆傝繖閲岄潰鍐欑殑鏄痶okenPath銆?tokenPath璺熸枃浠剁郴緇熺殑瑙勫垯宸笉澶氥傜被浼?/fork1/fork2 榪欐牱鐨勩?br>
閭d箞錛屾庝箞鍒癴ork2涓嬬殑涓涓垎鏀痶oken 錛?br>
token鑷繁涔熸湁findToken榪欎釜鏂規硶錛屼笉鍚岀殑鏄疨rocessInstance鐨勬槸浠ootToken涓鴻搗鐐癸紝token鑷繁鐨勬槸浠ヨ嚜宸變負璧風偣銆傞偅涔堝彇鍒皌oken2涓嬮潰鐨勫垎鏀?br>
token2.findToken("token")
濡傛灉鏈夎繑鍥瀟oken錛屾病鏈夎繑鍥瀗ull


鑷充簬token鐨勫悕瀛楋紝鎴戝垰鎵嶆煡婧愮爜鎵嶅彂鐜幫紝鍙湁鍦‵ork鑺傜偣鎵嶄細緇檛oken璧嬩簣鍚嶅瓧銆傘傘?

閭d箞token2.findToken("token") 榪欓噷"token"閭i噷鏉?

鍛藉悕鐨勮鍒欙紝濡備笅銆傘?nbsp;

    String tokenName = null;
    
if ( transitionName != null ) {
      
if ( ! parent.hasChild( transitionName ) ) {
        tokenName 
= transitionName;
      }
 else {
        
int i = 2;
        tokenName 
= transitionName + Integer.toString( i );
        
while ( parent.hasChild( tokenName ) ) {
          i
++;
          tokenName 
= transitionName + Integer.toString( i );
        }

      }

    }
 else // no transition name
      int size = ( parent.getChildren()!=null ? parent.getChildren().size()+1 : 1 );
      tokenName 
= Integer.toString(size);
    }

    
return tokenName; 



榪欓噷"token"閭i噷鏉ワ紵榪欎釜token鍚嶅瓧錛屼綘鑷繁鍙互鏍規嵁鍛藉悕瑙勫垯寰楀埌 銆傜湅鍒拌繖閲屽簲璇ュ緢鏄庝簡浜?

token鐨勫懡鍚嶈鍒欙紱棣栧厛鏍規嵁transitionName鐨勫悕瀛楀懡鍚嶏紝榪欎釜transitionName鐨勫悕瀛楁槸浣犺嚜宸辯殑鍐欑殑浣犱笉鍙兘涓嶇煡閬撱?濡傛灉transitionName鐨勫悕瀛楅噸鍚嶄簡錛屽姞鑷劧鏁板尯鍒?褰撶劧錛屽鏋渢ransitionName娌℃湁鍚嶅瓧錛岀敤鍒嗘敮鐨勪釜鏁?1浣滀負鍚嶅瓧銆?

搴旇姣旇緝娓呮浜嗐?

PS錛氳繖涓槸qq鑱婂ぉ璁板綍鐨勬暣鐞嗙増錛屾墍浠ヨ璇濇瘮杈冭寮傘備負鐨勬槸璁板綍涓嬫潵閬垮厤蹇樿錛屼篃鎰熻阿緹ら噷鐨勬湅鍙嬨傚彂鐜頒簰鐩歌В鍐抽棶棰樻槸鎻愰珮姘村鉤鐨勪竴涓嵎寰勩傘?/p>

宸矙 2007-04-24 16:04 鍙戣〃璇勮
]]>
縐閫楃殑JBPMhttp://www.tkk7.com/sshwsfc/archive/2006/08/24/65446.html宸矙宸矙Thu, 24 Aug 2006 03:07:00 GMThttp://www.tkk7.com/sshwsfc/archive/2006/08/24/65446.htmlhttp://www.tkk7.com/sshwsfc/comments/65446.htmlhttp://www.tkk7.com/sshwsfc/archive/2006/08/24/65446.html#Feedback5http://www.tkk7.com/sshwsfc/comments/commentRss/65446.htmlhttp://www.tkk7.com/sshwsfc/services/trackbacks/65446.html
縐閫?銆傛棤涓敓鏈?/strong>

鐪嬪埌鏈鏍稿績鐨凧pdlXmlReader浠g爜鐪熷疄嬈插摥鏃犳唱錛屽鏋滃ソ濂界簿綆綺劇畝錛岃嚦灝戣兘韙㈡帀1/3鐨勪唬鐮併傝屽叾涓敋鑷蟲湁浜涙棤涓敓鏈夌殑浠g爜錛?br />
if聽(聽(actorId!=null)
聽聽聽聽聽聽聽聽聽聽聽
||聽(pooledActors!=null)聽
聽聽聽聽聽聽聽聽聽)聽
{
聽聽聽聽聽聽聽聽assignmentDelegation.setProcessDefinition(processDefinition);
聽聽聽聽聽聽聽聽assignmentDelegation.setClassName(
"org.jbpm.taskmgmt.assignment.ActorAssignmentHandler");
聽聽聽聽聽聽聽聽String聽configuration聽
="";
鎴戜滑鐪嬪埌錛屽鏋滅鍚堜箣鍓嶇殑鏉′歡錛屽氨鐢ㄤ唬鐞嗙被鏉ヤ唬鐞?span style="COLOR: #000000">org.jbpm.taskmgmt.assignment.ActorAssignmentHandler榪欎釜綾伙紝浣嗘槸鎵句簡濂藉崐澶╀篃娌℃湁鎵懼埌榪欎釜綾匯傘傘傘?闅鵑亾鏄鐢ㄦ埛鍦ㄨ嚜宸辯殑欏圭洰涓敤榪欎釜綾諱箞錛熻繕鏄負浜嗗吋瀹瑰師鏉ョ殑紼嬪簭錛岋紝灝辯畻鏄叾涓竴縐嶏紝浣嗘槸錛屽彲浣嗘槸錛岃繖涓潯浠舵牴鏈氨涓嶅彲鑳芥弧瓚籌紝涔熷氨鏄榪欐槸孌靛簾璇濓紝鑰屼笖榪樻棤涓敓鏈夌殑鍑烘潵涓狝ctorAssignmentHandler銆傘?br />
縐閫?銆傜敾铔囨坊瓚?/strong>

搴旇鏄垜鐨勫熀鏈姛涓嶉兘鎵庡疄錛屽疄鍦ㄦ槸楂樹笉鏄庣櫧涓嬮潰鐨勪唬鐮佸湪騫蹭粈涔堛傘傘?br />
聽聽publicvoid聽setActorId(String聽actorId)聽{
聽聽聽聽DefaultAuthenticationService聽authenticationService聽
=聽(DefaultAuthenticationService)聽services.getAuthenticationService();
聽聽聽聽DefaultAuthenticationService聽defaultAuthenticationService聽
=聽(DefaultAuthenticationService)聽authenticationService;
聽聽聽聽defaultAuthenticationService.setActorId(actorId);
聽聽}
鍏堝己鍒惰漿鎹㈡垚DefaultAuthenticationService錛岀劧鍚庡啀寮哄埗杞崲鎴怐efaultAuthenticationService銆傘傘傘?br />鑰屼笖榪欓噷榪欎箞璁捐鍩烘湰涓婂氨鎶奃efaultAuthenticationService瀹炵幇鐨凙uthenticationService鎺ュ彛鏅懼湪閭i噷浜嗭紝鏍規湰灝辨槸搴旇鐢ˋuthenticationService榪欎釜鎺ュ彛鏉ヨ璇濇墠瀵廣俲bpm鐨剆ervice璁捐鐨勬墿灞曟у緢寮猴紝鍙嚜宸遍厤鍒躲備絾濡傛灉榪欎箞鐢╯ervice鐨勮瘽錛屽啀鎬庝箞鎵╁睍涔熸病鐢ㄣ?br />
縐閫?銆傝帿鈥滃悕鈥濆叾濡?/strong>

Jbpm涓彉閲忕殑鍚嶅瓧鐪熺殑鑾悕鍏跺錛屽緢澶氭槑鏄庢槸Map鐨勭被鍨嬩粬鍙玿xList錛岃屼笉鏄疢ap鐨勭被鍨嬶紝浠栧嵈鍙玿xMap銆傝繖涓湴鏂規垜鐩鎬俊搴旇鏄兘浣撶幇鍑虹▼搴忓憳緙栧啓紼嬪簭鐨勪弗璋ㄦх殑鍦版柟錛岃孞bpm浣滅殑榪樹笉澶熷ソ銆?br />
縐閫?銆傚浐鑻ラ噾姹?/strong>

Jbpm鐨勬墿灞曟ц瘡絀垮緇堬紝浣嗘槸鍦ㄦ渶閲嶈鐨勬吵閬撶殑鎵╁睍涓婂嵈灝忓瀛愭皵璧鋒潵銆傜湅鐪嬫吵閬撶被浠g悊鐨勬墿灞曚唬鐮併?br />
if聽(expression!=null){
聽聽聽聽聽聽聽聽assignmentDelegation.setProcessDefinition(processDefinition);
聽聽聽聽聽聽聽聽assignmentDelegation.setClassName(
"org.jbpm.identity.assignment.ExpressionAssignmentHandler");
聽聽聽聽聽聽聽聽assignmentDelegation.setConfiguration(
"<expression>"+expression+"</expression>");
聽聽聽聽聽聽
聽聽聽聽}
鍐欑殑寰堟槑紜紝濡傛灉娉抽亾浣跨敤琛ㄨ揪寮忔潵琛ㄧず鐨勯偅涔堝氨鐢ㄤ唬鐞嗙被鏉ヤ唬鐞嗗鐞嗚〃杈懼紡銆傘傛垜鏈兂錛屽お濂戒簡錛屽啓鎴戣嚜宸辯殑琛ㄨ揪寮忥紝鐒跺悗浠g悊浜ょ粰Acegi鏉ユ牴鎹〃杈懼紡鍒嗛厤ActorId錛屼絾鏄紝鍙槸錛屼絾鍙槸銆備粬鐨勪唬鐞嗙被灞呯劧鏄啓姝葷殑錛屽啓寰楀氨鏄嚜宸辯殑java.identity鍖呴噷闈㈢殑涓滆タ錛屼笉鏄java.identity璁捐鐨勪笉濂斤紝浣嗘槸涓涓患鍚堢郴緇熺殑鐢ㄦ埛瑙掕壊綆$悊緋葷粺鏄笉鍙兘璺熺潃浣犵殑jbpm璧扮殑銆傚己琛岃鍔犲叆鐨刯ava.identity鐨勮璁℃湁鐐逛繚鎶よ嚜鎴戠殑鎰忔濓紝鐪熺殑鍥鴻嫢閲戞堡錛岃鎴戠粨鍚坅cegi鐨勬兂娉曞張鏄毦涓婂姞闅俱傦紙涓嶈繃榪樻槸鏈夊姙娉曠殑銆傚ぇ瀹惰嚜宸辨壘鎵劇湅錛夈?br />
縐閫?銆傚彛寰勪笉涓

鍙e緞涓嶄竴灝辨槸鎸囦袱涓▼搴忛儴鍒嗙殑緇撳悎涓嶄竴鑷淬傝繖縐嶄緥瀛愬緢澶氾紝鎴戜婦涓涓▼搴忓拰xsd鐨勫啿紿佺殑渚嬪瓙銆?br />Instantiator鏄痡bpm浠g悊閲岄潰涓涓瘮杈冧笉閿欑殑姒傚康銆備唬鐞嗗姛鑳戒箣涓鏄敓鎴愪唬鐞嗙殑綾葷殑瀹炰緥錛岃孖nstantiator鍒欐槸璐熻矗鐢熸垚瀹炰緥鐨勬満鍒訛紝榪欎釜Instantiator璁捐鐨勪笉閿欙紝鍙互鍦ㄩ厤鍒舵枃浠朵腑鐨刢onfig-type灞炴ф潵鎵╁睍銆傜湅紼嬪簭銆?br />
聽聽聽聽聽聽//聽find聽the聽instantiator
聽聽聽聽聽聽instantiator聽=聽(Instantiator)聽instantiatorCache.get(configType);
聽聽聽聽聽聽
if聽(instantiator聽==null)聽{
聽聽聽聽聽聽聽聽
//聽load聽the聽instantiator聽class
聽聽聽聽聽聽聽聽Class聽instantiatorClass聽=聽classLoader.loadClass(configType);
聽聽聽聽聽聽聽聽
//聽instantiate聽the聽instantiator聽with聽the聽default聽constructor
聽聽聽聽聽聽聽聽instantiator聽=聽(Instantiator)聽instantiatorClass.newInstance();
聽聽聽聽聽聽聽聽instantiatorCache.put(configType,聽instantiator);
聽聽聽聽聽聽}
榪欓噷鐨勮璁″緢浜烘у寲錛屽彲浠ユ牴鎹甤onfigType鏉ョ敤鑷繁鐨勬瀯閫犲櫒錛屼絾鏄痻sd鍗翠笉榪欎箞鎯熾?br />
聽聽聽聽聽聽<xs:attribute聽name="config-type"聽default="field">
聽聽聽聽聽聽聽聽
<xs:simpleType>
聽聽聽聽聽聽聽聽聽聽
<xs:restriction聽base="xs:string">
聽聽聽聽聽聽聽聽聽聽聽聽
<xs:enumeration聽value="field"/>
聽聽聽聽聽聽聽聽聽聽聽聽
<xs:enumeration聽value="bean"/>
聽聽聽聽聽聽聽聽聽聽聽聽
<xs:enumeration聽value="constructor"/>
聽聽聽聽聽聽聽聽聽聽聽聽
<xs:enumeration聽value="configuration-property"/>
聽聽聽聽聽聽聽聽聽聽
</xs:restriction>
聽聽聽聽聽聽聽聽
</xs:simpleType>
聽聽聽聽聽聽
</xs:attribute>
鍙互鐪嬪埌瀹冮檺鍒朵簡4縐嶇被鍨嬶紝鍒浣跨敤鑷繁鐨勬瀯閫犲櫒浜嗭紝灝辮繛浠栬嚜宸辯殑XmlInstantiator閮戒笉鍐嶈冭檻鑼冨洿涔嬪唴錛岀湡鏄ぇ涔夌伃浜插憖銆傘?br />
鏋勯犲櫒鏉ヨ繖閲岀殑浣滅敤寰堝ぇ錛屾垜鍐欎簡鑷繁鐨剆pring鏋勯犲櫒錛屾瀯閫犵殑鏃跺欎嬌鐢╞eanFactory鏉ユ瀯閫狅紝榪欐牱灝辯畻鏄瓨鍦ㄦ暟鎹簱閲岄潰鐨刢lass涔熻兘褰撲綔spring鐨刡ean鏉ュ鐞嗐備絾鏄鏋滅敤xsd鐨勮瘽灝變細瀵艱嚧浜ら獙閿欒錛屾墍浠ョ儲鎬ф妸xsd鍘繪帀浜嗭紝榪樺ソ涓鍒囨甯革紝灝辨槸鎰熻鍒壄鐐廣?br />
縐閫桸銆傘傘?鑳藉鐪嬪緱鍑烘潵Jbpm闇瑕佹彁楂樼殑鍦版柟榪樺緢澶氥備絾鏄繖浜涢棶棰樺簲璇ユ槸涓浜涘紑鍙戜漢鍛樼殑灝忕枏蹇斤紝鐩鎬俊鍦ㄤ互鍚庣殑鐗堟湰涓彲浠ユ敼榪涖備笉綆″啀鎬庝箞縐閫楋紝Jbpm鍦ㄥ伐浣滄祦涓粛鐒朵繚鏈夌潃寮哄姴鐨勫湴浣嶏紝瀵笲PM妯″瀷鐨勫疄鐜頒篃浣滅殑鏈涓哄叏闈€傝宩bpm鐨刾ar鐑儴緗插拰IDE涔熸槸鏁翠釜緋葷粺涓殑涓ゅぇ浜偣錛岃繖浜涗紭鐐歸兘鏄笉鍙笉鎻愮殑錛屾墍浠ユ垜浠嶆棫鏀寔Jbpm錛屽笇鏈涗粬鑳芥洿鍔犺繀閫熺殑鍙戝睍澹ぇ璧鋒潵銆傘傘傘?br />
PS錛氭枃涓敊璇箣澶勮繕鏈涘ぇ瀹舵寚鍑猴紝鎴戝笇鏈涙湁浜涒滅閫椻濇槸鎴戣嚜宸辯閫椾簡銆?img src ="http://www.tkk7.com/sshwsfc/aggbug/65446.html" width = "1" height = "1" />

宸矙 2006-08-24 11:07 鍙戣〃璇勮
]]>
鍦ˋcegi涓嬌鐢ˋCLhttp://www.tkk7.com/sshwsfc/archive/2006/06/17/53419.html宸矙宸矙Fri, 16 Jun 2006 16:20:00 GMThttp://www.tkk7.com/sshwsfc/archive/2006/06/17/53419.htmlhttp://www.tkk7.com/sshwsfc/comments/53419.htmlhttp://www.tkk7.com/sshwsfc/archive/2006/06/17/53419.html#Feedback4http://www.tkk7.com/sshwsfc/comments/commentRss/53419.htmlhttp://www.tkk7.com/sshwsfc/services/trackbacks/53419.html
棣栧厛瑕佺悊瑙cegi閲岄潰Voter鐨勬蹇碉紝ACL姝f槸鍦ㄤ竴涓猇oter涓婃墿灞曡搗鏉ョ殑銆傜幇鏉ョ湅涓涓婣clVoter鐨勯厤緗?br />
聽聽聽聽<bean聽id="aclBeanReadVoter"聽class="org.acegisecurity.vote.BasicAclEntryVoter">
聽聽聽聽聽聽聽聽
<property聽name="processConfigAttribute">
聽聽聽聽聽聽聽聽聽聽聽聽
<value>ACL_READ</value>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽聽聽聽聽
<property聽name="processDomainObjectClass">
聽聽聽聽聽聽聽聽聽聽聽聽
<value>org.springside.modules.security.acl.domain.AclDomainAware</value>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽聽聽聽聽
<property聽name="aclManager">
聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="aclManager"/>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽聽聽聽聽
<property聽name="requirePermission">
聽聽聽聽聽聽聽聽聽聽聽聽
<list>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="org.acegisecurity.acl.basic.SimpleAclEntry.ADMINISTRATION"/>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="org.acegisecurity.acl.basic.SimpleAclEntry.READ"/>
聽聽聽聽聽聽聽聽聽聽聽聽
</list>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>
  1. ACL_READ鎸囩殑鏄繖涓猇oter瀵瑰摢浜汼ecurityConfig璧蜂綔鐢紝鎴戜滑鍙互鎶?span style="COLOR: #000000">ACL_READ閰嶇疆鍦ㄦ兂瑕佹嫤鎴殑Method涓娿傛瘮鏂硅鎴戜滑瑕佹嫤鎴猺eadOrder榪欎釜鏂規硶錛屼互瀹炵幇ACL鎺у埗錛屽彲浠ヨ繖鏍烽厤緗?br />orderManager.readOrder=ACL_READ
  2. processDomainObjectClass鎸囧嚭鍝簺DomainObject鏄榪涜ACL鏍¢獙鐨勩?/font>
  3. aclManager鏄竴涓瘮杈冮噸瑕佺殑姒傚康錛屼富瑕佽礋璐e湪鏉冮檺鍒楄〃涓牴鎹敤鎴峰拰DomainObject鍙栧緱acl鍒楄〃銆?/font>
  4. requirePermission鎸囧嚭瑕佽繘琛岃繖涓搷浣滃繀欏誨叿澶囩殑acl鏉冮檺錛屾瘮鏂硅read鎿嶄綔灝卞繀欏繪湁ADMINISTRATION鎴朢EAD涓や釜鏉冮檺銆?/font>

鍏跺疄鏁翠釜榪囩▼鐪嬩笅鏉ユ瘮杈冩竻鏅幫紝涓嬮潰鏉ョ湅涓涓婣clManager濡備綍閰嶇疆銆?br />

聽聽聽聽<!--聽=========聽ACCESS聽CONTROL聽LIST聽LOOKUP聽MANAGER聽DEFINITIONS聽=========聽-->

聽聽聽聽
<bean聽id="aclManager"聽class="org.acegisecurity.acl.AclProviderManager">
聽聽聽聽聽聽聽聽
<property聽name="providers">
聽聽聽聽聽聽聽聽聽聽聽聽
<list>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="basicAclProvider"/>
聽聽聽聽聽聽聽聽聽聽聽聽
</list>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>

聽聽聽聽
<bean聽id="basicAclProvider"聽class="org.acegisecurity.acl.basic.BasicAclProvider">
聽聽聽聽聽聽聽聽
<property聽name="basicAclDao">
聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="basicAclExtendedDao"/>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>

聽聽聽聽
<bean聽id="basicAclExtendedDao"聽class="org.acegisecurity.acl.basic.jdbc.JdbcExtendedDaoImpl">
聽聽聽聽聽聽聽聽
<property聽name="dataSource">
聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽bean="dataSource"/>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>

寰堟槑鏄続CLManager緇ф壙浜咥cegi鐨勪竴璐鏍鹼紝Provider鍙互鎻愪緵澶氱鍙栧緱ACL璁塊棶鍒楄〃鐨勯斿緞錛岄粯璁ょ殑鏄敤basicAclProvider鍦ㄦ暟鎹簱涓彇寰椼傛棦鐒舵彁鍒頒簡鏁版嵁搴擄紝閭f垜浠氨鏉ョ湅涓涓婣cegi榛樿鎻愪緵鐨凙CL鍦ㄦ暟鎹簱閲岀殑淇濆瓨琛ㄧ粨鏋勶細

CREATETABLE聽acl_object_identity聽(
id聽
IDENTITYNOTNULL,
object_identity聽VARCHAR_IGNORECASE(
250)聽NOTNULL,
parent_object聽
INTEGER,
acl_class聽VARCHAR_IGNORECASE(
250)聽NOTNULL,
CONSTRAINT聽unique_object_identity聽UNIQUE(object_identity),
FOREIGNKEY聽(parent_object)聽REFERENCES聽acl_object_identity(id)
);
CREATETABLE聽acl_permission聽(
id聽
IDENTITYNOTNULL,
acl_object_identity聽
INTEGERNOTNULL,
recipient聽VARCHAR_IGNORECASE(
100)聽NOTNULL,
mask聽
INTEGERNOTNULL,
CONSTRAINT聽unique_recipient聽UNIQUE(acl_object_identity,聽recipient),
FOREIGNKEY聽(acl_object_identity)聽REFERENCES聽acl_object_identity(id)
);
  1. acl_object_identity琛ㄥ瓨鏀句簡鎵鏈夊彈淇濇姢鐨刣omainObject鐨勪俊鎭傚叾涓璷bject_identity瀛楁淇濆瓨浜哾omainObject鐨刢lass鍜宨d錛岄粯璁ょ殑淇濆瓨鏍煎紡鏄細domainClass:domainObjectId銆?/li>
  2. acl_permission聽灝辨槸ACL鏉冮檺鍒楄〃浜嗭紝recipient聽鏄敤鎴鋒垨瑙掕壊淇℃伅錛宮ask琛ㄧず浜嗚繖涓敤鎴鋒垨瑙掕壊瀵硅繖涓猟omainObject鐨勮闂潈闄愩傛敞鎰忚繖浜涗俊鎭殑淇濆瓨鏍煎紡閮芥槸鍙互鏍規嵁鑷繁鐨勯渶瑕佹敼鍙樼殑銆?/li>

榪欐牱璇誨彇鍜屽垹闄ょ殑鏃跺橝cegi灝辮兘寰堝ソ鐨勫畬鎴愭嫤鎴伐浣滐紝浣嗘槸璇誨彇涓涓狶ist鐨勬椂鍊欙紝濡備綍鎵嶈兘鎶婅鐢ㄦ埛涓嶈兘鎿嶄綔鐨刣omainObject鍓旈櫎鎺夊憿錛熻繖灝遍渶瑕乤fterInvocationManager鏉ュ畬鎴愯繖涓伐浣溿備笅闈㈡潵鐪嬩笅閰嶇疆錛?br />

聽聽聽聽<!--聽==============聽"AFTER聽INTERCEPTION"聽AUTHORIZATION聽DEFINITIONS聽===========聽-->

聽聽聽聽
<bean聽id="afterInvocationManager"聽class="org.acegisecurity.afterinvocation.AfterInvocationProviderManager">
聽聽聽聽聽聽聽聽
<property聽name="providers">
聽聽聽聽聽聽聽聽聽聽聽聽
<list>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="afterAclCollectionRead"/>
聽聽聽聽聽聽聽聽聽聽聽聽
</list>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>
聽聽聽聽
<!--聽Processes聽AFTER_ACL_COLLECTION_READ聽configuration聽settings聽-->
聽聽聽聽
<bean聽id="afterAclCollectionRead"聽class="org.acegisecurity.afterinvocation.BasicAclEntryAfterInvocationCollectionFilteringProvider">
聽聽聽聽聽聽聽聽
<property聽name="aclManager">
聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="aclManager"/>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽聽聽聽聽
<property聽name="requirePermission">
聽聽聽聽聽聽聽聽聽聽聽聽
<list>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="org.acegisecurity.acl.basic.SimpleAclEntry.ADMINISTRATION"/>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<ref聽local="org.acegisecurity.acl.basic.SimpleAclEntry.READ"/>
聽聽聽聽聽聽聽聽聽聽聽聽
</list>
聽聽聽聽聽聽聽聽
</property>
聽聽聽聽
</bean>

afterAclCollectionRead浼氬湪鎷︽埅鐨勬柟娉曟墽琛岀粨鏉熺殑鏃跺欐墽琛屻備富瑕佺殑浣滅敤灝辨槸鍦ㄨ繑鍥炵殑List涓尐涓鏌omainObject鐨勬搷浣滄潈闄愶紝鐒跺悗鏍規嵁requirePermission鏉ュ墧闄や笉絎﹀悎鐨刣omainObject銆?/font>

宸矙 2006-06-17 00:20 鍙戣〃璇勮
]]>
鍏充簬Drools鐨勫垵姝ワ紝榪烽唹鐘舵佽璇?/title><link>http://www.tkk7.com/sshwsfc/archive/2006/05/28/48622.html</link><dc:creator>宸矙</dc:creator><author>宸矙</author><pubDate>Sun, 28 May 2006 12:53:00 GMT</pubDate><guid>http://www.tkk7.com/sshwsfc/archive/2006/05/28/48622.html</guid><wfw:comment>http://www.tkk7.com/sshwsfc/comments/48622.html</wfw:comment><comments>http://www.tkk7.com/sshwsfc/archive/2006/05/28/48622.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.tkk7.com/sshwsfc/comments/commentRss/48622.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/sshwsfc/services/trackbacks/48622.html</trackback:ping><description><![CDATA[榪欎袱澶╁湪<a class="" title="springside" href="/sshwsfc/admin/www.springside.org.cn" target="_blank">springside</a>鍙楃櫧琛g殑褰卞搷寮濮嬪叧娉╠rools銆傝浠栨槸騫蟲皯鐨勮剼鏈紩鎿庝竴鐐歸兘涓嶅亣錛屼嬌鐢ㄨ搗鏉ユ瀬涓烘柟渚匡紝鏈潵浠ヤ負緗戜笂搴旇鏈変笉灝戠殑璁茶В浜嗭紝浣嗘槸鍙戠幇鍑犱箮鍏ㄦ槸閽堝2.0鐗堟湰璁茶В鐨勩傝宒rools鍔犲叆jboss鍚庢湁浜嗚川鐨勫彉鍖栵紝涓嬮潰鏉ョ湅涓涓嬫渶鏂扮殑3.0浣跨敤璧鋒潵鏈変粈涔堜笉鍚岋細<br /><br />棣栧厛鎴戜滑瑕佸彇寰梤ule錛岃鍒欏紩鎿庛佽鍒欏紩鎿庯紝鍙栧緱瑙勫垯鏄繀瑕佺殑銆?br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id="Codehighlighter1_52_1040_Open_Image" onclick="this.style.display='none'; Codehighlighter1_52_1040_Open_Text.style.display='none'; Codehighlighter1_52_1040_Closed_Image.style.display='inline'; Codehighlighter1_52_1040_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_52_1040_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_52_1040_Closed_Text.style.display='none'; Codehighlighter1_52_1040_Open_Image.style.display='inline'; Codehighlighter1_52_1040_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽RuleBase聽readRule()聽</span><span style="COLOR: #0000ff">throws</span><span style="COLOR: #000000">聽Exception聽</span><span id="Codehighlighter1_52_1040_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_52_1040_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">read聽in聽the聽source</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽Reader聽source聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽InputStreamReader(聽DroolsTest.</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">.getResourceAsStream(聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/aclcreat.drl</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽)聽);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">optionally聽read聽in聽the聽DSL聽(if聽you聽are聽using聽it).</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽Reader聽dsl聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽InputStreamReader(聽DroolsTest.</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">.getResourceAsStream(聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/mylang.dsl</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽)聽);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">Use聽package聽builder聽to聽build聽up聽a聽rule聽package.<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">An聽alternative聽lower聽level聽class聽called聽"DrlParser"聽can聽also聽be聽used<img src="http://www.tkk7.com/images/dot.gif" /></span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽PackageBuilder聽builder聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽PackageBuilder();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">this聽wil聽parse聽and聽compile聽in聽one聽step<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">NOTE:聽There聽are聽2聽methods聽here,聽the聽one聽argument聽one聽is聽for聽normal聽DRL.<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">builder.addPackageFromDrl(聽source聽);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">Use聽the聽following聽instead聽of聽above聽if聽you聽are聽using聽a聽DSL:</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽builder.addPackageFromDrl(聽source,聽dsl聽);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">get聽the聽compiled聽package聽(which聽is聽serializable)</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽Package聽pkg聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽builder.getPackage();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">add聽the聽package聽to聽a聽rulebase聽(deploy聽the聽rule聽package).</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽RuleBase聽ruleBase聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽RuleBaseFactory.newRuleBase();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ruleBase.addPackage(聽pkg聽);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽ruleBase;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽聽聽聽}</span></span></div><br />榪欓噷鍦ㄥ畼鏂圭殑渚嬪瓙鍩虹涓婂仛浜嗚嚜宸辯殑瀹炵幇(鍏跺疄浠涔堥兘娌℃敼)銆?br /><br />鍙互鐪嬪埌錛岀涓姝ユ槸鍙栧緱鏂囦歡IO錛岃繖涓枃浠跺氨鏄垜浠鍐欏緱瑙勫垯鑴氭湰錛岃繖涓瓑涓嬪啀璇達紝澶у鍙互鍋囪薄涓涓嬭剼鏈槸涓粈涔堟牱瀛愶紝鐜板湪鍙鎬庝箞鍦ㄧ▼搴忎腑鍙栧緱Rule銆?br />鎺ヤ笅鏉ワ紝鏄嬌鐢˙uilder鍙栧緱涓涓猵ackage錛屾棦鐒禸uilder閮戒笂鏉ヤ簡璇存槑鑳借緭鍏ョ殑鑴氭湰涓嶆涓涓簡銆傜敤addPackageFromDrl鍚戣繖涓猙uilder鍘嬬緝鏈洪噷闈㈣緭鍏ヨ剼鏈紝褰撶劧榪樻湁鍙﹀涓涓枃浠禿sl錛岃繖涓悗闈㈠啀璇淬傚埄鐢╞uilder鍙栧緱package銆?br /><br />鏈鍚庢瀯閫犱竴涓狟aseRule錛屽埄鐢‵actory鍙栧緱鐨勬椂鍊欐槸鏈夐夋嫨鐨勶紝RuleBaseFactory.newRuleBase(int type)鍏朵腑鐨則ype鍙互涓轟笉鍚岀殑Algorithm錛屾湁RETE鍜孡eaps 涓ょ銆傚榪欎袱縐岮lgorithm鐨勫叿浣撹В閲婂彲浠ュ弬鐪?<a >http://citeseer.ist.psu.edu/context/505087/0</a>聽鎴栨槸 drools鐨勬枃妗o紝鍏跺疄鎴戜篃涓嶅お鎳傘?br /><br />鎶婂垰鎵嶇殑package娣誨埌ruleBase閲岄潰涓涓猂ule灝卞ぇ鍔熷憡鎴愪簡銆?br /><br />鎺ヤ笅鏉ョ湅鐪嬫庝箞鎵ц瀹冿細<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽WorkingMemory聽workingMemory聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽ruleBase.newWorkingMemory();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">go聽!</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽Order聽order聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Order();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽order.setId(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽order.setName(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">testOrder</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽order.setTotlePrice(</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽User聽user聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽User();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user.setName(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">testAdmin</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user.setAuth(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">USER_ADMIN</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽List</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">String</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽roles聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽ArrayList</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">String</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽roles.add(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ADMIN</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user.setRoles(roles);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽User聽user1聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽User();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user1.setName(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">testUser</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user1.setAuth(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">USER_USER</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽List</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">String</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽roles1聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽ArrayList</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">String</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">();<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽roles1.add(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">USER</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽user1.setRoles(roles1);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽workingMemory.assertObject(order);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽workingMemory.assertObject(user);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽workingMemory.assertObject(user1);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽workingMemory.fireAllRules();聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽List</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">AclEntry</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽acls聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽workingMemory.getObjects(AclEntry.</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">);</span></div><br />鐢╮uleBase鐢熸垚涓涓猈orkingMemory錛學orkingMemory鏄疪ule鐨勬墽琛屽紩鎿庯紝瑁呰澆rule鍜屼簨瀹?寰堥噸瑕佺殑姒傚康)錛屽茍緇熶竴鎵ц浠栦滑銆傛帴涓嬫潵鎴戝氨鍦ㄥ啓鎴戠殑浜嬪疄錛屼簨瀹炴槸浠涔堬紝浜嬪疄灝辨槸浠婂ぉ鏄粈涔堝ぉ錛熻鍗曟諱環澶氬皯錛熷氨鏄鍛婅瘔鑴氭湰鐨刯ava瀵硅薄銆傜劧鍚庢妸浜嬪疄涓涓鍘嬪叆WorkingMemory榪欎釜澶у帇緙╂満銆傚氨鐬уソ鍚с?<br /><br />OK鍙互鎵ц浜嗭紝fireAllRules!錛堢湡TM錛孋OOL鐨勫悕瀛楋級銆傚綋鐒舵湁鍏ㄩ儴鎵ц灝辨湁閮ㄥ垎鎵ц銆備綘鍙互鎶婅鍒欏垎緇勶紝鐒跺悗鎸夌粍鎵ц錛屾垨鏄寚瀹歳ule鐨勫悕瀛楁潵鎵ц(榪欓噷榪樻槸澶у鑷繁鐪嬬湅鍚?銆?br /><br />錛燂紵錛熺┒绔熸墽琛屼簡浠涔堛傚綋鐒舵槸鎵ц浜嗘垜浠殑鑴氭湰錛岃剼鏈湪榪欓噷銆佺湅鐪嬪畠鍙笉鏄痻ml浜嗭細<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">#created聽on:聽</span><span style="COLOR: #000000">2006</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">5</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">19</span><span style="COLOR: #000000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">package</span><span style="COLOR: #000000">聽com.sample;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />#list聽any聽</span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽classes聽here.<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽com.sample.domain.Order;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽com.sample.domain.User;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽com.sample.AclEntry;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />#expander聽mylang.dsl<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />#declare聽any聽global聽variables聽here<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />rule聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Order聽TotlePrice聽more聽than聽$1000</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽when<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽#conditions<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽$order聽:聽Order(聽totlePrice聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1000</span><span style="COLOR: #000000">聽)<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽$user聽:聽User(聽roles聽contains聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ADMIN</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽,聽$userName聽:聽name)<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽then聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽#actions<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽System.out.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">More聽Than</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">assert</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽AclEntry($order,聽$user,聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">));<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />end<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />rule聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Order聽TotlePrice聽less聽or聽equl聽than聽$1000</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽聽聽聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽when<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽#conditions<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽$order聽:聽Order(聽totlePrice聽</span><span style="COLOR: #000000"><=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1000</span><span style="COLOR: #000000">聽)<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽$user聽:聽User(聽$userName聽:聽name聽)<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽then聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽#actions<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽System.out.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Less聽Than</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">assert</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽AclEntry($order,聽$user,聽</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">));<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />end</span></div><br />姣忎竴涓猺ule灝辨槸涓涓鍒欙紝鎵鏈夌殑浜嬪疄瑕佷竴涓榪囦竴閬嶈繖浜涜鍒欍倃hen鏄鍒欐彁鍑虹殑鏉′歡錛屽鏋滃摢涓簨瀹炵鍚堣繖涓潯浠訛紝灝辮繘鍏hen鐨勭幆鑺傦紝榪涜鐩稿簲鐨勫鐞嗐?br /><br />鍒嗘瀽涓涓嬫潯浠訛細$order聽:聽Order(聽totlePrice聽<span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1000</span><span style="COLOR: #000000">聽)銆備竴鐪嬪氨鐭ラ亾鏄諱環瓚呰繃1000鐨勮鍗曘?order鏄妸榪欎釜璁㈠崟閭﹀畾錛屽悗闈㈠彲浠ヤ嬌鐢ㄣ?br />鍒嗘瀽涓涓媡hen錛毬燬ystem.out.println灝變笉瑙i噴浜嗐?span style="COLOR: #0000ff">assert</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽AclEntry($order,聽$user,聽</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">)); 榪欓噷鐨刟ssert鐨勬剰涔夊氨鏄憡璇塛orkingMemory涓涓簨瀹烇紝鍏跺疄璺熷墠闈㈢殑鍔犲叆浜嬪疄涓涓亾鐞嗐傛墦涓瘮鏂癸紝濡傛灉鏈夐棯鐢碉紝閭d箞灝辨湁闆楓?br /><br />榪欐牱璧板畬涓涓猺ule鍚庡ぇ瀹跺緢瀹規槗鍙戠幇錛屽叾瀹炴槸鏍規嵁璁㈠崟鍜岀敤鎴風殑瑙掕壊涓嶅悓浜х敓浜嗕笉鍚岀殑acl錛岀劧鍚庢垜瑕佹嬁鍒拌繖浜涚敱浜嬪疄寰楀埌鐨勪簨瀹炪?br /><br /></span></span><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">List</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">AclEntry</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽acls聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽workingMemory.getObjects(AclEntry.</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">);</span></div>榪欐牱灝辮兘鍦╳orkingMemory閲岄潰鎺忓嚭鎴戜滑闇瑕佺殑浜嬪疄鏉ワ紝鏂伴矞鍑虹倝鐨勫摝銆?br /><br />鐩稿綋綺楃暐鐨勮浜嗕竴涓媎rools錛岀洰鐨勬槸甯屾湜澶у閮芥潵浜嗚В涓涓嬶紝鍏卞悓瀛︿範銆?img src ="http://www.tkk7.com/sshwsfc/aggbug/48622.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/sshwsfc/" target="_blank">宸矙</a> 2006-05-28 20:53 <a href="http://www.tkk7.com/sshwsfc/archive/2006/05/28/48622.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://jiajuco.com" target="_blank">eeuss免费影院</a>| <a href="http://vv848.com" target="_blank">色妞WWW精品免费视频</a>| <a href="http://bentuxinli.com" target="_blank">国产一区二区三区免费</a>| <a href="http://zhuanjiao521.com" target="_blank">永久黄色免费网站</a>| <a href="http://dgyinhezy.com" target="_blank">国产一区二区三区在线观看免费 </a>| <a href="http://ax445.com" target="_blank">美女视频黄是免费的网址</a>| <a href="http://oakuu.com" target="_blank">免费一级黄色毛片</a>| <a href="http://meinvtaotu.com" target="_blank">亚洲国产福利精品一区二区</a>| <a href="http://8568008.com" target="_blank">无码的免费不卡毛片视频</a>| <a href="http://www-01313.com" target="_blank">无码av免费毛片一区二区</a>| <a href="http://8mav958.com" target="_blank">亚洲制服丝袜精品久久</a>| <a href="http://456jjj.com" target="_blank">成人性生交视频免费观看</a>| <a href="http://wwwbi757.com" target="_blank">亚洲高清在线播放</a>| <a href="http://tmg-beelen.com" target="_blank">一区二区三区在线观看免费</a>| <a href="http://yaku100.com" target="_blank">免费看的成人yellow视频</a>| <a href="http://blbkl.com" target="_blank">亚洲精品免费在线视频</a>| <a href="http://woaianli.com" target="_blank">光棍天堂免费手机观看在线观看</a>| <a href="http://maiertejx.com" target="_blank">男人的天堂亚洲一区二区三区 </a>| <a href="http://cnpc1002.com" target="_blank">亚洲AV美女一区二区三区</a>| <a href="http://pgb168.com" target="_blank">免费无码又爽又刺激高潮视频</a>| <a href="http://011107.com" target="_blank">亚洲午夜日韩高清一区</a>| <a href="http://dwj28.com" target="_blank">色欲aⅴ亚洲情无码AV</a>| <a href="http://53ggk.com" target="_blank">四虎永久在线精品免费网址 </a>| <a href="http://788qj.com" target="_blank">亚洲AV无码专区在线亚 </a>| <a href="http://wangdei.com" target="_blank">麻花传媒剧在线mv免费观看</a>| <a href="http://huahui1866.com" target="_blank">亚洲国产精品一区二区三区在线观看</a>| <a href="http://5gz0z.com" target="_blank">久久精品视频免费播放</a>| <a href="http://cc19123.com" target="_blank">亚洲一区无码中文字幕</a>| <a href="http://jaubus.com" target="_blank">国产99久久久国产精免费</a>| <a href="http://51ruilon.com" target="_blank">香蕉蕉亚亚洲aav综合</a>| <a href="http://yongyihongze.com" target="_blank">黄网站色在线视频免费观看</a>| <a href="http://bxd888.com" target="_blank">在线免费观看亚洲</a>| <a href="http://pohezi.com" target="_blank">一级毛片在线免费看</a>| <a href="http://4388x4.com" target="_blank">久久精品国产亚洲AV麻豆王友容</a>| <a href="http://as5566.com" target="_blank">成人网站免费大全日韩国产</a>| <a href="http://6f2igoa4.com" target="_blank">久久精品国产精品亚洲人人 </a>| <a href="http://91tapp.com" target="_blank">日韩亚洲国产二区</a>| <a href="http://xxx2222.com" target="_blank">久草免费手机视频</a>| <a href="http://srztw.com" target="_blank">国产成人精品久久亚洲高清不卡 </a>| <a href="http://yongyihongze.com" target="_blank">亚洲国产成人久久99精品</a>| <a href="http://6132423.com" target="_blank">国产中文字幕免费</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>