Update of /cvsroot/cobricks/cobricks2/web/agent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5173/web/agent Added Files: updateRules.html index.html.en searchRules.html updateRules2.html deleteRules.html addConditions.html completeRule.html addRule.html createRule.html succ.html searchRules2.html Log Message: Agent Web --- NEW FILE: completeRule.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) $agentPresenter.disp_Rule() $agentPresenter.textFieldToHTML($result) $agentPresenter.addResultFromEdit($result) <input type="hidden" name="flag" value="true"> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: updateRules2.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="updateRules.html">Update Rules</a></em> <h1>Cobricks-2 - Rules Updating</h1> #if($submit=="update this condition") $agentPresenter.updateConditionOfRule($userId,$ruleid,$conid,$domain,$action,$creator,$sourceCom,$field1,$con1,$value1,$field2,$con2,$value2,$field3,$con3,$value3,$field4,$con4,$value4,$field5,$con5,$value5) #end #if($submit=="sendmail") $agentPresenter.updateActionEmailofRule($userId,$ruleid,$acID,$toUser,$subject,$TArea) #end #if($submit=="updateMsg") #if(($agentPresenter.userExist($toUser)==true)&&($agentPresenter.isInteger($priority)==true)) $agentPresenter.updateActionMessageToRule($userId,$ruleid,$acID,$toUser,$priority,$subject,$TArea) #else $agentPresenter.judge($agentPresenter.userExist($toUser),$agentPresenter.isInteger($priority)) #end #end #if($submit=="sendAnno") $agentPresenter.updateActionAnnotationToRule($userId,$ruleid,$acID,$title,$content,$rating,$language) #end #if($submit=="sendAttr") #if(($agentPresenter.domainCheck($objectName)==true)&&(($agentPresenter.isInteger($object)==true)||($agentPresenter.objectIsEmpty($object)==true))) $agentPresenter.updateActionAttributeToRule($userId,$ruleid,$acID,$objectName,$objectID,$aName,$value) #else #if($agentPresenter.domainCheck($objectName)==false) $agentPresenter.domainCheck($objectName) $agentPresenter.judgeDomain($agentPresenter.domainCheck($objectName)) #else $agentPresenter.judge($agentPresenter.isInteger($objectID),true) #end #end #end #if($submit=="sendRat") #if($agentPresenter.isInteger($rating)==true) $agentPresenter.updateActionRatingToRule($userId,$ruleid,$acID,$rating) #else $agentPresenter.judge($agentPresenter.isInteger($rating),true) #end #end #if($submit=="empty") $agentPresenter.showUpdateRule($userId,$update) #else $agentPresenter.showUpdateRule($userId,$ruleid) #end <table><tr> <input type="hidden" name="_languages" value="${lg}"/> <input type="hidden" name="agentclass" value="${agentclass}"/> <input type="hidden" name="cmd" value="searchRules"/> <input type="hidden" name="cmd.success" value="$contextPath/agent/updateRules.html"/> <input type="hidden" name="cmd.error" value="$contextPath/agent/updateRules.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"/> </tr> </table> </p> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: index.html.en --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a></em> <h1>Agent Component</h1> <!--The Item Component is responsible for managing item data objects. As all Cobricks data objects, item data objects are defined based on item classes. The <a href="$contextPath/ADMIN/org.cobricks.Agent/ontology.html">available item classes</a> can be accessed in the Item Component Admin user interface.--> <input type="hidden" name="select" value="true"> <h3><a href="createRule.html?flag=true">Create new Rules</a></h3> <h3><a href="searchRules.html">Search Rules</a></h3> <h3><a href="updateRules.html">Update Rules</a></h3> <h3><a href="deleteRules.html">Delete Rules</a></h3> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: searchRules.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="searchRules.html">Search Rules</a></em> #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <h1>Cobricks-2 - Rules Searching</h1> #set ( $auth = $agentPresenter.checkPermission($userId) ) #if ( $auth != "true" ) <div class="error">You do not have the access permission to create a rule of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else $agentPresenter.getRulesForUser($userId) <table><tr> <input type="hidden" name="_languages" value="${lg}"/> <input type="hidden" name="agentclass" value="${agentclass}"/> <input type="hidden" name="cmd" value="searchRules"/> <input type="hidden" name="cmd.success" value="$contextPath/agent/searchRules.html"/> <input type="hidden" name="cmd.error" value="$contextPath/agent/searchRules.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"/> </tr> </table> </p> </form> #end $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: succ.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) $agentPresenter.addRuleToDB($userId) $agentPresenter.disp_Rule() $agentPresenter.initRule() $agentPresenter.successfull() $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: addConditions.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) #set ($result=$agentPresenter.getResultType()) #set ($fl="1") #if ( $result=="Send Email" ) $agentPresenter.addActionEmailToRule($toUser,$subject,$TArea) $agentPresenter.addRuleToDB($userId) #end #if ( $result=="Send Message" ) #if(($agentPresenter.userExist($toUser)==true)&&($agentPresenter.isInteger($priority)==true)) $agentPresenter.addActionMessageToRule($toUser,$priority,$subject,$TArea) $agentPresenter.addRuleToDB($userId) #else $agentPresenter.judge($agentPresenter.userExist($toUser),$agentPresenter.isInteger($priority)) #end #end #if ( $result=="Set Attribute" ) #if(($agentPresenter.domainCheck($objectName)==true)&&(($agentPresenter.isInteger($object)==true)||($agentPresenter.objectIsEmpty($object)==true))) $agentPresenter.addActionAttributeToRule($objectName,$objectID,$aName,$value) $agentPresenter.addRuleToDB($userId) #else #if($agentPresenter.domainCheck($objectName)==false) $agentPresenter.domainCheck($objectName) $agentPresenter.judgeDomain($agentPresenter.domainCheck($objectName)) #else $agentPresenter.judge($agentPresenter.isInteger($objectID),true) #end #end #end #if ( $result=="Set Annotation" ) $agentPresenter.addActionAnnotationToRule($title,$content,$rating,$language) $agentPresenter.addRuleToDB($userId) #end #if ( $result=="Set Rating" ) #if($agentPresenter.isInteger($annoID)==true) $agentPresenter.addActionRatingToRule($annoID,$rating) $agentPresenter.addRuleToDB($userId) #else $agentPresenter.judge($agentPresenter.isInteger($annoID),true) #end #end #if($agentPresenter.judge($result)) $agentPresenter.judge($agentPresenter.judge($result),true) #end $agentPresenter.disp_Rule() $agentPresenter.initRule() <h2>userId is:</h2> $userId <form action="addRule.html" method="post" > <h1><i>I don't want to add any other condition.</i></h1><br> <input type="submit" name=complete value="Click here to complete this rule"> <input type="hidden" name=ruleflag value=true> </form> <form action="completeRule.html" method="post"> <h2>result:</h2> <select name=result> <option>Send Email <option>Send Message <option>Set Attribute <option selected>Set Annotation <option>Set Rating </select><p> <table> <tr> <td><input type="submit" value="Add Rule"/></td> <input type="hidden" name="flag" value="true"> </tr></table> </form> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: addRule.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) #set ($result=$agentPresenter.getResultType()) #set ($fl="1") #if ( $result=="Send Email" ) $agentPresenter.addActionEmailToRule($toUser,$subject,$TArea) #if($ruleflag=="false") $agentPresenter.addNewAction() #end #end #if ( $result=="Send Message" ) #if(($agentPresenter.userExist($toUser)==true)&&($agentPresenter.isInteger($priority)==true)) $agentPresenter.addActionMessageToRule($toUser,$priority,$subject,$TArea) #if($ruleflag=="false") $agentPresenter.addNewAction() #end #else $agentPresenter.judge($agentPresenter.userExist($toUser),$agentPresenter.isInteger($priority)) #end #end #if ( $result=="Set Attribute" ) #if(($agentPresenter.domainCheck($objectName)==true)&&(($agentPresenter.isInteger($object)==true)||($agentPresenter.objectIsEmpty($object)==true))) $agentPresenter.addActionAttributeToRule($objectName,$objectID,$aName,$value) #if($ruleflag=="false") $agentPresenter.addNewAction() #end #else #if($agentPresenter.domainCheck($objectName)==false) $agentPresenter.domainCheck($objectName) $agentPresenter.judgeDomain($agentPresenter.domainCheck($objectName)) #else $agentPresenter.judge($agentPresenter.isInteger($objectID),true) #end #end #end #if ( $result=="Set Annotation" ) $agentPresenter.addActionAnnotationToRule($title,$content,$rating,$language) #if($ruleflag=="false") $agentPresenter.addNewAction() #end #end #if ( $result=="Set Rating" ) #if($agentPresenter.isInteger($rating)==true) $agentPresenter.addActionRatingToRule($rating) #if($ruleflag=="false") $agentPresenter.addNewAction() #end #else $agentPresenter.judge($agentPresenter.isInteger($rating),true) #end #end #if($agentPresenter.judge($result)) $agentPresenter.judge($agentPresenter.judge($result),true) #end $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: updateRules.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="updateRules.html">Update Rules</a></em> #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <h1>Cobricks-2 - Rules Updating</h1> #set ( $auth = $agentPresenter.checkPermission($userId) ) #if ( $auth != "true" ) <div class="error">You do not have the access permission to create a rule of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else $agentPresenter.getRulesForUserUpdate($userId) </p> </form> #end $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: deleteRules.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="deleteRules.html">Delete Rules</a></em> #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <h1>Cobricks-2 - Rules Deletion</h1> #set ( $auth = $agentPresenter.checkPermission($userId) ) #if ( $auth != "true" ) <div class="error">You do not have the access permission to create a rule of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else $agentPresenter.delRulesForUser($userId) <table><tr> <input type="hidden" name="_languages" value="${lg}"/> <input type="hidden" name="agentclass" value="${agentclass}"/> <input type="hidden" name="cmd" value="searchRules"/> <input type="hidden" name="cmd.success" value="$contextPath/agent/deleteRules.html"/> <input type="hidden" name="cmd.error" value="$contextPath/agent/deleteRules.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"/> </tr> </table> </p> </form> #end $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: createRule.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="createRules.html">Create Rules</a></em> #set ( $auserlogin = "$!auserlogin" ) #if ( $auserlogin == "" ) #set ( $auserlogin = $userLogin ) #end #set ( $auserid = $userManager.getUserIdForUserLogin($auserlogin) ) #set ($auser = $userManager.getUser($auserid)) #set ($auserclass = $auser.getUserClass() ) <h1>Cobricks-2 - Rules Creation</h1> #set ( $auth = $agentPresenter.checkPermission($userId) ) #if ( $auth != "true" ) <div class="error">You do not have the access permission to create a rule of user "$auserlogin".</div> <p> Please log in as user with the specified permission or ask the platform administrator to assign the permission to your account. #else <b><h2>List of all conditions:</h2></b> $agentPresenter.initRule($flag) $agentPresenter.addFromEdit($domain,$action,$creator,$sourcecomponent,$field1,$con1,$value1,$field2,$con2,$value2,$field3,$con3,$value3,$field4,$con4,$value4,$field5,$con5,$value5) <table border><tr><th><h3>domain</h3></th><th><h3>action</h3></th><th><h3>operator</h3></th><th><h3>source component</h3></th><th><h3>attribute</h3></th> $agentPresenter.disp_array() </table border> <form action="createRule.html" method="get"> <table > <tr valign="top"> <td> <h2>domain:</h2> </td><td> <select name=domain> <option>item <option selected>context <option>category <option>course <option>portal </select> </td> </tr> <tr valign="top"> <td> <h2>action:</h2> </td><td> <select name=action> <option>create <option selected>delete <option>update </select> </td> <tr valign="top"> <td> <h2>operator:</h2> </td><td> <input type=text name=creator size="25"> </td> </tr> <tr valign="top"> <td> <h2>sourcecomponent:</h2> </td><td> <select name=sourcecomponent> <option>org.cobricks.item <option selected>org.cobricks.context <option>org.cobricks.category <option>org.cobricks.course <option>org.cobricks.portal </select> </td> </tr> </table> <table> <tr> <td> <h2>Set attributes value:</h2> <table cellspacing="10" height="213"> <tr valign="top"> <td height="34"><b>Attribute name</b></td> <td height="34"><input type=text name=field1></td> <td height="34"> <select name=con1> <option>like <option selected>= <option>< <option>> </select> </td> <td height="34"><b>Attribute value</b></td> <td height="34"><input type=text name=value1></td> </tr> <tr valign="top"> <td height="34"><b>Attribute name</b></td> <td height="34"><input type=text name=field2></td> <td height="34"> <select name=con2> <option>like <option selected>= <option>< <option>> </select> </td> <td height="34"><b>Attribute value</b></td> <td height="34"><input type=text name=value2></td> </tr> <tr valign="top"> <td height="34"><b>Attribute name</b></td> <td height="34"><input type=text name=field3></td> <td height="34"> <select name=con3> <option>like <option selected>= <option>< <option>> </select> </td> <td height="34"><b>Attribute value</b></td> <td height="34"><input type=text name=value3></td> </tr> <tr valign="top"> <td height="34"><b>Attribute name</b></td> <td height="34"><input type=text name=field4></td> <td height="34"> <select name=con4> <option>like <option selected>= <option>< <option>> </select> </td> <td height="34"><b>Attribute value</b></td> <td height="34"><input type=text name=value4></td> </tr> <tr valign="top"> <td height="17"><b>Attribute name</b></td> <td height="17"><input type=text name=field5></td> <td height="17"> <select name=con5> <option>like <option selected>= <option>< <option>> </select> </td> <td height="17"><b>Attribute value</b></td> <td height="17"><input type=text name=value5></td> </tr> </table> </td> </tr> </table> <input type="hidden" name="flag" value="false"> <br> <br> <table> <tr> <td><input type="submit" value="Add Condition"/></td> <td><input type="reset" value="Reset Condition"/></td> </tr></table> <hr> </form> <form action="completeRule.html" method="post"> <br> <h2>result:</h2> <select name=result> <option>Send Email <option>Send Message <option>Set Attribute <option selected>Set Annotation <option>Set Rating </select> <input type="submit" value="Add Action"/><p> <table> <tr> <td></td> <input type="hidden" name="flag" value="true"> </tr></table> <table> <tr> <input type="hidden" name="_languages" value="${lg}"/> <input type="hidden" name="agentclass" value="${agentclass}"/> <input type="hidden" name="cmd" value="createRules"/> <input type="hidden" name="cmd.success" value="$contextPath/agent/createRules.html"/> <input type="hidden" name="cmd.error" value="$contextPath/agent/createRules.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"/> </tr></table> </form> #end $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) --- NEW FILE: searchRules2.html --- $portalPresenter.parse("$contextPath/pageheader.html", $portalRequest) <em><a href="index.html">Agent Component</a> - <a href="searchRules.html">Search Rules</a></em> <h1>Cobricks-2 - Rules Searching</h1> <form action="$contextPath/AGENT" method="post" enctype="multipart/form-data"> #set($request=$portalRequest.getHttpServletRequest()) #set($map=$request.getParameterMap()) <br> #set($deleteSet=$agentPresenter.getDeleteValues($map)) #set($result=$agentPresenter.deleteRulefromDB($userId,$deleteSet)) #if($result==true) <h2>Rules $deleteSet deleted.</h2> #else <h2>No rules could be deleted.</h2> #end <table><tr> <input type="hidden" name="_languages" value="${lg}"/> <input type="hidden" name="agentclass" value="${agentclass}"/> <input type="hidden" name="cmd" value="searchRules"/> <input type="hidden" name="cmd.success" value="$contextPath/agent/searchRules.html"/> <input type="hidden" name="cmd.error" value="$contextPath/agent/searchRules.html"/> <input type="hidden" name="cmd.noaccess" value="$contextPath/noaccess.html"/> </tr> </table> </p> </form> $portalPresenter.parse("$contextPath/pagefooter.html", $portalRequest) |